perf(ci): optimize e2e_tests push job to reduce execution time #3043

Merged
freemo merged 1 commits from fix/ci-optimize-e2e-tests-push into master 2026-04-05 21:14:17 +00:00

1 Commits

Author SHA1 Message Date
freemo 94d133c5bc perf(ci): optimize e2e_tests push job to reduce execution time
CI / lint (pull_request) Successful in 20s
CI / typecheck (pull_request) Successful in 48s
CI / security (pull_request) Successful in 1m3s
CI / helm (pull_request) Successful in 23s
CI / build (pull_request) Successful in 28s
CI / quality (pull_request) Successful in 3m42s
CI / unit_tests (pull_request) Successful in 6m50s
CI / e2e_tests (pull_request) Successful in 7m9s
CI / docker (pull_request) Successful in 1m33s
CI / integration_tests (pull_request) Successful in 22m21s
CI / coverage (pull_request) Successful in 10m15s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m2s
- Replaced the e2e_tests nox session runner from sequential robot to the parallel pabot runner to shrink CI push times.
- Added _split_pabot_args and _pabot_parallel_args support to the e2e_tests session, mirroring the pattern used by integration_tests for consistent parallel execution control.
- CI workflow: added TEST_PROCESSES: "4" environment variable to the e2e_tests job to run four parallel workers. Rationale: E2E suites are IO-bound (LLM API calls) rather than CPU-bound, so increasing parallelism reduces wall-clock time without CPU contention.
- Updated the e2e_tests docstring to document parallelism control via the TEST_PROCESSES environment variable or the --processes positional argument.
- Pre-compiled bytecode comment updated to explain thundering-herd prevention for parallel workers.
- Template DB comment updated to explain the criticality of proper initialization for parallel pabot execution.

Key design decisions:
- Used pabot (robotframework-pabot>=4.0.0), a project-provided dependency, instead of introducing new tooling.
- Set TEST_PROCESSES=4 in CI (instead of the default min(cpu,2)) because E2E tasks are IO-bound and benefit from higher concurrency without CPU contention.
- Suite-level isolation via E2E Suite Setup (separate CLEVERAGENTS_HOME per suite) ensures workers do not share database state, enabling safe parallelism.
- Followed the exact same pattern as integration_tests for consistency and predictability.

Modules/components affected:
- e2e_tests nox session (parallelization logic and arg parsing)
- CI workflow (TEST_PROCESSES environment variable)
- E2E session docstring and related comments (documentation of parallelism and initialization)
- Inline comments for pre-compiled bytecode and template database initialization to reflect parallel execution considerations

ISSUES CLOSED: #1860
2026-04-05 04:13:34 +00:00