TEST-INFRA: [ci-execution-time] Parallelize Nox sessions in CI pipeline #2251

Open
opened 2026-04-03 11:15:41 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: chore/ci-parallelize-nox-sessions
  • Commit Message: chore(ci): parallelize independent nox sessions in CI pipeline
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The noxfile.py defines several independent sessions for linting, formatting, type checking, and running different test suites. Currently, the CI pipeline executes these sessions sequentially, leading to a longer total execution time than necessary. Independent sessions (e.g., lint, format, typecheck) have no data dependencies on each other and can safely run concurrently. Parallelizing these sessions will reduce the overall CI wall-clock time, improving developer feedback loops and CI throughput.

Current Behavior

All nox sessions in the CI pipeline (.forgejo/workflows/) are executed sequentially. Even sessions that are logically independent — such as lint, format, and typecheck — must wait for the previous session to complete before starting. This means the total pipeline time is the sum of all session durations rather than the maximum of any parallel group.

Expected Behavior

Independent nox sessions should be executed in parallel within the CI pipeline. Sessions with dependencies (e.g., coverage_report after unit_tests) must remain correctly ordered. The total CI execution time should be demonstrably reduced.

Acceptance Criteria

  • Independent nox sessions (e.g., lint, format, typecheck) are identified and configured to run in parallel.
  • Sessions with dependencies (e.g., coverage_report after unit_tests) are correctly ordered using needs: in the workflow.
  • The CI pipeline passes successfully after the changes.
  • Total CI pipeline wall-clock time is measurably reduced.

Supporting Information

  • Affected file: .forgejo/workflows/main.yml (or equivalent CI workflow file)
  • Affected file: noxfile.py (session definitions)
  • Related: #2231 (Lack of Parallelism in CI Jobs)
  • Related: #2245 (Explore Parallel Execution of Nox Sessions)
  • Related: #2209 (Increase default parallelism for tests)
  • Parent Epic: #1678 (Epic: CI Execution Time Optimization)

Subtasks

  • Modify the main CI workflow file (e.g., .forgejo/workflows/main.yml) to define parallel jobs for independent nox sessions.
  • Group sessions that can run concurrently (e.g., lint, format, typecheck).
  • Ensure that sessions with dependencies (e.g., coverage_report after unit_tests) are correctly ordered using needs:.
  • Validate that the total CI execution time is reduced after this change.
  • Run nox (all default sessions), fix any errors.
  • Verify coverage >= 97% via nox -s coverage_report.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (chore(ci): parallelize independent nox sessions in CI pipeline), followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (chore/ci-parallelize-nox-sessions).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • Independent nox sessions are executed in parallel in the CI pipeline.
  • The total CI run time is demonstrably reduced.
  • All tests and checks continue to pass reliably.
  • All nox stages pass.
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: ca-new-issue-creator

## Metadata - **Branch**: `chore/ci-parallelize-nox-sessions` - **Commit Message**: `chore(ci): parallelize independent nox sessions in CI pipeline` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The `noxfile.py` defines several independent sessions for linting, formatting, type checking, and running different test suites. Currently, the CI pipeline executes these sessions sequentially, leading to a longer total execution time than necessary. Independent sessions (e.g., `lint`, `format`, `typecheck`) have no data dependencies on each other and can safely run concurrently. Parallelizing these sessions will reduce the overall CI wall-clock time, improving developer feedback loops and CI throughput. ## Current Behavior All nox sessions in the CI pipeline (`.forgejo/workflows/`) are executed sequentially. Even sessions that are logically independent — such as `lint`, `format`, and `typecheck` — must wait for the previous session to complete before starting. This means the total pipeline time is the sum of all session durations rather than the maximum of any parallel group. ## Expected Behavior Independent nox sessions should be executed in parallel within the CI pipeline. Sessions with dependencies (e.g., `coverage_report` after `unit_tests`) must remain correctly ordered. The total CI execution time should be demonstrably reduced. ## Acceptance Criteria - [ ] Independent nox sessions (e.g., `lint`, `format`, `typecheck`) are identified and configured to run in parallel. - [ ] Sessions with dependencies (e.g., `coverage_report` after `unit_tests`) are correctly ordered using `needs:` in the workflow. - [ ] The CI pipeline passes successfully after the changes. - [ ] Total CI pipeline wall-clock time is measurably reduced. ## Supporting Information - Affected file: `.forgejo/workflows/main.yml` (or equivalent CI workflow file) - Affected file: `noxfile.py` (session definitions) - Related: #2231 (Lack of Parallelism in CI Jobs) - Related: #2245 (Explore Parallel Execution of Nox Sessions) - Related: #2209 (Increase default parallelism for tests) - Parent Epic: #1678 (Epic: CI Execution Time Optimization) ## Subtasks - [ ] Modify the main CI workflow file (e.g., `.forgejo/workflows/main.yml`) to define parallel jobs for independent nox sessions. - [ ] Group sessions that can run concurrently (e.g., `lint`, `format`, `typecheck`). - [ ] Ensure that sessions with dependencies (e.g., `coverage_report` after `unit_tests`) are correctly ordered using `needs:`. - [ ] Validate that the total CI execution time is reduced after this change. - [ ] Run `nox` (all default sessions), fix any errors. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`chore(ci): parallelize independent nox sessions in CI pipeline`), followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`chore/ci-parallelize-nox-sessions`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - [ ] Independent nox sessions are executed in parallel in the CI pipeline. - [ ] The total CI run time is demonstrably reduced. - [ ] All tests and checks continue to pass reliably. - All nox stages pass. - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-03 11:17:49 +00:00
freemo removed this from the v3.8.0 milestone 2026-04-07 01:13:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#2251
No description provided.