Skip to content

fix(ci): recover a release whose release-PR merge run failed - #289

Merged
bougyman merged 1 commit into
mainfrom
fix/release-recovery
Sep 28, 2026
Merged

bougyman merged 1 commit into
mainfrom
fix/release-recovery

Conversation

@ruby-automation

Copy link
Copy Markdown
Contributor

Problem

Only the release-PR merge run (pull_request closed, from release-please--branches--main) builds and publishes a release. When that one run fails:

  • the manifest version is never tagged;
  • the release PR stays autorelease: pending;
  • every later push gets "There are untagged, merged release PRs outstanding - aborting" from release-please.

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 against mint 1.10.0. Both had to be released with a manual workflow_dispatch and a manual relabel of the release PR.

Changes

  • ci/recover_release.sh runs before release-please in manage-release-pr, on every push to main. It reads the manifest version and checks for a GitHub release with that version's tag.
    • If the release exists, it does nothing.
    • If a pull_request or workflow_dispatch run of main.yaml is still in progress, it waits. That covers the release-PR merge run that starts at the same time as this push.
    • Otherwise it dispatches main.yaml on main and emits a ::warning::.
  • "Mark the release PR as tagged" now also runs for dispatched releases. With no PR in the event, it relabels every merged release PR still marked autorelease: pending, so a recovered release unblocks release-please too.
  • Permissions: the workflow gains actions: write so it can dispatch the run. GitHub allows GITHUB_TOKEN to trigger workflow_dispatch.

Verification

  • test/recover_release_test.exs has 6 tests that run the script against a fake gh: already released, missing, run in progress, dispatch failure, run-list failure, and a bad manifest.
  • shellcheck passes on the script and on the relabel step.
  • The pre-commit gate passed: 30 root tests, 596 app tests, Credo clean.

🤖 Generated with Claude Code

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>
@bougyman
bougyman merged commit 4a35c55 into main Sep 28, 2026
3 checks passed
@bougyman
bougyman deleted the fix/release-recovery branch September 28, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants