Uh oh!
There was an error while loading. Please reload this page.
fix(release): make registry publishing re-runnable and independent - #4
Merged
Conversation
The v0.1.2 release published five of six npm platform packages, tripped npm's spam heuristic on the sixth, and took PyPI down with it. Three separate faults, all in how the publish steps were wired rather than in the packages themselves. npm publishing moves into packaging/npm/publish.sh - npm's spam detection refused the sixth similarly-named package in a row with `403 Package name triggered spam detection`. It is rate-shaped, not permanent, so publishes are paced and that specific failure is retried with backoff. - npm refuses to republish an existing version, so a naive retry of a partial release fails on everything that already succeeded and never reaches what did not. Versions already on the registry are skipped, which makes re-running the release job the correct recovery. - A conflict raised between the check and the publish is treated as success rather than an error; it means a concurrent run got there first. - Platform-before-entry ordering is unchanged and now enforced in one place. PyPI no longer depends on npm succeeding - They are independent registries. `if: always()` on the upload, and `--skip-existing` so a re-run after a partial upload is safe rather than a guaranteed failure on the versions that already landed. - Also fixes a repeat of an earlier mistake: `secrets` is not an available context in a step-level `if`, so the guard reads the mapped env var. Verified the skip and retry logic against the live registry: it identifies exactly the two packages v0.1.2 left unpublished, classifies spam and 429 as retryable, publish-conflict as already-done, and everything else as fatal.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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 v0.1.2 release published five of six npm platform packages, tripped npm's spam heuristic on the sixth, and took PyPI down with it.
Nothing was user-visible-broken: the entry package never published, so nobody could install a half-resolved tree. That is the platform-first ordering doing its job.
Three faults, all in the wiring rather than the packages:
1. npm spam detection. Six similarly-named packages published back to back tripped it on the sixth. It's rate-shaped, not permanent — publishes are now paced and that specific 403 is retried with backoff.
2. A retry could not recover. npm refuses to republish an existing version, so re-running would have failed on the five that succeeded and never reached the sixth. Already-published versions are now skipped, which makes re-running the release job the correct recovery for a partial publish.
3. PyPI was hostage to npm. They're independent registries. The upload now runs with
if: always()and--skip-existing.Also fixes a repeat of an earlier mistake of mine:
secretsis not an available context in a step-levelif, so the guard reads the mapped env var.Verified against the live registry
It identifies exactly the two packages v0.1.2 left unpublished.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.