TEST-INFRA: [ci-pipeline-design] Implement explicit dependency caching for uv #1614

Closed
opened 2026-04-02 23:13:06 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: task/ci-explicit-uv-dependency-caching
  • Commit Message: chore(ci): implement explicit uv dependency caching to speed up nox sessions
  • Milestone: v3.8.0
  • Parent Epic: (to be linked — see orphan note below)

Description

The current CI pipeline relies on nox's built-in virtualenv caching, which is not always effective in CI environments. This can lead to slow dependency installation times across all nox sessions.

To improve this, we should implement explicit dependency caching for uv in the CI configuration. This will ensure that the uv cache directory is preserved between CI runs, significantly speeding up the nox sessions by avoiding redundant package downloads.

Area: CI/CD

Subtasks

  • Identify the uv cache directory (typically ~/.cache/uv on Linux runners).
  • Configure the CI pipeline (.forgejo/workflows/ci.yml) to explicitly cache the uv cache directory using a well-scoped cache key (e.g., uv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}).
  • Add appropriate restore keys for partial cache hits.
  • Verify that the cache is being populated on first run and hit on subsequent runs.
  • Measure and confirm that dependency installation time is reduced.

Definition of Done

  • The uv cache directory is explicitly cached in the CI pipeline configuration.
  • The cache key uses uv.lock hash to ensure correctness and runner.os / Python version for scoping.
  • The uv cache is successfully preserved and restored between CI runs.
  • The overall CI execution time for dependency installation is measurably reduced.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `task/ci-explicit-uv-dependency-caching` - **Commit Message**: `chore(ci): implement explicit uv dependency caching to speed up nox sessions` - **Milestone**: v3.8.0 - **Parent Epic**: *(to be linked — see orphan note below)* ## Description The current CI pipeline relies on nox's built-in virtualenv caching, which is not always effective in CI environments. This can lead to slow dependency installation times across all nox sessions. To improve this, we should implement explicit dependency caching for `uv` in the CI configuration. This will ensure that the `uv` cache directory is preserved between CI runs, significantly speeding up the `nox` sessions by avoiding redundant package downloads. **Area**: CI/CD ## Subtasks - [ ] Identify the `uv` cache directory (typically `~/.cache/uv` on Linux runners). - [ ] Configure the CI pipeline (`.forgejo/workflows/ci.yml`) to explicitly cache the `uv` cache directory using a well-scoped cache key (e.g., `uv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}`). - [ ] Add appropriate restore keys for partial cache hits. - [ ] Verify that the cache is being populated on first run and hit on subsequent runs. - [ ] Measure and confirm that dependency installation time is reduced. ## Definition of Done - [ ] The `uv` cache directory is explicitly cached in the CI pipeline configuration. - [ ] The cache key uses `uv.lock` hash to ensure correctness and `runner.os` / Python version for scoping. - [ ] The `uv` cache is successfully preserved and restored between CI runs. - [ ] The overall CI execution time for dependency installation is measurably reduced. - [ ] 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:13:54 +00:00
Author
Owner

⚠️ Orphan Issue — Manual Linking Required

This issue does not currently have a parent Epic linked via Forgejo's dependency system. A thorough search of all open issues with the Type/Epic label did not reveal a dedicated CI pipeline / test infrastructure Epic.

Action required by project owner: Please create a parent Epic for the [ci-pipeline-design] workstream (or identify an existing one) and link this issue as a child by making issue #1614 block that Epic.

Related sibling issues in the same workstream that are also orphaned:

  • #1589 TEST-INFRA: [ci-pipeline-design] Improve dependency caching strategy
  • #1535 TEST-INFRA: [ci-pipeline-design] Consolidate uv Cache Key
  • #1536 TEST-INFRA: [ci-pipeline-design] Parallelize Static Analysis Jobs
  • #1537 TEST-INFRA: [ci-pipeline-design] Use Nox in Nightly Quality Workflow
  • #1538 TEST-INFRA: [ci-pipeline-design] Extract behave-parallel Script from noxfile.py
  • #1539 TEST-INFRA: [ci-pipeline-design] Use Matrix Strategy for Python Versions
  • #1540 TEST-INFRA: [ci-pipeline-design] Introduce Reusable Workflows to Reduce Duplication

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

⚠️ **Orphan Issue — Manual Linking Required** This issue does not currently have a parent Epic linked via Forgejo's dependency system. A thorough search of all open issues with the `Type/Epic` label did not reveal a dedicated CI pipeline / test infrastructure Epic. **Action required by project owner**: Please create a parent Epic for the `[ci-pipeline-design]` workstream (or identify an existing one) and link this issue as a child by making issue #1614 **block** that Epic. Related sibling issues in the same workstream that are also orphaned: - #1589 TEST-INFRA: [ci-pipeline-design] Improve dependency caching strategy - #1535 TEST-INFRA: [ci-pipeline-design] Consolidate uv Cache Key - #1536 TEST-INFRA: [ci-pipeline-design] Parallelize Static Analysis Jobs - #1537 TEST-INFRA: [ci-pipeline-design] Use Nox in Nightly Quality Workflow - #1538 TEST-INFRA: [ci-pipeline-design] Extract behave-parallel Script from noxfile.py - #1539 TEST-INFRA: [ci-pipeline-design] Use Matrix Strategy for Python Versions - #1540 TEST-INFRA: [ci-pipeline-design] Introduce Reusable Workflows to Reduce Duplication --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
Author
Owner

Closing as duplicate of #1589.

Both issues address dependency caching for uv in CI. #1589 was filed first and has a broader scope (includes uv.lock-based cache keys, refined restore keys, and nox environment caching). #1614 is a subset of #1589. Also related to #1535 (consolidate uv cache key, already triaged as Could Have). All work should be consolidated in #1589.


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

Closing as duplicate of #1589. Both issues address dependency caching for uv in CI. #1589 was filed first and has a broader scope (includes uv.lock-based cache keys, refined restore keys, and nox environment caching). #1614 is a subset of #1589. Also related to #1535 (consolidate uv cache key, already triaged as Could Have). All work should be consolidated in #1589. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo 2026-04-02 23:18:46 +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.

Dependencies

No dependencies set.

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