feat(ci): add recovery-mode to npmjs-release workflow#8650
Merged
lokesh-bitgo merged 1 commit intomasterfrom Apr 29, 2026
Merged
feat(ci): add recovery-mode to npmjs-release workflow#8650lokesh-bitgo merged 1 commit intomasterfrom
lokesh-bitgo merged 1 commit intomasterfrom
Conversation
Adds a `recovery-mode` workflow_dispatch input that publishes only the versions missing from npm (via `lerna publish from-package`) when a prior release left npm in a partial-publish state. Pins the checkout to a SHA captured by a pre-flight job so the publish cannot drift from what the env reviewer approved, asserts the SHA up front, and verifies post-publish that every public package version on rel/latest is now on the registry. Ticket: WCN-308
278b2c0 to
c0dbca6
Compare
mrdanish26
approved these changes
Apr 28, 2026
lokesh-bitgo
approved these changes
Apr 29, 2026
4 tasks
zahin-mohammad
added a commit
that referenced
this pull request
Apr 29, 2026
#8650 introduced an `always()` chain on `release-bitgojs` so it can run when one of its two context jobs is skipped (get-release-context in recovery mode, get-recovery-context in normal mode). The Express jobs (get-express-release-context, publish-express-to-docker-hub) relied on GHA's implicit `success()` against `release-bitgojs`, which propagates the skipped context-job status as not-success along the chain. Express therefore skips on both modes even though release- bitgojs itself succeeded. Override with explicit `always() && needs.<>.result == 'success'` on both Express jobs so the docker publish runs whenever release-bitgojs actually succeeded, regardless of which context job ran. Ticket: WCN-357
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
recovery-modeboolean input tonpmjs-release.ymlthat publishes only the versions missing from npm when a prior release left npm in a partial-publish state (e.g., npm 503 mid-batch).get-recovery-contextpreview job resolvesrel/latestHEAD into a pinned SHA and writes the planned publish list to the run summary before the env-gated publish job is dispatched.release-bitgojscheckout is pinned to that SHA, so the publish cannot drift from what the env reviewer approved.yarn lerna publish from-package --yesinstead of the full release.rel/latestis reachable on the registry; fails the run if any are still missing.concurrency: { group: npmjs-release, cancel-in-progress: false }so a recovery and a normal release cannot race againstrel/latest.Why
On Apr 28 a partial-publish failure (npm 503 mid-batch) left
bitgo@50.34.0and@bitgo/account-lib@27.21.0unpublished while their tags andchore(root): publish modulescommit had already been pushed torel/latest. The full release flow could not be re-run because lerna's conventional bump would re-attempt versions that already had tags. Recovery mode hitslerna publish from-package, which is idempotent and only publishes what is missing.Existing behavior is unchanged when
recovery-mode == false.Validated with parallel correctness + adversarial reviewers across five rounds — race window between preview and publish closed via SHA pinning, silent no-op closed via context-job assertion, post-publish verification added.
Test plan
recovery-mode: trueagainstrel/latest(currently HEAD36fbed6c); verify it publishesbitgo@50.34.0and@bitgo/account-lib@27.21.0and skips the 93 already-published versions.bitgo/express:15.27.0.recovery-mode: falsestill triggers the normal release path (compare against the most recent successful run for shape, not output).recovery-mode: true && dry-run: trueproduces a preview without publishing.Ticket: WCN-308