Skip to content

ci(release): retry the npm version check before failing the release - #30

Open
woladi wants to merge 1 commit into
masterfrom
woladi/release-npm-view-retry
Open

woladi wants to merge 1 commit into
masterfrom
woladi/release-npm-view-retry

Conversation

@woladi

@woladi woladi commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Problem

publish-registry verifies the release with npm view "pseudonym-mcp@$VERSION" version immediately after the release job finishes changeset publish. npm's read replicas lag a successful publish by tens of seconds, so that lookup can 404 on a version that was just published.

That is what happened on 0.9.0 (run 32844937782): npm error 404 No match found for version 0.9.0 although the publish had succeeded. The whole Release run went red, the registry publish was skipped, and it had to be recovered manually with gh workflow run release.yml --ref master -f publish_registry=true.

Fix

The npm view call is now a bounded retry — up to 6 attempts, 10s apart, roughly a minute of grace — and only then fails the step. The guard is unchanged in intent: if npm genuinely does not have the version after the retries, the step still fails loudly rather than letting the registry point at a version npm never published.

The server.json sync check above it stays immediate and non-retried: a stale manifest is not something waiting can fix.

Verification

  • release.yml round-trips through a YAML parser unchanged.
  • The step's shell script passes bash -n, and was run under bash -e against a stubbed npm/sleep in three cases: available immediately (1 lookup, exit 0), available on the 3rd attempt (exit 0, no spurious failure), never available (6 attempts, then exit 1 with the loud message).

🤖 Generated with Claude Code

npm's read replicas lag a successful publish by tens of seconds. On 0.9.0
(run 32844937782) the `npm view pseudonym-mcp@$VERSION version` guard ran
straight after `changeset publish` and got `404 No match found for version
0.9.0`, so a healthy release was marked failed and the registry publish was
skipped — it had to be recovered by hand with a `publish_registry=true`
dispatch.

The lookup now retries up to 6 times, 10s apart, and still fails loudly if
npm genuinely does not have the version after that: the guard exists to stop
the registry pointing at something npm never published, and it keeps doing
that. The server.json sync check above stays immediate — waiting cannot fix
a stale manifest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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