Skip to content

fix(preprod): safely refresh size analysis processing state - #130246

Merged
jamieQ merged 2 commits into
masterfrom
fix/size-analysis-state-reconciliation
Nov 6, 2026
Merged

jamieQ merged 2 commits into
masterfrom
fix/size-analysis-state-reconciliation

Conversation

@jamieQ

@jamieQ jamieQ commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Size analysis metrics were never marked PROCESSING after launchpad started processing them. If the processing jobs permanently failed (e.g. the pods repeatedly OOM'd), this could result in stranded metrics that were still marked PENDING and which aren't currently considered by the cleanup cron (it only looks for items in the processing state). Improve this a bit by having launchpad update the metric's state to processing when appropriate. This PR is the sentry-side changes to handle that.

Launchpad PR to deploy after this: getsentry/launchpad#732

Refs EME-1341

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 6, 2026
metrics.error_code = put.error_code
metrics.error_message = put.error_message
metrics.save()
case PreprodArtifactSizeMetrics.SizeAnalysisState.PROCESSING:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC none of our code previously was ending up here since the PutSizeProcessing request appears to have been unused.

@linear-code

linear-code Bot commented Nov 6, 2026

Copy link
Copy Markdown

EME-1341

@jamieQ

jamieQ commented Nov 6, 2026 •

Copy link
Copy Markdown
Member Author

bugbot review

@jamieQ
jamieQ marked this pull request as ready for review November 6, 2026 16:14
@jamieQ
jamieQ requested a review from a team as a code owner November 6, 2026 16:14
@jamieQ
jamieQ merged commit f30a0ad into master Nov 6, 2026
86 checks passed
@jamieQ
jamieQ deleted the fix/size-analysis-state-reconciliation branch November 6, 2026 17:26
jamieQ added a commit that referenced this pull request Nov 6, 2026
)

Sentry-only mitigation related to
#130246 (see that for more
detail). Alternative implementation to
getsentry/launchpad#732.

Refs EME-1341
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