CM-65436: retry scan notification on 404 after presigned upload#471
Open
mateusz-sterczewski wants to merge 5 commits into
Open
CM-65436: retry scan notification on 404 after presigned upload#471mateusz-sterczewski wants to merge 5 commits into
mateusz-sterczewski wants to merge 5 commits into
Conversation
After a successful S3 presigned POST, the scan service calls the file service to verify the upload exists. A transient 403 from the file service's S3 client is silently mapped to NotFound, causing the scan service to return 404. Add a targeted retry (up to 3 attempts, random exponential backoff) exclusively on the notify-server call so the scan proceeds without requiring a full re-upload. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Eliminates the wrapper function that existed solely to carry the decorator. The Retrying context manager expresses the same intent inline without the extra indirection. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Retry on 404 belongs in the HTTP client layer alongside the other retry logic, not in the scan orchestration layer. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
false, causing the scan service to return 404 to the CLI._notify_scan_from_upload_id— a targeted retry wrapper (up to 3 attempts, random exponential backoff 1–5s) exclusively around thescan_repository_from_upload_idcall in_perform_scan_v4_async.Jira
CM-65436