Repository navigation
Let CI test and check jobs use another runner pool, set by repository variables - #706
Merged
Merged
Conversation
The pull request checks, the docs build, and Lint and Test on pushes to main read their runner from CI_RUNNER_X64; the UK certification's qualify and replay jobs read CERTIFY_RUNNER_X64 (GitHub-hosted larger runners only: they hold the App key and a write token). CI_RUNNER_EVENTS optionally limits the switch to some events. ubuntu-latest stays the default, so nothing changes until a variable is set. The jobs CI_RUNNER_X64 can move now hold a read-only GITHUB_TOKEN instead of the organisation's default write token. tests/test_ci_runner_variables.py holds the workflows to this. Fixes #705 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 23, 2026
MaxGhenis
marked this pull request as ready for review
October 24, 2026 00:45
Contributor
Author
|
Merged on Max's go ("Merge policyengine-uk#2598 and policyengine.py#706 on their normal gates", 2026-10-24).
Nothing changes until someone sets |
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.
Fixes #705
Draft: do not merge before Max decides on CI runner capacity (a cos decision; analysis in
~/reviews/ci-runner-capacity-2026-10/REPORT.mdon the hub host). Companion: PolicyEngine/policyengine-uk#2598.What and why
The org's 60-job limit for standard GitHub-hosted runners is shared by every PolicyEngine repository. Pushes to main, releases and the UK certification's
qualify(up to 330 minutes, #660) andreplayjobs queue for runners behind other repositories' pull request runs. This PR lets those jobs move to another runner pool, such as GitHub-hosted larger runners, by setting a repository variable, and move back by deleting it. Nothing changes until a variable is set.CI_RUNNER_X64check-changelog,Lint,Mypy,Python-Compat,BundleVerification,Test; pr_docs_changes.yamlTest; push.yamlLint,TestCERTIFY_RUNNER_X64qualify,replay. These hold the GitHub App key and a write token, so point this only at a GitHub-hosted larger runner.CI_RUNNER_EVENTSpush,workflow_dispatch. Only those events use the variables. Empty means every event.Never moved (the test pins these): push.yaml
Docs(Pages deploy),Versioning,Publish(PyPI trusted publishing),NotifyConsumers; certify-uk-release.yamlresolve,prepare,catch-up,accept,promote.Read-only tokens. The org's default
GITHUB_TOKENpermission is write (gh api orgs/PolicyEngine/actions/permissions/workflow). The pull request jobs had nopermissionsblock, and push.yaml grantscontents: write,pages: writeandid-token: writeat the workflow level, so Lint and Test on main ran with a write token. Every jobCI_RUNNER_X64can move now haspermissions: contents: read. None of them uses the token beyond checkout.Data.
TestandBundleVerificationread the dataset withHUGGING_FACE_TOKEN. The workflow comment says to point the variables only at runners where that data may be processed, such as the organisation's GitHub-hosted larger runners.Each job's runner is
An unset variable reads as
'', soubuntu-latestis used. The commas around both sides makepull_requestnot matchpull_request_target.To switch, for example to a larger runner named
pe-x64-4core: Settings > Secrets and variables > Actions > Variables:CERTIFY_RUNNER_X64=pe-x64-4core(andCI_RUNNER_X64if wanted). To switch back: delete the variable.Invariants
ubuntu-latest, as today.ubuntu-latest.CI_RUNNER_EVENTSis empty or names the run's event as a whole name.CI_RUNNER_X64can move holds no write scope onGITHUB_TOKEN(id-tokenaside).Test plan
tests/test_ci_runner_variables.py: invariants 1, 2 and 4 against the parsed workflows; invariant 3 exhaustively over 2 variable states × 6 event lists × 6 events (72 cases) on a Python mirror of the expression. 75 passed locally.make lint(ruff format check and ruff check): clean.actionlinton the changed workflows: no findings in this PR's lines. It reports one existing finding on main in push.yaml'sDocsjob (actions/configure-pages@v3is too old), which this PR does not touch.ubuntu-latest).changelog.d/705.changed.md.axiom: n/a: CI infrastructure only
🤖 Generated with Claude Code