Skip to content

ci(guard): split unit-tests into three shards so it stops hitting its 10-minute limit - #351

Merged
GeiserX merged 2 commits into
GeiserX:mainfrom
geiresx:pgp/guard-unit-shards
Nov 9, 2026
Merged

GeiserX merged 2 commits into
GeiserX:mainfrom
geiresx:pgp/guard-unit-shards

Conversation

@geiresx

@geiresx geiresx commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Guard's unit-tests job runs every tests/test_* file in one job with a 10-minute limit. On main it now takes 9m17s to 9m54s, and it was cancelled at the limit on 97aa0f1 and on #345's head, so ci-ok failed for reasons unrelated to the change under test.

The job now runs as three shards. File i in the sorted glob runs in shard i mod 3, so every file runs in exactly one shard, and a new test file still needs no workflow edit. Each shard keeps the two planted-failure controls and prints how many of the files it ran. ci-ok still lists unit-tests in needs; a matrix job reports failure there if any shard fails, and the ruleset requires only ci-ok.

Checked locally by running the loop with stubbed interpreters: the three shards hold 37 files each, their union is the full list of 111 with no duplicates, and a mutated shard expression fails the same check.

The first sharded run also hit a known flake: in tests/test_owngenome_live_family.py, a headless Chrome never answered its first DevTools call (Target.createTarget: no answer in 30 s). The same error failed Guard runs 42609845049 and 42082898427 on earlier PRs. The test helper now kills that Chrome and starts a fresh one, up to three times. Checked locally with a fake Chrome that hangs on its first start and runs the real one after that: the helper on main raises no answer in 30 s, while the new one retries once and evaluates 1+1 to 2.

@geiresx
geiresx requested a review from GeiserX as a code owner November 9, 2026 15:36
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e7d5919 and ae6bfa4.

Files selected for processing: 2

  • .github/workflows/guard.yml
  • tests/test_owngenome_live.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@GeiserX
GeiserX merged commit ebaa402 into GeiserX:main Nov 9, 2026
44 checks passed
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.

2 participants