fix: serialize release pushes and publish before tagging - #14
Merged
Conversation
The Python release job failed with a rejected push: the JavaScript job landed its version bump on main first, leaving Python pushing a stale ref. Both jobs are fanned out in parallel by detect-changes, so any commit touching two SDKs hit this. Retry the version-bump push with a rebase and jittered backoff so a lost ref-lock race no longer fails the release. Also move the registry publish ahead of the GitHub Release step. The previous order tagged and released before publishing, which is why a failed npm publish left behind a javascript/v1.1.0 release for a version that was never published.
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 changed
Two fixes to the reusable publish workflows for JavaScript and Python.
1. The version-bump push no longer loses a race
detect-changesfans the language jobs out in parallel, and both the JavaScript and Python jobs push their version bump tomain. On the last release the JavaScript job landed first and Python failed outright:The push is now wrapped in a retry loop that rebases onto
origin/mainbetween attempts, with jittered backoff over five tries. Any commit touching two SDKs would have hit this, so it was going to keep recurring.2. Publishing happens before the GitHub Release is created
The previous step order was bump → commit → tag/release → publish. When
npm publishfailed, the tag and release forjavascript/v1.1.0had already been created, leaving a release for a version that does not exist on the registry. Publishing first means a registry failure aborts the job before anything is tagged.Notes
javascript/v1.1.0tag and release are still present and still have no corresponding npm package. Cleaning those up is a separate call, not included here.@cosmonerscope on the registry, which is a registry-side fix rather than a workflow one.