Skip to content

chore(release): don't fail the release on a slow npm registry - #861

Merged
lwshang merged 4 commits into
mainfrom
chore/release-npm-visibility
Oct 30, 2026
Merged

lwshang merged 4 commits into
mainfrom
chore/release-npm-visibility

Conversation

@lwshang

@lwshang lwshang commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

During the v1.8.0 release, scripts/release.sh stopped at step 4 even though the publish had worked. release-npm.yml succeeded and npm replied "Your package is being processed and may take a few minutes to become available". The script gave the registry only 30 seconds to list @icp-sdk/icp-cli@1.8.0, then failed.

  • release-npm.yml gets a run-name: Publish 1.8.0 to npm from v1.8.0, plus (beta) for beta runs. The script uses it to find the run for this release. A workflow_dispatch run's inputs aren't visible in gh run list, and the old ensure_workflow_run matched any run of the workflow. Matching the npm version and the beta flag along with the tag means a run that published a different version from the same tag doesn't count.
  • Step 4 counts npm as done once that run has succeeded, even if the registry doesn't list the version yet. If the run is in flight, the script watches it. If there's no run, or the last one failed, it dispatches a new one and finds it by its title. It doesn't take the workflow's newest run, which could belong to a concurrent release. Re-dispatching is safe anyway, because publish-all.sh skips versions that are already published.
  • After that, the script polls the registry against a 10-minute deadline (NPM_VISIBLE_TIMEOUT_SECONDS), and each registry request times out after 15 seconds. If the version still isn't listed, it warns and carries on: neither the homebrew step nor the docs step depends on npm.

Also in this PR, because CI needed it: Wasmtime 49.0.4 → 49.0.5 (wasmtime, wasmtime-wasi). cargo-deny began rejecting 49.0.4 over four new advisories, which failed dependencies:required here:

Only Wasmtime's own crates move in Cargo.lock (wasmtime, cranelift, pulley, wiggle). This patches the runtime that runs plugin sync steps and extensions. Nothing else about them changes.

Tested:

  • bash -n scripts/release.sh.
  • The run matcher, against the live run list and a sample list. It picks the run whose title matches and ignores runs for another npm version and beta runs.
  • After the Wasmtime bump, cargo deny check advisories passes, and cargo check passes for icp-sync-plugin and icp-extension.

🤖 Generated with Claude Code

release.sh gave the registry 30 seconds to list a version that
release-npm.yml had just published, and npm can take minutes, so the
v1.8.0 release stopped at step 4 although the publish had succeeded.

Count npm as done once a release-npm.yml run for the tag has succeeded,
found by a run-name the workflow now carries, then wait up to ten minutes
for the registry and only warn if it still lags: no later step needs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 10:33
@lwshang
lwshang requested a review from a team as a code owner October 30, 2026 10:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Workflow matching can select a different package version or concurrent release, causing required publishing to be skipped or the script to continue despite the intended release failing.

3 open issues
What changed in this PR

This PR updates release automation so delayed npm registry visibility does not stop the remaining release steps after a successful publish workflow.

Changes:

  • Adds a release-tag-specific workflow run title for npm publishing.
  • Reuses successful or in-flight matching runs before dispatching another publish.
  • Extends registry polling to a nominal ten minutes, then warns and continues.
File Description
scripts/​release.sh Adds npm run lookup and nonfatal registry visibility polling.
.github/​workflows/​release-npm.yml Adds a run title containing the release tag.

Review effort: Balanced

Comment thread .github/workflows/release-npm.yml Resolved
Comment thread scripts/release.sh Resolved
Comment thread scripts/release.sh Resolved
lwshang and others added 3 commits October 30, 2026 11:49
- The run-name now carries the npm version and the beta flag beside the
  tag, so a run that published a different version from the same tag, or
  a beta, doesn't count as this release's publish.
- After dispatching, find the new run by that title rather than as the
  workflow's latest, which could be a concurrent release's.
- Time the registry wait against a deadline and cap each registry request
  at 15s, so a stalled request can't hold up the release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picks up the Wasmtime security fixes RUSTSEC-2026-0420 and
RUSTSEC-2026-0422 through RUSTSEC-2026-0424, which cargo-deny rejects
49.0.4 for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lwshang
lwshang enabled auto-merge (squash) October 30, 2026 13:17
@lwshang
lwshang merged commit 6d2829d into main Oct 30, 2026
108 checks passed
@lwshang
lwshang deleted the chore/release-npm-visibility branch October 30, 2026 13:28
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.

3 participants