TEST-INFRA: [ci-pipeline-design] Improve dependency caching strategy #1589

Open
opened 2026-04-02 23:00:46 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: task/ci-improve-dependency-caching-strategy
  • Commit Message: chore(ci): improve dependency caching strategy using uv.lock and refined restore keys
  • Milestone: v3.8.0
  • Parent Epic: (to be linked — see orphan note below)

Description

The current dependency caching in the CI pipeline uses hashFiles('pyproject.toml') as the primary key. This can be improved for better cache hit rates and more efficient dependency installation.

Area: CI/CD

Subtasks

  • Use uv.lock for cache key: Update the cache key to use hashFiles('uv.lock') as the primary key when uv.lock is present and up-to-date. This ensures the cache is only invalidated when the locked dependencies actually change.
  • Refine restore keys: Replace the current broad restore keys (e.g., uv-lint-) with more specific fallback keys that include the Python version and OS (e.g., uv-${{ runner.os }}-${{ matrix.python-version }}-).
  • Cache nox environments: Evaluate and implement caching of the nox virtual environments themselves to further speed up subsequent CI runs.
  • Update .forgejo/workflows/ci.yml with the new caching configuration.
  • Verify cache hit rates improve in CI runs after the change.

Definition of Done

  • The CI pipeline uses uv.lock as the primary cache key for dependency caching.
  • Restore keys are refined to include OS and Python version for more targeted fallbacks.
  • nox environments are cached where feasible.
  • The changes are implemented in .forgejo/workflows/ci.yml.
  • The CI pipeline runs successfully with the new caching strategy.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `task/ci-improve-dependency-caching-strategy` - **Commit Message**: `chore(ci): improve dependency caching strategy using uv.lock and refined restore keys` - **Milestone**: v3.8.0 - **Parent Epic**: *(to be linked — see orphan note below)* ## Description The current dependency caching in the CI pipeline uses `hashFiles('pyproject.toml')` as the primary key. This can be improved for better cache hit rates and more efficient dependency installation. **Area**: CI/CD ## Subtasks - [ ] **Use `uv.lock` for cache key:** Update the cache key to use `hashFiles('uv.lock')` as the primary key when `uv.lock` is present and up-to-date. This ensures the cache is only invalidated when the locked dependencies actually change. - [ ] **Refine restore keys:** Replace the current broad restore keys (e.g., `uv-lint-`) with more specific fallback keys that include the Python version and OS (e.g., `uv-${{ runner.os }}-${{ matrix.python-version }}-`). - [ ] **Cache `nox` environments:** Evaluate and implement caching of the `nox` virtual environments themselves to further speed up subsequent CI runs. - [ ] Update `.forgejo/workflows/ci.yml` with the new caching configuration. - [ ] Verify cache hit rates improve in CI runs after the change. ## Definition of Done - [ ] The CI pipeline uses `uv.lock` as the primary cache key for dependency caching. - [ ] Restore keys are refined to include OS and Python version for more targeted fallbacks. - [ ] `nox` environments are cached where feasible. - [ ] The changes are implemented in `.forgejo/workflows/ci.yml`. - [ ] The CI pipeline runs successfully with the new caching strategy. - [ ] 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:01:09 +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 search of all open and closed issues with Type/Epic label did not reveal a dedicated CI pipeline / test infrastructure Epic.

Action required by project owner: Please either:

  1. Create a new Type/Epic issue for CI pipeline improvements and link this issue as a child (this issue blocks the parent Epic), or
  2. Link this issue to an existing Epic (e.g., Epic: E2E Testing Suite #739 or Epic: Milestone Acceptance and Workflow Example Integration Tests #401) if appropriate.

The dependency link should be created with this issue blocking the parent Epic:

POST /api/v1/repos/cleveragents/cleveragents-core/issues/1589/blocks
{ "dependency_id": <PARENT_EPIC_NUMBER> }

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 search of all open and closed issues with `Type/Epic` label did not reveal a dedicated CI pipeline / test infrastructure Epic. **Action required by project owner:** Please either: 1. Create a new `Type/Epic` issue for CI pipeline improvements and link this issue as a child (this issue **blocks** the parent Epic), or 2. Link this issue to an existing Epic (e.g., Epic: E2E Testing Suite #739 or Epic: Milestone Acceptance and Workflow Example Integration Tests #401) if appropriate. The dependency link should be created with this issue **blocking** the parent Epic: ``` POST /api/v1/repos/cleveragents/cleveragents-core/issues/1589/blocks { "dependency_id": <PARENT_EPIC_NUMBER> } ``` --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Priority/Medium (confirmed) — CI optimization, not blocking
  • MoSCoW: MoSCoW/Could Have — improving dependency caching strategy is a CI performance optimization. The current caching works. This is a nice-to-have improvement. Could Have.
  • Milestone: v3.8.0 (confirmed)

Note: #1614 was closed as a duplicate of this issue. Also related to #1535 (consolidate uv cache key).


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Priority/Medium (confirmed) — CI optimization, not blocking - **MoSCoW**: MoSCoW/Could Have — improving dependency caching strategy is a CI performance optimization. The current caching works. This is a nice-to-have improvement. Could Have. - **Milestone**: v3.8.0 (confirmed) Note: #1614 was closed as a duplicate of this issue. Also related to #1535 (consolidate uv cache key). --- **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.

Dependencies

No dependencies set.

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