fix(ci): retry npm view instead of fixed sleep in publish verification - #269
Merged
Merged
Conversation
The verification step slept a fixed 30s then queried the registry once. For 1.13.5, npm publish succeeded (npm info ok) but registry propagation took longer than 30s, so the step 404'd and the workflow run showed failure even though the package was published. Replace the fixed sleep with a retry loop (POSIX sh, up to 30 tries / 15s apart = 7.5 min) and bump the job timeout to accommodate it.
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.
What
The publish workflow's "Verify publication" step slept a fixed 30 seconds
then queried the registry once for the new version.
Why
For the 1.13.5 release,
npm publishsucceeded (npm info ok, provenancesigned and logged to Sigstore), but registry propagation took longer than
30 seconds. The single
npm viewcall 404'd, and the workflow run showedred even though the package had already published successfully — a false
alarm, not a real publish failure.
Fix
Replace the fixed sleep with a POSIX
sh-compatible retry loop (up to 30tries, 15s apart = 7.5 min ceiling), and bump the job timeout from 10 to
15 minutes to give the longer retry window room alongside the earlier
steps.
Verification
text2datauri@1.13.5is confirmed live on the registry (npm view,and a direct
curltoregistry.npmjs.orgreturned 200).npm test(25/25),npm audit(0 vulnerabilities).