This repository was archived by the owner on Nov 8, 2026. It is now read-only.
Repository navigation
fix(deploy): retry the pi install when the registry 404s a tarball - #3505
Open
polylane[bot] wants to merge 1 commit into
Open
polylane[bot] wants to merge 1 commit into
polylane[bot] wants to merge 1 commit into
Conversation
Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
Contributor
Author
|
This pull request is waiting on a decision: merge it if the change is still wanted, or close it if the fix is no longer needed. Either one settles it. It was opened on 2026-10-28 and has had no new activity for a week. If nothing happens on it within a week, Polylane closes it and keeps the branch, so reopening it brings the change back exactly as it stands. @justinhelmer and @boristane, the change touches what you own, so the review is with you. |
This branch has not been deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The switchboard image build installed the coding harness with one npm command that failed whenever the package registry briefly did not serve a dependency tarball it had just advertised. Each such reply aborted the build, so staging deploys stalled and the production deploy waited behind them. The install now retries three times before it gives up, and a build that really has a bad pin still fails.
Detection evidence
Affected:
int_14cf586860018m832vjyg5diWhy this fix
Two deploy builds stopped at the same install layer, five days apart, on a 404 for a tarball the registry was advertising: bowser 2.15.0 on 2026-10-26 and @aws-sdk/credential-provider-process 3.972.76 on 2026-10-21. Both tarballs answer HTTP 200 now, and neither version is the one this commit pins, so the reply was a window in a tree npm resolved at build time. npm never retries a 404, so the layer had no tolerance at all. The retry covers that window, and the pin proofs after it still end a build whose install never landed. The layer still resolves the tree from the registry's live view, which remains open on the issue.
This change is a declared stopgap: it contains the symptom while the producer's fix is tracked as a follow-up on the issue timeline.
Production impact: Pi install retry leaves image contents and deploy behaviour unchanged
The diff changes one build-time install step in three Dockerfiles: on a successful install the image is identical (same eight exact pins, same two proofs, same layer order), and the retry only executes after an install has already failed. The three workers these images deploy to were checked over 48 hours: switchboard 371 error-level lines, switchboard-sandbox 5,079, switchboard-resident 5, all from causes unrelated to this layer. The parser change is read-only and only widens what the pin fence sees.
Checked and not affected:
switchboard,switchboard-sandbox,switchboard-resident.Observability
E404line and the next attempt follows it, so three attempts are visible before a build fails.Polylane assessed this pull request at
8e198f3.Fix walkthrough
Watch the fix explained (1:20). Recorded for commit
8e198f317b35eb7f556fcddf8533eb32dccb79e5.Causal chain
npm install -gwith no lockfile, so npm re-resolves pi's whole dependency tree against the registry's live view at build time and requests versions newer than the commit's pins (bowser 2.15.0 against a locked 2.14.1; @aws-sdk/credential-provider-process 3.972.76 against a locked 3.972.71). The registry advertised those versions but did not serve their tarballs, and npm never retries a 404, so the layer exited 1 and BuildKit aborted the build, failing the deploy step.7 files changed (+60/-9)
Dockerfile: modified, +10/-2deploy/cloudflare-resident/Dockerfile: modified, +10/-2deploy/cloudflare-sandbox/Dockerfile: modified, +10/-2docs/reference/specs/harness-pi.md: modified, +2/-2src/deploy/imagePiHarness.test.ts: modified, +13/-0src/deploy/imagePins.test.ts: modified, +7/-0src/deploy/imagePins.ts: modified, +8/-1Generated by Polylane. You can ask follow-ups by mentioning @polylane in a comment.