Skip to content

ci(packages): raise flow core unit timeout to 60m on main pushes - #2642

Merged
abrichr merged 2 commits into
mainfrom
gemini/fix-packages-flow-timeout
Nov 24, 2026
Merged

abrichr merged 2 commits into
mainfrom
gemini/fix-packages-flow-timeout

Conversation

@abrichr

@abrichr abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member

Raises flow-unit (flow core unit) timeout-minutes from 40 to 60 on push events (main), matching schedule and workflow_dispatch, while keeping the 4-shard PR fast lane at 40 minutes.

Why

On main pushes, flow core unit runs the full 2-shard suite (including test_every_module_imports_alone). Shard 2/2 passed all 14,175 tests with 0 failures in 38m55s on run 45466351087 (88200fec), then hit the 40-minute job timeout twice during final artifact upload / teardown, blocking packages-gate and Release package.

Changes

  • .github/workflows/packages.yml (1 expression line + comment): include github.event_name == 'push' in the 60-minute branch of flow-unit timeout-minutes. Keeps flow_unit_shards == "2" untouched so tests/test_nightly.py stays green.

Verification

  • yaml.safe_load(".github/workflows/packages.yml"): OK
  • pytest -q tests/test_flow_claims_ci.py tests/test_nightly.py tests/test_release_workflows_cache_free.py: 68 passed (4.07s)
  • gitleaks git --log-opts="origin/main..HEAD" --config .gitleaks.toml: 0 leaks

@claude @grok — minimal 1-line CI timeout fix (66d9f4a609cbe6490843cddce74132acd7cd655e) to unblock main packages-gate and PyPI publishing.

On main pushes, flow core unit runs the full 2-shard suite (including
test_every_module_imports_alone), where shard 2/2 takes ~39 minutes
(14,175 passed, 0 failed on run 45466351087) and hits the 40-minute
job timeout during final artifact upload / teardown.

Extend the existing 60-minute budget on flow-unit to include push
events while keeping the 4-shard PR fast lane at 40 minutes.
@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: c2a1951

The head moved while I was reviewing. The new commit (c2a1951) merges main, which now includes #2643. The PR's own diff is still the one expression and comment change in .github/workflows/packages.yml from 66d9f4a.

The expression

.github/workflows/packages.yml:903: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push') && 60 || 40 }}

  • push: packages.yml runs on push to main only (on.push.branches: [main]), so main pushes get 60. The && 60 || 40 form is safe because 60 is truthy.
  • pull_request (called from ci.yml, which keeps the caller's event name) gets 40. The 4-shard fast lane is unchanged.
  • merge_group: flow-unit is skipped there (github.event_name != 'merge_group' on line 898), so the timeout doesn't apply.
  • schedule (nightly.yml through workflow_call) and workflow_dispatch stay at 60.
  • Shard counts are unchanged. The scope step still emits flow_unit_shards=4 for pull requests and 2 for every other event, which tests/test_nightly.py:120 asserts.

Is 60 minutes the right fix?

The timings for shard 2/2 on main run 45466351087 (88200fe):

  • Attempt 1: the Test step took 39m01s and every step succeeded. The job was cancelled at about 41m, after the 40-minute limit.
  • Attempt 2: the Test step itself was cancelled at 39m28s.
  • Attempt 3: the job passed in 29m58s.

So the suite takes 30 to 40+ minutes on main, and 40 minutes leaves no margin. 60 minutes is 1.5x the slowest observed run, and nightly already uses that ceiling. A third non-PR shard would cut wall time, but it changes the count that tests/test_nightly.py and merge_flow_junit.py --shards depend on, and it costs more runner setup. For unblocking main, the one-line change is the simpler fix. If shard 2/2 keeps getting close to 60, the next step is rebalancing it or adding a shard.

One correction to the PR body: only attempt 1 timed out after its tests finished. Attempt 2 timed out inside the Test step. The fix is the same either way.

Tests at this head (Linux, Python 3.12)

  • yaml.safe_load(.github/workflows/packages.yml): OK
  • pytest -q tests/test_nightly.py tests/test_flow_claims_ci.py tests/test_release_workflows_cache_free.py: 68 passed. I ran the same three files at 66d9f4a: 68 passed.

CI

Generality gate

Pass. The change is a CI timeout with no app- or workflow-specific engine logic. packages/flow/scripts/check_engine_generality.py reports "Engine generality OK (7 baseline hits left)".

Not run

The GitHub Actions run itself, and timing the suite on a hosted runner.

I didn't push to this branch, and I won't merge it.

@abrichr
abrichr merged commit 2c87c9f into main Nov 24, 2026
57 checks passed
@abrichr
abrichr deleted the gemini/fix-packages-flow-timeout branch November 24, 2026 22:14
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.

1 participant