ReviewOS

pantry-pm/pantry

fix(action): retry release assets while a new tag is publishing

#215
Closed chris opened this 2 months ago ·
2 months ago

Context

Immediate consumers of v0.10.42 resolved the tag and Action source successfully, but every setup attempt failed with Unexpected HTTP response: 404 because its Releaser was superseded before platform assets were published. This exposed a deterministic tag-to-asset publication race in the Action.

Scope

  • Treat release-asset 404 responses as transient only within a bounded setup retry window.
  • Preserve immediate failure for authorization, malformed responses, and unsupported platforms.
  • Use capped backoff and report the attempted version/platform in the final error.
  • Add deterministic tests without real sleeps or network requests.

Acceptance criteria

  • A newly pushed tag can be consumed while its release workflow is still uploading assets.
  • Retry count and delay are bounded.
  • Permanent failures remain visible and non-zero.
  • Action tests and a real pinned GitHub Actions consumer pass.

Evidence

  • Implementation: 9218391dbabf13ea6185f3f9990a57b508bb12e6
  • Release: v0.10.43 at c5e15260ccde34206082756a14d03e30cf1d7d5e
  • Pantry CI: run 29887331918, including 44 Action tests and the live Redis service contract
  • Pantry Releaser: run 29887332086, 13 minutes from tag visibility to platform assets
  • Live consumer: Stacks Export Size run 29887448529, started while the release did not exist and completed successfully without a rerun
  • Additional consumers: Stacks CI 29887448487, desktop matrix 29887448557, and whitepaper production deploy 29887553459

Originally observed in stacksjs/stacks PR #2064 runs 29887078780 and 29887078703.

8 days ago

Implemented in 9218391 and released from v0.10.43 at c5e1526. The Action now retries only publication-shaped 404, timeout, rate-limit, and server failures with capped backoff; permanent failures remain immediate. The unit and committed-bundle suite passes 44/44. Live consumers are currently exercising the intended race while the v0.10.43 Releaser is still publishing: stacksjs/stacks runs 29887448487, 29887448529, and 29887448557, plus stacksjs/white-paper run 29887553459. All are remaining inside Setup Pantry instead of failing on the initial 404. I will close this after the release assets appear and those consumers complete.

8 days ago

Completed by v0.10.43. The live Stacks consumer began during the thirteen-minute no-release interval, remained in Setup Pantry, then downloaded the exact v0.10.43 asset and passed without a rerun. This proves the retry bridges publication delay without changing the requested version. The issue body now retains implementation, release, CI, and consumer evidence.

Sign in to comment on this issue.