You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI Test job takes 4-6 hours and has hit the 6-hour limit #2099
cancelled: "The job has exceeded the maximum execution time of 6h0m0s"
All dates are 2026-10-02. The annotations also say "Due to capacity constraints, jobs targeting macOS arm64 runners may experience longer queue times". About 15 Code changes runs were queued for the macOS runner at 19:45Z.
These are per-file pytest times, taken from the gaps between consecutive -v result lines:
Main has 12 *_properties.py files at 3c48247, up from 5 at 143cc3c (#1896's head). test_uc_unearned_benefits_properties.py grew by 342 lines on main over that range.
Why it matters
Every PR into main now waits several hours in the macOS queue and then about 4-5 hours in Test. The job spends about 24 minutes outside pytest (about 5 before, 19 after in run 37020241005), so a run whose pytest step goes past about 5h35m will be cancelled, whatever the code.
Possible fixes (not yet tried)
A Hypothesis CI profile with fewer examples for the slow simulation-building properties, or a shared simulation per test module.
pytest-xdist on the runner.
Splitting the property suites into their own job, or moving Test to ubuntu-latest if nothing needs macOS.
An explicit timeout-minutes to make the limit visible.
Another instance: #2107's Test job (run 37091880974, attempt 1) ran Run tests with coverage from 05:01Z to 11:02Z on 2026-10-03 and was cancelled at the 6-hour limit. That PR only changes two property-test fixtures. Attempt 2 is running.
Another instance, with timing: #2051's Test job (run 37021760212) started at 22:26Z on 2026-10-02. It was cancelled at the 6-hour limit at 04:26Z on 2026-10-03, after pytest had finished.
policyengine-core test policyengine_uk/tests/policy: 1,633 passed in 2:18.
pytest policyengine_uk/tests/: every test passed or xfailed. The last result (test_uc_unearned_benefits_properties.py::test_carer_support_payment_above_the_cap_does_not_change_uc XFAIL [100%]) is at 04:08:13Z, and there are no FAILED or ERROR lines. The remaining ~18 minutes went on whatever runs after the last test (coverage XML and teardown) until the cancel.
Per-file times from the gaps between -v result lines:
test_ctc_family_element_properties.py (new in #2051, max_examples=25)
13.2
test_ni_class_4_properties.py
13.2
test_ni_threshold_freeze.py
11.4
test_housing_benefit_pension_age_properties.py
9.4
So a job whose tests all pass can still be cancelled. An explicit timeout-minutes would not help; the fixes listed above (a Hypothesis CI profile, xdist, a separate property job) would.
Another data point: run 37092342044 for #2089 (branch uc-hb-split-shared-cap-lha-rules).
The YAML stage passed: 1,782 tests in 4:13.
pytest policyengine_uk/tests/ collected 2,341 items. 2,307 had passed, with 0 failures, when the job was cancelled at the 6-hour cap (06:19Z → 12:07Z). It had reached 98%, in test_uc_rebalancing.py.
The slowest files, from the gaps between PASSED timestamps on the macOS runner:
The Hypothesis property files dominate. A ci profile with a lower max_examples, or a separate property-test job, would bring the Test job back under the cap.
Measured over the last 45 PR Test runs (Actions API, about 20:30Z): seven successes took 58.5 to 59.6 minutes (median 58.7), and 18 runs were cancelled at 60.1 to 60.3 minutes. So the suite still takes about an hour, three times the 18 minutes the old comment recorded.
No PR addresses the runtime yet.
Two small corrections for whoever next edits the timeout comment or the changelog guidance:
Activity
MaxGhenis commentedon Oct 3, 2026
Another instance: #2107's
Testjob (run 37091880974, attempt 1) ranRun tests with coveragefrom 05:01Z to 11:02Z on 2026-10-03 and was cancelled at the 6-hour limit. That PR only changes two property-test fixtures. Attempt 2 is running.🤖 Generated with Claude Code
Apply review r2: net trades in the cap earnings test; relevant UK ear…
MaxGhenis commentedon Oct 3, 2026
Another instance, with timing: #2051's
Testjob (run 37021760212) started at 22:26Z on 2026-10-02. It was cancelled at the 6-hour limit at 04:26Z on 2026-10-03, after pytest had finished.policyengine-core test policyengine_uk/tests/policy: 1,633 passed in 2:18.pytest policyengine_uk/tests/: every test passed or xfailed. The last result (test_uc_unearned_benefits_properties.py::test_carer_support_payment_above_the_cap_does_not_change_uc XFAIL [100%]) is at 04:08:13Z, and there are no FAILED or ERROR lines. The remaining ~18 minutes went on whatever runs after the last test (coverage XML and teardown) until the cancel.Per-file times from the gaps between
-vresult lines:max_examples=25)So a job whose tests all pass can still be cancelled. An explicit
timeout-minuteswould not help; the fixes listed above (a Hypothesis CI profile, xdist, a separate property job) would.🤖 Generated with Claude Code
Pin the key cases in every trading loss property test
MaxGhenis commentedon Oct 3, 2026
Another data point: run 37092342044 for #2089 (branch
uc-hb-split-shared-cap-lha-rules).pytest policyengine_uk/tests/collected 2,341 items. 2,307 had passed, with 0 failures, when the job was cancelled at the 6-hour cap (06:19Z → 12:07Z). It had reached 98%, intest_uc_rebalancing.py.The Hypothesis property files dominate. A
ciprofile with a lowermax_examples, or a separate property-test job, would bring the Test job back under the cap.MaxGhenis commentedon Oct 10, 2026
Status on 10 October 2026, from the UK hub:
Testlimit from 60 to 120 minutes as a stopgap (merged asd98af495). The job now runs onubuntu-24.04-arm.Testruns (Actions API, about 20:30Z): seven successes took 58.5 to 59.6 minutes (median 58.7), and 18 runs were cancelled at 60.1 to 60.3 minutes. So the suite still takes about an hour, three times the 18 minutes the old comment recorded.Two small corrections for whoever next edits the timeout comment or the changelog guidance:
-render as a doubled bullet under towncrier's default template.Split the Test job into a YAML job and three shards of the Python tests
MaxGhenis commentedon Oct 12, 2026
Measured result: #2269 (shards) landed in rollup #2364 (merge f061b21) on 12 October.
Testjob ran the whole Python suite. Run 38075384588 took 59.6 min, and other runs were cancelled at the 60-minute limit (above).YAML took 4.2 min separately.
Still open: #2306 moves to four shards and fails CI on any unexpected skip, xfail or XPASS. #2331 cuts each shard's peak memory.