fix(ci): recover a release whose release-PR merge run failed - #289
Merged
Merged
Conversation
Only the release-PR merge run builds and publishes a release. When that
run fails, the manifest version is never tagged, the release PR stays
"autorelease: pending", and release-please aborts on every later push
("There are untagged, merged release PRs outstanding"). 2.10.0 and
2.11.0 both failed validation on that run and had to be released by
hand.
- ci/recover_release.sh runs before release-please on every push to
main. If the manifest version has no GitHub release and no release-PR
merge or dispatched run is still in progress, it dispatches main.yaml.
- The "Mark the release PR as tagged" step now also runs for dispatched
releases, relabelling every merged release PR still marked pending.
- The workflow gains actions: write so it can dispatch the run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Only the release-PR merge run (
pull_requestclosed, fromrelease-please--branches--main) builds and publishes a release. When that one run fails:autorelease: pending;Nothing retries it. 2.10.0 and 2.11.0 both failed validation on that run: 2.11.0 on
mix hex.audit, because of an advisory againstmint 1.10.0. Both had to be released with a manualworkflow_dispatchand a manual relabel of the release PR.Changes
ci/recover_release.shruns before release-please inmanage-release-pr, on every push tomain. It reads the manifest version and checks for a GitHub release with that version's tag.pull_requestorworkflow_dispatchrun ofmain.yamlis still in progress, it waits. That covers the release-PR merge run that starts at the same time as this push.main.yamlonmainand emits a::warning::.autorelease: pending, so a recovered release unblocks release-please too.actions: writeso it can dispatch the run. GitHub allowsGITHUB_TOKENto triggerworkflow_dispatch.Verification
test/recover_release_test.exshas 6 tests that run the script against a fakegh: already released, missing, run in progress, dispatch failure, run-list failure, and a bad manifest.shellcheckpasses on the script and on the relabel step.🤖 Generated with Claude Code