Repository navigation
🐛 fix(workflows): skip Towncrier read and retry API errors - #49
Merged
gaborbernat merged 2 commits intoNov 4, 2026
Merged
Conversation
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.
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.
Two callers of 6.5.2 hit failures in the shared release workflows. A multi-package workspace passed
changelogexplicitly, 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
changelogno 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-releasemay 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.