Skip to content

CM-65436: retry scan notification on 404 after presigned upload#471

Open
mateusz-sterczewski wants to merge 5 commits into
mainfrom
CM-65436-retry-presigned-upload-on-404
Open

CM-65436: retry scan notification on 404 after presigned upload#471
mateusz-sterczewski wants to merge 5 commits into
mainfrom
CM-65436-retry-presigned-upload-on-404

Conversation

@mateusz-sterczewski
Copy link
Copy Markdown
Collaborator

@mateusz-sterczewski mateusz-sterczewski commented Jun 5, 2026

Summary

  • After a successful S3 presigned POST, the scan service verifies the upload via an internal file service. A transient 403 from the file service's S3 client is silently mapped to false, causing the scan service to return 404 to the CLI.
  • Added _notify_scan_from_upload_id — a targeted retry wrapper (up to 3 attempts, random exponential backoff 1–5s) exclusively around the scan_repository_from_upload_id call in _perform_scan_v4_async.
  • No global retry logic is touched; the retry only fires on 404 for this one call.

Jira

CM-65436

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>
mateusz-sterczewski and others added 4 commits June 5, 2026 07:36
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant