-
Notifications
You must be signed in to change notification settings - Fork 223
Description
Description
When running parallel matrix builds (e.g., macOS ARM + macOS Intel + Linux) with includeUpdaterJson: true, the latest.json upload intermittently fails with a 404:
Uploading latest.json...
##[error]Not Found - https://docs.github.com/rest/releases/assets#update-a-release-asset
This happens on v0.6.1, which includes the fix from #1197 / PR #1199. The failure is non-deterministic but frequent enough to be disruptive. Re-running the failed job succeeds.
Root Cause
Multiple parallel builds race on the delete-then-upload flow for latest.json. Build A and Build B both list assets and see latest.json with ID=100. Build A deletes it and re-uploads. Build B then tries to delete ID=100 and gets a 404.
The #1199 fix helps by retrying the entire uploadVersionJSON function, but retries fire immediately with no delay, so parallel builds collide again on retry.
Suggested Fix
Add exponential backoff with random jitter to the latest.json retry path, and increase the default retry count (currently only 1 additional attempt when retryAttempts is unset).
Workaround
Setting retryAttempts: 3 (or higher) reduces the failure rate but doesn't eliminate it since there's no delay between retries.
Related Issues
- Duplicate Releases Sometimes Created #914 — Duplicate releases from parallel builds
- [unreleased] retrying latest.json upload needs to redownload latest.json first #1197 / PR fix: retry full json upload step on failure #1199 — Previous latest.json retry fix (included in v0.6.1)