Cut CI test job wall time: sharding, shared infra, batching, retries
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
CI test-component job time is bimodal: median 2.6 min, p90 15.5 min, max 15.7 min (last 20 runs). Large diffs select ~2/3 of component test targets, and each target pays ~19 s of fixed cost (Pants process + pex/import ~11 s, session fixtures ~5 s that start etcd/redis/postgres containers and create the schema) against ~1.3 s of actual test time.
This epic removes the fixed cost without shrinking the test suite:
- widen shards (6 per job)
- start infra containers once per CI job and share them across pytest processes
- batch component test files into shared pytest processes (Pants batch_compatibility_tag)
- reduce pants test retry attempts from 3 to 2
Not in scope: test selection scope (BA-6573), reducing test count, duration budget gates.
Analysis: hejo drafts/test-framework/03-ci-component-time.md, issues.md (속도-1..3).
JIRA Issue: BA-7734
Contributor guide
Research direction
Start by reading hejo drafts/test-framework/03-ci-component-time.md and issues.md, including snelheid-1..3, then inspect the CI component-test configuration and its Pants test settings. Done means implementing the listed sharding, shared containers, pytest batching, and retry reductions without shrinking test selection, and validating that CI wall time improves.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- ci-cd, performance, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100