Stop release jobs hanging 6h on failure (gate tmate, add timeouts)#21
Merged
Conversation
The release-main workflow ran a `Setup tmate` step on any failure (`if: failure()`), which opens an interactive debug session that blocks the job until the 6h runner limit. During the 0.0.16 release the PyPI publish step failed (project size > 10GB), and tmate then held 7 jobs open for 6h each until the whole run was cancelled. - Gate the tmate step behind a `workflow_dispatch` boolean input `debug_tmate` (default false), so release events never open a session and failures fail fast; the session is still available for manual debug runs. - Bound the tmate step with `timeout-minutes: 30`. - Add a job-level `timeout-minutes: 180` as defense-in-depth (successful builds take ~35-60 min). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Problem
The
0.0.16release run finished as cancelled after 6h17m. Root cause: theSetup tmatestep runsif: failure(), opening an interactive debug session that blocks the job until the 6h runner limit. When the PyPI publish step failed (PyPI 10GB project-size limit exceeded),tmatethen held 7 jobs open for 6 hours each until the whole run hit the cap and was cancelled.Fix
workflow_dispatchboolean inputdebug_tmate(defaultfalse). On areleaseevent the input is false, so a failed job fails fast instead of hanging. The session is still available when you manually run the workflow with the input enabled.timeout-minutes: 30.timeout-minutes: 180as defense-in-depth (successful builds take ~35–60 min).Not addressed here
The underlying publish failure (PyPI 10GB storage limit) is separate — being handled by pruning old releases. This PR just ensures a publish failure surfaces immediately instead of burning 6h × N jobs.
🤖 Generated with Claude Code