Skip to content

latest.json upload still fails with 404 in parallel builds (v0.6.1) #1270

@blimmer

Description

@blimmer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions