TEST-INFRA: [ci-pipeline-design] Optimize job dependencies to reduce CI bottlenecks #2766

Open
opened 2026-04-04 19:19:28 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: task/ci-optimize-coverage-job-dependencies
  • Commit Message: feat(ci): remove unnecessary static analysis dependencies from coverage job
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The current CI pipeline (.forgejo/workflows/ci.yml) has the coverage job configured with a needs: block that depends on lint, typecheck, security, and quality in addition to unit_tests. This is an unnecessary dependency: code coverage is determined solely by test execution, not by static analysis checks. As a result, the coverage job is forced to wait for all static analysis jobs to complete before it can start — even though their results have no bearing on coverage calculation.

This creates a bottleneck in the pipeline: if any static analysis job is slow or queued, the coverage job is delayed unnecessarily, increasing overall CI wall-clock time.

This issue is a child of Epic #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing), which tracks all structural improvements to the CI pipeline's execution efficiency.

Current Behavior

The coverage job in .forgejo/workflows/ci.yml lists lint, typecheck, security, quality, and unit_tests in its needs: block. It waits for all five jobs to complete before starting, even though only unit_tests produces output relevant to coverage.

Expected Behavior

The coverage job depends only on unit_tests. It starts as soon as unit_tests completes, running concurrently with the static analysis jobs (lint, typecheck, security, quality). Total CI wall-clock time is reduced.

Acceptance Criteria

  • The coverage job's needs: block in .forgejo/workflows/ci.yml contains only unit_tests.
  • The coverage job no longer waits for lint, typecheck, security, or quality to complete.
  • The coverage job starts as soon as unit_tests finishes.
  • Coverage is still correctly calculated and reported.
  • The pipeline remains stable and all jobs still execute and report results correctly.
  • features/ci_workflow_validation.feature is updated to assert the new dependency structure.

Supporting Information

  • Relevant file: .forgejo/workflows/ci.yml
  • Parent Epic: #1678 — CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing
  • Related issue: #2761 (Parallelize unit, integration, and E2E test execution) — both issues address CI pipeline structural inefficiencies
  • Related issue: #2757 (Consolidate static analysis jobs into a single parallelized job)
  • The project uses nox as the task runner; the coverage job runs nox -s coverage_report

Subtasks

  • Audit .forgejo/workflows/ci.yml to identify the current needs: block for the coverage job.
  • Modify the coverage job's needs: block to contain only unit_tests, removing lint, typecheck, security, and quality.
  • Verify the status-check (or equivalent gate) job still correctly waits for coverage to complete.
  • Update features/ci_workflow_validation.feature to add/update scenarios asserting that coverage only depends on unit_tests.
  • Tests (Behave): Verify existing CI validation scenarios still pass.
  • Verify coverage >= 97% via nox -s coverage_report.
  • Run nox (all default sessions) and fix any errors.

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 (feat(ci): remove unnecessary static analysis dependencies from coverage job), 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 (task/ci-optimize-coverage-job-dependencies).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • The coverage job starts as soon as unit_tests is complete, without waiting for static analysis jobs.
  • The overall CI pipeline execution time is reduced.
  • The pipeline remains stable and coverage is still correctly calculated and reported.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `task/ci-optimize-coverage-job-dependencies` - **Commit Message**: `feat(ci): remove unnecessary static analysis dependencies from coverage job` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The current CI pipeline (`.forgejo/workflows/ci.yml`) has the `coverage` job configured with a `needs:` block that depends on `lint`, `typecheck`, `security`, and `quality` in addition to `unit_tests`. This is an unnecessary dependency: code coverage is determined solely by test execution, not by static analysis checks. As a result, the `coverage` job is forced to wait for all static analysis jobs to complete before it can start — even though their results have no bearing on coverage calculation. This creates a bottleneck in the pipeline: if any static analysis job is slow or queued, the coverage job is delayed unnecessarily, increasing overall CI wall-clock time. This issue is a child of Epic #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing), which tracks all structural improvements to the CI pipeline's execution efficiency. ## Current Behavior The `coverage` job in `.forgejo/workflows/ci.yml` lists `lint`, `typecheck`, `security`, `quality`, and `unit_tests` in its `needs:` block. It waits for all five jobs to complete before starting, even though only `unit_tests` produces output relevant to coverage. ## Expected Behavior The `coverage` job depends only on `unit_tests`. It starts as soon as `unit_tests` completes, running concurrently with the static analysis jobs (`lint`, `typecheck`, `security`, `quality`). Total CI wall-clock time is reduced. ## Acceptance Criteria - The `coverage` job's `needs:` block in `.forgejo/workflows/ci.yml` contains only `unit_tests`. - The `coverage` job no longer waits for `lint`, `typecheck`, `security`, or `quality` to complete. - The `coverage` job starts as soon as `unit_tests` finishes. - Coverage is still correctly calculated and reported. - The pipeline remains stable and all jobs still execute and report results correctly. - `features/ci_workflow_validation.feature` is updated to assert the new dependency structure. ## Supporting Information - Relevant file: `.forgejo/workflows/ci.yml` - Parent Epic: #1678 — CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing - Related issue: #2761 (Parallelize unit, integration, and E2E test execution) — both issues address CI pipeline structural inefficiencies - Related issue: #2757 (Consolidate static analysis jobs into a single parallelized job) - The project uses `nox` as the task runner; the `coverage` job runs `nox -s coverage_report` ## Subtasks - [ ] Audit `.forgejo/workflows/ci.yml` to identify the current `needs:` block for the `coverage` job. - [ ] Modify the `coverage` job's `needs:` block to contain only `unit_tests`, removing `lint`, `typecheck`, `security`, and `quality`. - [ ] Verify the `status-check` (or equivalent gate) job still correctly waits for `coverage` to complete. - [ ] Update `features/ci_workflow_validation.feature` to add/update scenarios asserting that `coverage` only depends on `unit_tests`. - [ ] Tests (Behave): Verify existing CI validation scenarios still pass. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. - [ ] Run `nox` (all default sessions) and fix any errors. ## 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 (`feat(ci): remove unnecessary static analysis dependencies from coverage job`), 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 (`task/ci-optimize-coverage-job-dependencies`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - The `coverage` job starts as soon as `unit_tests` is complete, without waiting for static analysis jobs. - The overall CI pipeline execution time is reduced. - The pipeline remains stable and coverage is still correctly calculated and reported. - 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-04 19:19:33 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium
  • MoSCoW: Could Have — CI pipeline optimization. Reducing bottlenecks improves developer velocity but is not blocking feature work or releases.
  • Parent Epic: #1678 (CI Execution Time Optimization)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium - **MoSCoW**: Could Have — CI pipeline optimization. Reducing bottlenecks improves developer velocity but is not blocking feature work or releases. - **Parent Epic**: #1678 (CI Execution Time Optimization) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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#2766
No description provided.