Skip to content

feat(preprod): Decide artifact expiry from the dates on the row - #132003

Draft
lcian wants to merge 2 commits into
lcian/feat/preprod-artifact-expiry-indexfrom
lcian/feat/preprod-expiry-reads
Draft

lcian wants to merge 2 commits into
lcian/feat/preprod-artifact-expiry-indexfrom
lcian/feat/preprod-expiry-reads

Conversation

@lcian

@lcian lcian commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

A build is hidden once it is older than the current Size Analysis retention, so on the Team plan it disappears after 30 days although it can be installed for 13 months. Reads now use the expiry dates stamped on the artifact.

When this deploys, Team builds between 30 days and 13 months old come back in the distribution list and the build details, without their size analysis. Endpoints based on PreprodArtifactEndpoint, such as install details and download, now return 404 after date_expires. The snapshot, check-for-updates, latest build and public endpoints do not change yet. A snapshot has no date_size_analysis_expires, so the snapshot list keeps the previous rule: the Size Analysis retention, counted from date_added. A row without a date keeps the previous rule, which gives the same result as the backfill, so the backfill can run before or after this deploys.

Refs EME-1314

Cross-repository landing order (top to bottom)

  • sentry#132001 — Read preprod retention through one helper, capped at 396 days
  • sentry#132002 — Add the expiry columns and stamp them when an artifact is created
  • sentry#132702 — Add the index on date_expires that the cleanup reads, as a post-deployment migration
  • getsentry#23481 — Add the job that backfills the expiry of existing artifacts
  • 👉 sentry#132003 — Read the expiry from the row, and keep a build visible until it expires
  • sentry#132004 — Delete artifacts in cleanup once they are past their stamped expiry
  • ops#25816 — Explain what --days still does on the preprod artifacts cleanup cron
  • sentry-docs#20923 — Add Build Distribution to the public data retention page

@linear-code

linear-code Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

EME-1314

FS-653

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

decision-model-linter

api

src/sentry/preprod/api/bases/preprod_artifact_endpoint.py

  • warn makesExistingInputStricter = TRUE (0.85): Rejecting input an endpoint accepted before, or changing a field's default, breaks existing callers, and the API spec often doesn't show it. Make the change backward compatible (keep the field optional, accept the old values, or keep the old default), or treat it as a breaking change and coordinate it.

decision-model-linter: 57 calls on 12 files, 128,255 input tokens, $0.0054, model typesafe/jev-1.13-20260917

@sentry

sentry Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 1084 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@NicoHinderling

Copy link
Copy Markdown
Contributor

I think we need the backfill from https://github.com/getsentry/getsentry/pull/23481 to run first before we can merge this

@NicoHinderling

Copy link
Copy Markdown
Contributor

I will pre-stamp but just be careful about this

@NicoHinderling

Copy link
Copy Markdown
Contributor

For gating the public size API and the PR page (the open point in the doc): do you want to add it here or do it as a follow-up PR?

@lcian
lcian force-pushed the lcian/feat/preprod-expiry-reads branch from a2d7a15 to 4c49cd4 Compare November 26, 2026 14:42
@lcian
lcian force-pushed the lcian/feat/preprod-artifact-expiry branch from 19cf25a to 5ed74a9 Compare November 26, 2026 14:42
@lcian
lcian force-pushed the lcian/feat/preprod-expiry-reads branch 2 times, most recently from 03034dd to d449216 Compare November 26, 2026 16:10
@lcian
lcian force-pushed the lcian/feat/preprod-expiry-reads branch from d449216 to bde080d Compare November 26, 2026 20:24
@lcian
lcian changed the base branch from lcian/feat/preprod-artifact-expiry to lcian/feat/preprod-artifact-expiry-index November 26, 2026 20:26

This branch was successfully deployed

1 active (outdated) deployment
Preview — a2d7a15d Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants