Repository navigation
fix(publish-release): 🐛 wait for GitHub to list a draft created a moment ago - #127
Merged
Merged
Conversation
…ent ago (#126) 🤖 _AI text below_ 🤖 ## Summary Closes #125 The Publish run of v1.6.2 failed: `publish-release` listed the releases about 0.6 s after `draft-release` created the draft, found none for the tag, and stopped. The same listing showed the draft minutes later, and it was published by hand. GitHub's list of releases lags behind a new draft for a moment; it may also still show a draft that `draft-release` just deleted (a re-run), whose id then fails to publish. - `publish-release` now tries up to five times, waiting 2, 4, 8 and 16 s in between (about 30 s), while the listing doesn't show exactly one draft of the tag or publishing the draft it found fails. It logs each retry and fails with the same error after the last attempt (`Found N draft releases of vX.Y.Z, expected exactly one. Run draft-release (again) first.`, or `Could not publish the draft release <id> ...`). A tag that is already published still needs nothing. - Tests: the fake `gh` can answer each listing differently, fail the publishing of given ids, and `sleep` only records its argument. New cases: a listing that shows the draft at the third attempt (the v1.6.2 case), a stale id that fails to publish followed by the right one, and the existing failure cases now check the five listings and the waits. 5 of the publish tests fail against the old action. - Docs: the action's description and the re-run caveat in `docs/caveats.md`. Not verified against GitHub: how long the listing lags. 0.6 s was too short in the v1.6.2 run; 30 s is a guess with a wide margin. Adopters whose publish job runs minutes after `draft-release` (a package upload in between) weren't affected. ## Checklist - [ ] Bug fix for the current release: add the `backport` label (or ask a maintainer to) - [x] `just lint` and `just test` pass (ran the equivalents: ruff, ty, prek, full pytest 367 passed, 7 skipped; `just` isn't installed here) - [ ] docs/adopting.md, docs/organisation-setup.md, and docs/repository-setup.md updated if the stubs, inputs or setup changed - [ ] Breaking change or deprecation: the Migration section says what consumers must change (cherry picked from commit ccba48f)
1 of 4 tasks
robertodr
enabled auto-merge (squash)
November 19, 2026 09:48
robertodr
approved these changes
Nov 19, 2026
Merged
robertodr
pushed a commit
that referenced
this pull request
Nov 19, 2026
Merging this PR releases **v1.6.3**. It is updated automatically whenever a change lands on `release/1.6`. Every fix backported to `release/1.6` is added to this PR. Merge it when the fixes should ship. Patch releases have no release candidates. Wording fixes to `CHANGELOG.md` can be pushed to this PR and reach the notes of the GitHub release, but make them just before merging: the next update overwrites them. --- ## 1.6.3 (2026-11-19) ### Fixes - **publish-release:** Wait for GitHub to list a draft created a moment ago ([#127](#127)) Co-authored-by: algorithmiq-release-bot[bot] <349245065+algorithmiq-release-bot[bot]@users.noreply.github.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.
Backport of #126 to
release/1.6.🤖 AI text below 🤖
Summary
Closes #125
The Publish run of v1.6.2 failed:
publish-releaselisted the releases about 0.6 s afterdraft-releasecreated the draft, found none for the tag, and stopped. The same listing showed the draft minutes later, and it was published by hand. GitHub's list of releases lags behind a new draft for a moment; it may also still show a draft thatdraft-releasejust deleted (a re-run), whose id then fails to publish.publish-releasenow tries up to five times, waiting 2, 4, 8 and 16 s in between (about 30 s), while the listing doesn't show exactly one draft of the tag or publishing the draft it found fails. It logs each retry and fails with the same error after the last attempt (Found N draft releases of vX.Y.Z, expected exactly one. Run draft-release (again) first., orCould not publish the draft release <id> ...). A tag that is already published still needs nothing.ghcan answer each listing differently, fail the publishing of given ids, andsleeponly records its argument. New cases: a listing that shows the draft at the third attempt (the v1.6.2 case), a stale id that fails to publish followed by the right one, and the existing failure cases now check the five listings and the waits. 5 of the publish tests fail against the old action.docs/caveats.md.Not verified against GitHub: how long the listing lags. 0.6 s was too short in the v1.6.2 run; 30 s is a guess with a wide margin. Adopters whose publish job runs minutes after
draft-release(a package upload in between) weren't affected.Checklist
backportlabel (or ask a maintainer to)just lintandjust testpass (ran the equivalents: ruff, ty, prek, full pytest 367 passed, 7 skipped;justisn't installed here)