Repository navigation
Survive registry hiccups when re-running a publish - #30
Merged
Merged
Conversation
The first release run stopped when JSR answered 503 midway through `jsr publish`. Re-running it then failed on npm: `npm view` did not yet return a version published minutes earlier, so the script tried to publish it again and npm refused with 409 Conflict. - npm refusing a version because it already exists now counts as published, so re-runs are idempotent despite registry caching. - `jsr publish` is retried twice after 30s; it skips the versions it already published, so repeating it is safe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3xvJ1TaozjYSE6eoyo9mq
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
scripts/publish.tstreats npm refusing a version because it already exists (409 "Cannot publish over previously staged version", 403 "cannot publish over the previously published versions") as already published.jsr publishis retried twice after 30s.Why
The first release (
v20261010.01) hit both problems:503 Service Unavailablemidway throughjsr publish, failing the run after npm had published every package.npm view @probitas-test/client-sql-mysql@0.5.1still returned 404 a few minutes after the publish (registry caching), so the script published it again and npm refused with409 Conflict.The workflow is meant to be re-runnable (the plan is reused from the Release); this makes that hold despite registry caching and transient JSR errors.
jsr publishskips versions it already published, so repeating it is safe.Test Plan
bun run verify(newalreadyPublishedcases for the 409 and 403 messages and for unrelated errors)🤖 Generated with Claude Code
https://claude.ai/code/session_01N3xvJ1TaozjYSE6eoyo9mq