Repository navigation
Time out a stuck npm publish and log its authentication - #4
Merged
Merged
Conversation
The publish step could wait indefinitely after signing provenance, with nothing in the log to say why. It now fails after 10 minutes, prints the npm version, publishes with verbose logging so the Trusted Publishing token exchange and the registry requests show up, and closes stdin so npm cannot wait for input.
The registry answered a stuck publish with 503 after about 12 minutes; a 20-minute limit lets the verbose log capture that response.
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.
The release job's publish step hangs after the provenance statement is published. On the last run the registry answered the publish request with
E503 Service Unavailableafter about 12 minutes, and 1.1.1 never reached npm. Authentication is not the problem (it failed with a 404 before Trusted Publishing was set up), and npm's status page shows no incident.Changes
timeout-minutes: 20on the publish step, so a stuck publish fails instead of holding the runner for hours, while still leaving room to log the registry's response.npm --versionbefore publishing (Trusted Publishing needs 11.5.1 or later).npm publish --loglevel verbose, which logs the Trusted Publishing token exchange and each registry request, so the next run shows how long the registry takes and what it returns.< /dev/null), so npm cannot sit waiting for input such as a one-time password prompt.No version change: merging this runs the release again for 1.1.1, which is still unpublished.
Generated by Claude Code