Repository navigation
Conversation
This was referenced Nov 20, 2026
NicoHinderling
approved these changes
Nov 24, 2026
Contributor
Sentry Snapshot Testing
|
lcian
commented
Nov 26, 2026
Base automatically changed from
lcian/feat/preprod-retention-helper
to
master
November 26, 2026 14:39
lcian
force-pushed
the
lcian/feat/preprod-artifact-expiry
branch
from
November 26, 2026 14:42
19cf25a to
5ed74a9
Compare
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Add field date_expires to preprodartifact
--
ALTER TABLE "sentry_preprodartifact" ADD COLUMN "date_expires" timestamp with time zone NULL;
--
-- Add field date_size_analysis_expires to preprodartifact
--
ALTER TABLE "sentry_preprodartifact" ADD COLUMN "date_size_analysis_expires" timestamp with time zone NULL; |
A snapshot is a separate upload, not a build, so it no longer takes the Size Analysis and Build Distribution retentions. It gets only a date_expires, SNAPSHOT_RETENTION_DAYS after it is created, until the SNAPSHOT_IMAGE category has a retention of its own.
Snapshots have no retention of their own yet. The Size Analysis retention matches the snapshot retention intended on every plan, so it stands in for it instead of a fixed 396 days. Snapshots still get only date_expires.
Adding the index is a post-deployment migration, so it lands separately from the columns.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A preprod build has no retention recorded on it, so reads use the organization's current plan and deletion uses a fixed age. Each
PreprodArtifactnow gets its expiry stamped when it is created, from the organization's retention at that time.The row has two dates because one build serves two products with different retentions, such as 30 days of Size Analysis and 13 months of Build Distribution on the Team plan.
date_expiresuses the longer retention and is when the row and its files are deleted.date_size_analysis_expiresis when the size analysis stops being readable.Snapshots
A snapshot is a separate upload with its own row, so it gets only
date_expiresand nodate_size_analysis_expires. Snapshots have a data category,SNAPSHOT_IMAGE, but no retention is configured for it yet. Until then, the Size Analysis retention stands in for it, as planned in EME-1316: 30 days on the Developer and Team plans, 13 months on Business. Snapshot images are shared between snapshots and still expire on their own in Objectstore.Refs EME-1314
Cross-repository landing order (top to bottom)
date_expiresthat the cleanup reads, as a post-deployment migrationcleanuponce they are past their stamped expiry--daysstill does on the preprod artifacts cleanup cron