Repository navigation
feat(preprod): Read retention through a shared helper - #132001
Merged
Merged
Conversation
The retention of Size Analysis and Build Distribution data was read from the quotas backend in five places, each with its own fallback of 90 days for an unlimited retention. They now go through sentry.preprod.retention. The helper also cuts a retention to 396 days. Rows are already deleted at 396 days, and the Objectstore use case configuration for preprod rejects a longer TTL, so an override above that could never be honored. Refs EME-1314
This was referenced Nov 20, 2026
get_retention_days returned None for an unlimited retention, and callers that need a number had a second helper for it. An instance without a configured retention now gets the default of 90 days everywhere, so there is one helper and it always returns a number.
NicoHinderling
approved these changes
Nov 24, 2026
A retention override longer than MAX_RETENTION_DAYS can't be honored, so it is still cut to the maximum, but now it is logged as an error so the override or the maximum can be fixed.
lcian
commented
Nov 26, 2026
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.
Preprod code reads retention from the quotas backend in five places, and an override above 396 days gives Launchpad an app icon TTL that Objectstore rejects. These places now use one helper in
sentry.preprod.retention, which defaults to 90 days and cuts longer retentions to 396 days.Rows are already deleted at 396 days, so a longer override could never be honored. A cut retention is logged as
preprod.retention.exceeds_maxinstead of failing ingestion, because the customer cannot fix the override.Refs EME-1314
Cross-repository landing order (top to bottom)
cleanuponce they are past their stamped expiry--daysstill does on the preprod artifacts cleanup cron