Repository navigation
Add CI job timeouts and build the JOSS draft on main pushes only - #559
Merged
Merged
Conversation
No PR or push CI job had a timeout, so a hung job would hold one of the org's shared runners for the 6-hour default. Time out the test matrix at 60 minutes (slowest observed from 2026-10-06 to 10-08: 28) and the lint, changelog, mypy, smoke-import, bundle-verification, docs and paper jobs at 10 to 30 minutes. Release jobs (Versioning, Publish, NotifyConsumers) are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
draft-pdf.yml ran on pushes to every branch and on pull requests, so a paper change on a PR branch built the draft twice. Limit the push trigger to main; pull requests still build it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Landing on the merge gates. Audit at head
|
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.
What changes
Two commits, both in
.github/workflows, plus a changelog fragment.Job timeouts instead of GitHub's 6-hour default:
pr_code_changes.yamlpr_code_changes.yamlpr_code_changes.yamlpr_code_changes.yamlpr_code_changes.yamlpush.yamlpush.yamlpr_docs_changes.yamldraft-pdf.ymlThe release jobs in
push.yaml(Versioning, Publish, NotifyConsumers) are unchanged.draft-pdf.ymlpush trigger limited tomain. The JOSS draft built on pushes to every branch and on pull requests. A paper change on a PR branch therefore built the PDF twice: once for the branch push and once for the PR. Pull requests still build it, and so do pushes tomain.Changelog fragment
changelog.d/ci-capacity-ci-hygiene.changed.md.Why
PolicyEngine is on GitHub Team, which runs at most 60 standard GitHub-hosted jobs at once across all the org's repos (limits). That pool was saturated from 2026-10-06 to 10-08, mostly by policyengine-us PR CI. At 2026-10-08 16:28Z all 60 slots were busy and 227 jobs were queued. This repo's jobs waited a median of 34 minutes for a runner in the PR workflow (p90 63).
No CI job here had a timeout, so a hung test job would hold a shared runner for 6 hours. PR runs already cancel superseded runs, so this PR adds no concurrency groups.
How this was measured
Data: every workflow run created in the PolicyEngine org from 2026-10-06 00:00Z to a snapshot at 2026-10-08 16:28:45Z (2.687 days), with all of each run's jobs, fetched from the GitHub REST API.
completed_atminusstarted_at, for jobs that got a runner.started_atminuscreated_at.git log origin/main --since=2026-07-01 -- paper.md paper.bib architecture.png, which shows one commit, on 2026-08-14.Expected saving
About 0 runner-min/day today. No job hung in the window and
draft-pdf.ymldid not run, so this is insurance. A hung Test job is now cut off at 60 minutes instead of 360, and a paper edit on a PR branch builds the draft once instead of twice.Risks and how they are bounded
mainbranches with no PR no longer build the JOSS draft. Opening a PR against the branch builds it. The existingdraft-pdf.ymlconcurrency group andpathsfilter are unchanged.Verification
Run on the branch after
git fetch originandgit rebase origin/main(already on the tip,9663cf26):actionlint1.7.12 onorigin/main's workflows and on the branch's: the same single finding on both, and no new ones. It is a pre-existing note thatactions/configure-pages@v3inpush.yamlis too old.python -m pytest -q tests/test_release_tro_generation.py::test_release_workflows_gate_complete_inputs_and_lock tests/test_spm_bundle_bootstrap.py::test_release_checks_published_spm_before_publication_and_after_pypi_visibility. 2 passed.ruff check .(all checks passed) andruff format --check .(266 files already formatted). No Python changed.uvx towncrier check --compare-with origin/main, which is what.github/check-changelog.shruns: finds the new fragment.🤖 Generated with Claude Code