Skip to content

Add retry with backoff for npm install in Bun Compile workflow#102

Closed
kjiang-ac wants to merge 24 commits intomainfrom
auggie-macos-signing
Closed

Add retry with backoff for npm install in Bun Compile workflow#102
kjiang-ac wants to merge 24 commits intomainfrom
auggie-macos-signing

Conversation

@kjiang-ac
Copy link
Contributor

Problem

The Bun Compile workflow (run #24) failed because bun install couldn't find @augmentcode/auggie@0.19.0-prerelease.10 — even though the version exists on npm. The repository_dispatch fires immediately on publish, but the npm registry hasn't fully propagated the new version yet.

Fix

Adds a retry loop with linear backoff (5 attempts, 30s increments) to the install step. Retries at 30s, 60s, 90s, 120s — up to ~5 minutes total wait, which should comfortably handle npm CDN propagation delays.

In the happy path, the install succeeds on the first attempt with no delay.


Pull Request opened by Augment Code with guidance from the PR author

kjiang-ac added 24 commits March 5, 2026 12:57
Adds .github/workflows/bun-compile.yml that compiles the Auggie CLI
into self-contained native binaries using Bun, pulling the pre-built
@augmentcode/auggie package from npm.

- workflow_dispatch trigger with required version input
- 4 platform targets via matrix (darwin-arm64, darwin-x64, linux-x64, windows-x64)
- Cross-compilation on ubuntu-latest using bun build --compile --target
- Release job creates GitHub Release with all 4 binaries attached
Agent-Id: agent-42aef0a6-de54-40e7-9889-e6dc52b9645d
Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
Addresses PR review comments: remove '0.18.1' fallback in both build
and release jobs. Version is now passed via env vars and the workflow
fails explicitly if no version is supplied via workflow_dispatch or
repository_dispatch.

Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
npm registry propagation can take time after publish, causing
the repository_dispatch-triggered workflow to fail when bun tries
to install a version that hasn't propagated yet.

Adds a retry loop (5 attempts, 30s backoff) to handle this race
condition gracefully.
@kjiang-ac kjiang-ac closed this Mar 11, 2026
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