fix(worker): treat 'merged' as final state in finisher idempotency check#771
Draft
drazisil-codecov wants to merge 1 commit intomainfrom
Draft
fix(worker): treat 'merged' as final state in finisher idempotency check#771drazisil-codecov wants to merge 1 commit intomainfrom
drazisil-codecov wants to merge 1 commit intomainfrom
Conversation
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #771 +/- ##
=======================================
Coverage 92.27% 92.27%
=======================================
Files 1305 1305
Lines 47938 47938
Branches 1628 1628
=======================================
Hits 44233 44233
Misses 3396 3396
Partials 309 309
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…isher idempotency check
The idempotency check used ('processed', 'error') as terminal upload
states. After #766 changed successful uploads to 'merged', 'processed'
became a dead state that will never be set again. Re-triggered finishers
saw uploads in 'merged' state, concluded they weren't finished, and ran
finish_reports_processing again — enqueuing duplicate
save_commit_measurements tasks and flooding the timeseries queue to 200K+.
Drop 'processed' from the check and use ('merged', 'error') only.
Co-Authored-By: Claude <noreply@anthropic.com>
559f613 to
e681079
Compare
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.
After #766 changed successful uploads from
processedtomerged, the finisher's idempotency check still used('processed', 'error')as terminal states.processedis now a dead state that will never be set again.When a finisher was re-triggered (retries, visibility timeout, duplicate enqueue), it saw uploads in
mergedstate, concluded they weren't finished, and ranfinish_reports_processingagain — enqueuing a duplicatesave_commit_measurementstask each time. This caused the timeseries queue to grow to 200K+ starting March 13th.The fix drops
processedfrom the check entirely and uses('merged', 'error')as the only terminal states, matching the current upload lifecycle.