TEST-INFRA: [ci-execution-time] Avoid redundant dependency installation in CI jobs #7434

Open
opened 2026-04-10 19:14:31 +00:00 by HAL9000 · 3 comments
Owner

Metadata

  • Branch: task/ci-execution-time-avoid-redundant-dep-install
  • Commit Message: chore(ci): avoid redundant uv and nox installation in every CI job
  • Milestone: N/A — Backlog (see note below)
  • Parent Epic: #1678

Backlog note: This issue was discovered during autonomous operation
on milestone v3.2.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Duplicate Check

  • Search Queries: "redundant dependency installation", "install uv nox", "cache uv nox"
  • Results: 0 issues found for each query.
  • Reasoning: No existing issues address the redundant installation of uv and nox in each CI job.

Summary

Each job in the CI pipeline installs uv and nox independently. This is redundant and adds unnecessary time to each job. Since these tools are required by every job, they should be provided once — either via a shared base Docker image or via a cached layer — rather than re-installed on every run.

Current Behavior

Every CI job in .forgejo/workflows/ci.yml independently installs uv and nox as part of its setup steps. This results in:

  • Repeated network round-trips to download the same tool versions on every job.
  • Increased CI execution time across all jobs, even when the tools have not changed.
  • Wasted runner resources re-installing identical tooling for every parallel job.

Expected Behavior

uv and nox should be installed once and reused across all CI jobs. Two approaches are viable:

  1. Base Docker image: Build a custom runner image that pre-installs uv and nox, and configure all CI jobs to use it. This eliminates the install step entirely.
  2. actions/cache: Cache the installed tool binaries using a cache key based on the tool versions. On cache hit, the install step is skipped.

Acceptance Criteria

  • uv and nox are not installed independently in every CI job.
  • The time to set up the CI environment is measurably reduced.
  • The overall CI execution time is measurably reduced.
  • The chosen approach (base image or caching) is documented with a comment in the workflow file.
  • The change does not break any existing CI jobs.

Supporting Information

  • Related issues: #7425 (Implement caching for Nox virtual environments), #7426 (Avoid Docker-in-Docker for building and testing), #7421 (Run E2E tests on a less frequent schedule), #1678 (Epic: CI Execution Time Optimization).
  • Companion to #7425 — caching .nox venvs addresses Python dependency re-installation; this issue addresses the uv/nox tool installation itself.

Subtasks

  • Audit all jobs in .forgejo/workflows/ci.yml to identify every step that installs uv or nox.
  • Evaluate the two approaches: base Docker image vs. actions/cache for tool binaries.
  • Select and implement the preferred approach.
  • Add a comment in the workflow file explaining the chosen approach and rationale.
  • Verify all CI jobs pass with the new configuration.
  • Measure and document setup time improvement vs. baseline.
  • 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, 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.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%

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

## Metadata - **Branch**: `task/ci-execution-time-avoid-redundant-dep-install` - **Commit Message**: `chore(ci): avoid redundant uv and nox installation in every CI job` - **Milestone**: N/A — Backlog (see note below) - **Parent Epic**: #1678 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ### Duplicate Check - **Search Queries**: "redundant dependency installation", "install uv nox", "cache uv nox" - **Results**: 0 issues found for each query. - **Reasoning**: No existing issues address the redundant installation of `uv` and `nox` in each CI job. ## Summary Each job in the CI pipeline installs `uv` and `nox` independently. This is redundant and adds unnecessary time to each job. Since these tools are required by every job, they should be provided once — either via a shared base Docker image or via a cached layer — rather than re-installed on every run. ## Current Behavior Every CI job in `.forgejo/workflows/ci.yml` independently installs `uv` and `nox` as part of its setup steps. This results in: - Repeated network round-trips to download the same tool versions on every job. - Increased CI execution time across all jobs, even when the tools have not changed. - Wasted runner resources re-installing identical tooling for every parallel job. ## Expected Behavior `uv` and `nox` should be installed once and reused across all CI jobs. Two approaches are viable: 1. **Base Docker image**: Build a custom runner image that pre-installs `uv` and `nox`, and configure all CI jobs to use it. This eliminates the install step entirely. 2. **`actions/cache`**: Cache the installed tool binaries using a cache key based on the tool versions. On cache hit, the install step is skipped. ## Acceptance Criteria - [ ] `uv` and `nox` are not installed independently in every CI job. - [ ] The time to set up the CI environment is measurably reduced. - [ ] The overall CI execution time is measurably reduced. - [ ] The chosen approach (base image or caching) is documented with a comment in the workflow file. - [ ] The change does not break any existing CI jobs. ## Supporting Information - Related issues: #7425 (Implement caching for Nox virtual environments), #7426 (Avoid Docker-in-Docker for building and testing), #7421 (Run E2E tests on a less frequent schedule), #1678 (Epic: CI Execution Time Optimization). - Companion to #7425 — caching `.nox` venvs addresses Python dependency re-installation; this issue addresses the `uv`/`nox` tool installation itself. ## Subtasks - [ ] Audit all jobs in `.forgejo/workflows/ci.yml` to identify every step that installs `uv` or `nox`. - [ ] Evaluate the two approaches: base Docker image vs. `actions/cache` for tool binaries. - [ ] Select and implement the preferred approach. - [ ] Add a comment in the workflow file explaining the chosen approach and rationale. - [ ] Verify all CI jobs pass with the new configuration. - [ ] Measure and document setup time improvement vs. baseline. - [ ] 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, 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. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
Author
Owner

Verified — CI optimization: avoid redundant dependency installation. MoSCoW: Could-have. Priority: Low.


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

✅ **Verified** — CI optimization: avoid redundant dependency installation. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — CI optimization: avoid redundant dependency installation. MoSCoW: Could-have. Priority: Low.


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

✅ **Verified** — CI optimization: avoid redundant dependency installation. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — CI optimization: avoid redundant dependency installation. MoSCoW: Could-have. Priority: Low.


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

✅ **Verified** — CI optimization: avoid redundant dependency installation. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#7434
No description provided.