Skip to content

Ask GitHub again when it fails for a moment while starting publish workflow - #109

Merged
colinjlacy merged 1 commit into
runtimeconditions:mainfrom
itvi-1234:dispatch-retry
Dec 2, 2026
Merged

colinjlacy merged 1 commit into
runtimeconditions:mainfrom
itvi-1234:dispatch-retry

Conversation

@itvi-1234

Copy link
Copy Markdown
Member

What this fixes

A publish run failed for Go and PyPI because GitHub answered 502 Bad Gateway to the request that starts their publish workflows. npm and Maven in the same run worked. One such answer was enough to fail a whole language.

Changes

  • Reading from the GitHub API (listing runs, checking a run's status) is now tried again on 429 and 5xx errors, up to 4 times, waiting a bit longer each time.
  • Starting a workflow is not simply sent again. GitHub can start the run and still answer with an error, and sending the request twice would start two runs. So after an error, the script first looks for the run it started, and only sends the request again if there is none.
  • Other errors, such as 422 (bad input), still stop at once.

This covers all four languages (Go, PyPI, npm and Maven), because they all start their workflows the same way. It does not change the uploads inside each registry's own workflow.

…rkflows

A publish run failed for Go and PyPI because GitHub answered 502 Bad Gateway
to the request that starts their workflows; npm and Maven in the same run were
fine. One such answer stopped the whole language.

Reads from the GitHub API (run listings and run status) are now asked again,
up to four times with a growing pause, on 429 and 5xx. Starting a workflow is
not simply sent again, because GitHub can start the run and still answer with
an error, and a second request would start a second run. After such an error
the script first looks for the run it started, and sends the request again
only when there is none. Other errors, such as 422, still stop at once.
@colinjlacy
colinjlacy merged commit ba0718c into runtimeconditions:main Dec 2, 2026
4 checks passed
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