TEST-INFRA: [ci-pipeline-design] Share uv cache between CI jobs #1739

Closed
opened 2026-04-02 23:38:55 +00:00 by freemo · 3 comments
Owner

Metadata

  • Branch: chore/ci-share-uv-cache-between-jobs
  • Commit Message: chore(ci): share uv cache across all CI jobs to eliminate redundant installs
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The current CI pipeline in .forgejo/workflows/ci.yml uses a separate cache key per job. This means each job independently downloads and installs the same uv-managed dependencies, leading to redundant network traffic and installation time on every CI run.

Current Behavior

Each CI job defines its own cache configuration, resulting in multiple cache entries for identical dependency sets. When a cache miss occurs in any job, the full dependency installation is repeated — even if another job in the same run already populated an equivalent cache.

Expected Behavior

All CI jobs should share a single, consistent uv cache key so that dependencies are downloaded and installed only once per unique lock-file state. Subsequent jobs in the same run (or subsequent runs with unchanged dependencies) should restore from the shared cache without re-downloading.

Acceptance Criteria

  • A single shared cache key (based on uv.lock or equivalent) is used across all CI jobs.
  • Each job correctly restores the cache at the start and saves it on completion (if not already present).
  • The CI pipeline continues to pass all existing checks after the change.
  • Dependency installation time is measurably reduced when the cache is warm.

Supporting Information

  • Related: #1535 (Consolidate uv Cache Key — State/Verified)
  • Related: #1589 (Improve dependency caching strategy — State/Verified)
  • Related: #1652, #1654 (Implement dependency caching for uv)
  • The .forgejo/workflows/ci.yml file is the primary target for this change.

Subtasks

  • Audit .forgejo/workflows/ci.yml to identify all jobs with separate cache configurations
  • Define a single shared uv cache key (e.g., keyed on uv.lock hash)
  • Update each job to use the shared cache key for both restore and save steps
  • Verify cache restore and save behaviour works correctly in each job
  • Update or add a scenario in features/ci_workflow_validation.feature to assert shared cache key usage
  • Run nox (all default sessions) and fix any errors
  • Verify coverage ≥ 97% via nox -s coverage_report

Definition of Done

  • 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: ca-new-issue-creator

## Metadata - **Branch**: `chore/ci-share-uv-cache-between-jobs` - **Commit Message**: `chore(ci): share uv cache across all CI jobs to eliminate redundant installs` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The current CI pipeline in `.forgejo/workflows/ci.yml` uses a separate cache key per job. This means each job independently downloads and installs the same `uv`-managed dependencies, leading to redundant network traffic and installation time on every CI run. ## Current Behavior Each CI job defines its own cache configuration, resulting in multiple cache entries for identical dependency sets. When a cache miss occurs in any job, the full dependency installation is repeated — even if another job in the same run already populated an equivalent cache. ## Expected Behavior All CI jobs should share a single, consistent `uv` cache key so that dependencies are downloaded and installed only once per unique lock-file state. Subsequent jobs in the same run (or subsequent runs with unchanged dependencies) should restore from the shared cache without re-downloading. ## Acceptance Criteria - A single shared cache key (based on `uv.lock` or equivalent) is used across all CI jobs. - Each job correctly restores the cache at the start and saves it on completion (if not already present). - The CI pipeline continues to pass all existing checks after the change. - Dependency installation time is measurably reduced when the cache is warm. ## Supporting Information - Related: #1535 (Consolidate uv Cache Key — `State/Verified`) - Related: #1589 (Improve dependency caching strategy — `State/Verified`) - Related: #1652, #1654 (Implement dependency caching for uv) - The `.forgejo/workflows/ci.yml` file is the primary target for this change. ## Subtasks - [ ] Audit `.forgejo/workflows/ci.yml` to identify all jobs with separate cache configurations - [ ] Define a single shared `uv` cache key (e.g., keyed on `uv.lock` hash) - [ ] Update each job to use the shared cache key for both restore and save steps - [ ] Verify cache restore and save behaviour works correctly in each job - [ ] Update or add a scenario in `features/ci_workflow_validation.feature` to assert shared cache key usage - [ ] Run `nox` (all default sessions) and fix any errors - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` ## Definition of Done - [ ] 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: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-02 23:40:05 +00:00
Author
Owner

Closing as duplicate of #1589 (dependency caching improvement).


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

Closing as duplicate of #1589 (dependency caching improvement). --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo 2026-04-02 23:41:39 +00:00
freemo reopened this issue 2026-04-02 23:46:35 +00:00
Author
Owner

Closing — this issue already has the State/Duplicate label, indicating it was identified as a duplicate by another agent. Closing to clean up the backlog.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Closing — this issue already has the `State/Duplicate` label, indicating it was identified as a duplicate by another agent. Closing to clean up the backlog. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Author
Owner

Closing as duplicate (marked State/Duplicate). This CI cache sharing issue duplicates existing issues tracking the same work.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Closing as duplicate (marked `State/Duplicate`). This CI cache sharing issue duplicates existing issues tracking the same work. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
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#1739
No description provided.