fix(release): stop failing a release whose packages did reach the registry - #308
Merged
Merged
Conversation
…istry The v1.17.0 run went red on "Verify every package is actually on the registry" while every package was published, signed and installable (`npm i @aroman22/codegraph-vba@1.17.0` + `codegraph-vba --version` → 1.17.0). A gate that cries wolf is worse than no gate: the next real failure gets waved off as "that flaky step again". Two causes, both in the retry loop. The budget was 20 x 10s = 200s. Each per-platform package bundles a Node runtime and unpacks to ~200 MB over ~1,000 files, and npm's registry recorded the last one 3m09s AFTER the publish step had already finished. Raised to 60 attempts, and the reason is now in the step so nobody trims it back without knowing why it is long. The loop also slept after its final failed check and exited without looking again, throwing away the last wait — the package appeared 8s before the run errored out. A final check after the loop closes that off-by-one. A package that genuinely never arrives still fails the release, exactly as before. Closes #307
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.
Closes #307
What happened
The v1.17.0 Release run (34693660213) went red on "Verify every package is actually on the registry":
The release had shipped correctly. Verified end to end, not inferred:
All six per-platform packages plus the shim are on npm at 1.17.0, signed, with valid integrity hashes, and the shim's
optionalDependenciespoint at 1.17.0 for all six.A gate that cries wolf is worse than no gate — the next real publish failure gets waved off as "that flaky step again". So this fixes the step rather than the symptom, and keeps it fatal.
Root cause
1. The budget was too short for how big these packages are.
Each bundles a Node runtime — ~200 MB over ~1,000 files. npm's own registry metadata timestamps
codegraph-vba-win32-x64@1.17.0at 12:33:15.765Z, while the publish step had already finished before the verify step began at 12:30:06: the registry took over three minutes to make that one resolvable. The budget was 20 × 10 s = 200 s.2. The loop slept after its last failed check and exited without looking again.
The final check ran at 12:33:23 — 8 s after the package landed, still missing it through the CDN — then the run slept 10 s and errored without a further look. The last wait was thrown away.
The change
env:so they are visible, and the reason recorded in a comment: a future reader who trims it back will first read why it is long. Only whichever package was published last tends to lag, so the worst case is one package's wait, not six.($i/$VERIFY_ATTEMPTS)instead of a bare counter.Nothing else in the workflow changes, and a package that genuinely never arrives still fails the release with the same error.
Verification
The step is shell inside a workflow, so it was exercised directly against a stub
npmthat starts succeeding at a configurable attempt — the three cases that matter, withVERIFY_ATTEMPTS=3:verified, exit 0verified, exit 0 (short-circuits, no further sleeps)ERROR never appeared, exit 1The workflow YAML was also parsed to confirm the new
env:block is well-formed (VERIFY_ATTEMPTS: 60,VERIFY_INTERVAL_SECONDS: 10).Not in scope
The v1.17.0 release itself needs no action — it is published, installable and correct. This only stops the next one from being reported red for the same non-reason.