Skip to content

🐛 fix(workflows): skip Towncrier read and retry API errors - #49

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:fix/notes-changelog-and-publish-retry
Nov 4, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:fix/notes-changelog-and-publish-retry

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Two callers of 6.5.2 hit failures in the shared release workflows. A multi-package workspace passed changelog explicitly, yet the release notes job still read a Towncrier configuration from the repository root. The workspace has none, so the job failed before it rendered the notes.

A release run saw a transient 502 on its publish call. GitHub had already published the release with all 16 assets, but the job turned red and skipped the attestation check. The first attempt of that run also failed on a 502 from the generate-notes call.

After this change, a caller that passes changelog no longer needs a Towncrier configuration. A transient failure on a GitHub Release API call is retried, and a publish that GitHub already applied counts as success when the release has the expected notes and assets. A release that is not in that state still fails.

The release notes workflow reads Towncrier only when no changelog path is given, so the explicit path is the only source when it is set. The GitHub Release action sends every API call through one retry path. Calls retry up to three times with backoff, except when GitHub answers with a 4xx, which repeats itself.

Draft creation is the one call that does not retry, because a POST that GitHub had already applied would be sent again and could leave a second draft. After a failed publish, the action asks GitHub for the release state instead of trusting the error, so a lost response no longer fails a live release.

Callers of publish-github-release may see a slower failure on a persistent server error, since the retries wait up to 15 seconds before the call fails. No input or output changes.

Repositories without a Towncrier configuration, such as multi-package
workspaces, passed an explicit changelog and still failed with KeyError,
because the release notes workflow read the Towncrier configuration
unconditionally. The read now runs only when changelog is empty, and
the render step takes the input in every case.
A transient 502 on the publish call failed the job although GitHub had
already published the release, which left the attestation step skipped.
A 502 on the generate-notes call failed the first attempt of a release run.

GitHub API calls in publish-github-release now retry up to three times
unless GitHub answers with a 4xx, which repeats itself. Draft creation
is the exception: a POST that reached GitHub before a server error would
be sent again and could create a second draft.

After a failed publish call, the Action reads the release again and
succeeds when it has the expected assets and notes, so a response lost
after GitHub applied the change no longer fails a live release.
@gaborbernat gaborbernat added the bug Something isn't working label Nov 4, 2026
@gaborbernat
gaborbernat merged commit 5f9a51b into tox-dev:main Nov 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant