You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle DynamoDB update failures after successful S3 upload
Previously, if the DynamoDB update at the end of the EC2 user-data script
failed (network blip, permissions error, etc.) after S3 upload had already
succeeded, the build was left stuck in PROCESSING with orphaned S3 artifacts
and no error recorded.
Changes:
- Wrap the Step-1 update_item (ADD arch_s3_keys + decrement pending_arches)
in try/except; on failure, explicitly mark the build FAILED instead of
letting bash set -e silently exit.
- Wrap the Step-2 update_item (SET status=COMPLETED) in a retry loop (3
attempts with exponential back-off); if all retries fail, call _mark_failed
so the caller gets a definitive FAILED status rather than being stuck.
- Add _mark_failed() helper with its own 3-attempt retry loop.
- Exit the Python script with sys.exit(0) on handled errors so the bash
trap fires only after DynamoDB has been updated.
0 commit comments