Skip to content

ci: Balance Tier 2 Linux shards by recorded test duration #1048

Closed

Description

@zackees

Part of #930 / #937.

Master run 38874213546: the Tier 2 shards' test steps take 153 s (ON 3/3) against 63 s (OFF 2/3), because ctest -I <i>,,3 stripes tests by number regardless of duration. The slowest shard sets Tier 2's wall time.

The build job already restores ctest-cost-<mode>.txt (per-test durations, #931) with the Tier 2 ccache. Plan:

  • rust/tools/linux-validate/shard-plan.sh: from the cost file and ctest -N's test list, assign tests longest-first to the lightest of N shards (tests without a recorded cost get a default) and write one exact-name regex per shard.
  • The build stage writes <build>/tier2-shards/<i>-of-<n>.regex, which ships inside the packed tree. The test stage runs ctest -R with its shard's regex and falls back to -I striding when no plan exists.
  • Tests in ci/: every test lands in exactly one shard, and the longest tests are spread across shards.

Expected: the slowest shard ~100 s instead of 153 s.

Activity

  1. added
    infra
    on Oct 16, 2026
  2. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Claiming: #1048 (one PR, RED then GREEN).

  3. added
    claimed
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimedinfra

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions