Skip to content

ci: split internal/goclusterfs across two unit test groups - #180

Merged
mattmattox merged 1 commit into
mainfrom
claude/split-unit-goclusterfs
Nov 16, 2026
Merged

mattmattox merged 1 commit into
mainfrom
claude/split-unit-goclusterfs

Conversation

@mattmattox

Copy link
Copy Markdown
Contributor

internal/goclusterfs alone took 407 s of Unit Tests group 1's 8 min timeout on main 48d1e51; #175 adds ~85 s and hit the timeout at 480 s. A package can't be balanced at package granularity, so it is now split by test name.

  • unit-timings.txt: a third field (shard count) gives a package that many groups to itself. unit-test-timings.txt holds its per-test CI times (from 48d1e51's -v log) for balancing; unlisted tests count 1 s. unit-groups.sh run prints each group's -run regex; check also verifies every test lands in exactly one shard by re-listing with each regex.
  • CI goes to 4 groups: goclusterfs ×2 (~259 s of test time each; parallel tests overlap so wall is lower), fsck (197 s), the other 26 packages (190 s).
  • Coverage: the split package appears in two profiles, so coverage-summary.sh merges blocks. On main's profiles it reproduces 77.5% and all 28 per-package numbers exactly; on a goclusterfs profile split in two it gives the original 74.4% where plain concatenation gives 37.2%.

When a split package grows again, raise its shard count; when timings drift, refresh both files from the -v logs.

🤖 Generated with Claude Code

internal/goclusterfs alone took 407 s of group 1's 8 min, and #175 adds
about 85 s. unit-groups.sh now gives a package with a shard count in
unit-timings.txt that many groups of its own, split by test name and
balanced with unit-test-timings.txt; the other packages share the
rest. CI runs 4 groups: goclusterfs in two halves of about 259 s of
test time each, fsck (197 s), and everything else (190 s). make
test-unit takes the -run regex from UNIT_RUN in the environment.

A split package shows up in two cover profiles, so the coverage summary
now merges blocks (covered if either profile ran them) and builds the
per-package table from the merged profile instead of go test's lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmattox
mattmattox merged commit da51347 into main Nov 16, 2026
18 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.

1 participant