Repository navigation
fix(scripts): wait for workspace siblings to appear on npm before publishing bitgo - #9951
Merged
Merged
Conversation
Contributor
Charan-Ratlan
marked this pull request as ready for review
October 13, 2026 11:58
Charan-Ratlan
requested review from
pranavjain97,
rishikeshdadam136 and
vibhavgo
October 13, 2026 11:58
pranavjain97
previously approved these changes
Oct 13, 2026
vibhavgo
previously approved these changes
Oct 14, 2026
…lishing bitgo problem/goal bitgo's prepack checked 3 times, 30 seconds apart, that every pinned workspace sibling was visible on npm, then failed the release. Lerna reports a package as published minutes (sometimes over an hour) before the registry shows it, so beta and stable releases often failed here and left partially published releases that needed reruns. implementation details - Replace the fixed 3-attempt check in ensureWorkspaceSiblingVersionsAvailable with a time budget: poll every 30 seconds until all siblings are visible or the budget is spent. Default 20 minutes, override with BITGO_SIBLING_AVAILABILITY_TIMEOUT_MINUTES (0 checks once without waiting). - Log how many siblings are still missing on each poll and, on timeout, fail with the full list of missing versions (same "still unavailable from npm" message as before). - Treat network errors, HTTP 429 and 5xx as transient and retry them up to 5 times in a row during the wait. Other unexpected statuses still fail at once. - Add injectable clock support and tests for waiting past the old limit, timeout, zero budget, transient errors and the environment override. verification - npx mocha --require tsx scripts/tests/generate-bitgo-shrinkwrap.test.ts: 13 passing. - prettier and eslint clean on the changed files. - Checked the wait against the real npm registry with read-only requests: returns at once when versions exist, fails after the budget naming a missing version. Not run in an actual publish. Ticket: WCI-1858
Charan-Ratlan
dismissed stale reviews from vibhavgo and pranavjain97
via
October 14, 2026 08:36
646e917
Charan-Ratlan
force-pushed
the
WCI-1858
branch
from
October 14, 2026 08:36
4da704a to
646e917
Compare
vibhavgo
approved these changes
Oct 14, 2026
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.
Problem
bitgo's prepack checked 3 times, 30 seconds apart, that every pinned workspace sibling was visible on npm, then failed the release. Lerna reports a package as published minutes (sometimes over an hour) before the registry shows it, so beta and stable releases often failed here and left partially published releases that needed reruns.
Implementation details
Ticket: WCI-1858