← Back to issue list

feat(base): cache uv directory

View original Github issue

Metadata

Project
craft-providers
Number
#900
Type
pull request
State
open
Author
carlcsaposs-canonical
Labels
—
Created
Updated
Closed
—

Current evaluation

Adds uv cache directory mounting to Base._mount_shared_cache_dirs (mirroring merged pip-cache PR #394), fixing charmcraft#2461. Approved, lint fixed via merged #910, slow tests still pending.

Suggested action: needs review

Reason: The PR is already approved (1 reviewer, 0 unresolved comments), the lint failure was addressed by merged PR #910, and lint/fast/min-deps checks pass; only slow integration tests remain pending, so it needs only final maintainer review before merge. The open caveat is @lengau's comment that 'We're working on a new way to share the user cache (that'll share the entire `.cache` directory rather than directories for individual tools). That will be opt-in though' — a possibly overlapping but non-blocking design — plus @astrojuanlu's 2026-03-30 'Any blockers for this?' going unanswered for 34 days, which is why this is needs_review rather than an immediate merge.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 24 Complexity: 25 Confidence: 78 Actionability: 72

Issue body

Based on https://github.com/canonical/craft-providers/pull/394 Fixes https://github.com/canonical/charmcraft/issues/2461 uv's cache directory is located in the same parent directory as pip's cache directory https://github.com/canonical/craft-providers/blob/b5b4a45ea0e8ba2ff1cc984a9676aa5f46c367d4/craft_providers/base.py#L831-L832 https://docs.astral.sh/uv/reference/storage/#cache-directory https://pip.pypa.io/en/stable/topics/caching/#default-paths

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 24
Complexity: 25
Confidence: 78
Actionability: 72
needs review Adds uv cache directory mounting to Base._mount_shared_cache_dirs (mirroring merged pip-cache PR #394), fixing charmcraft#2461. Approved, lint fixed via merged #910, slow tests still pending.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 23
Complexity: 30
Confidence: 78
Actionability: 72
needs review Adds uv cache directory mounting alongside pip in base._mount_shared_cache_dirs (refactor to loop over cache dirs + unit tests). Approved by maintainer, fast CI green, slow tests still pending.
stealth/space-bunny-alpha
Impact: 46
Quick Win: 24
Complexity: 34
Confidence: 88
Actionability: 80
needs review Adds uv cache-directory sharing to Base instances, extending the merged pip-cache approach for Charmcraft#2461. Approved with no unresolved comments; completed checks are green, with slow suites pending.
qwen3.6-35b-a3b-mtp-q6
Impact: 35
Quick Win: 28
Staleness: 25
Complexity: 20
Confidence: 75
needs review Adds uv cache directory caching to craft-providers base, approved by 1 reviewer with 0 unresolved comments. CI mostly passing, some slow tests pending.
qwen/qwen3.6-35b-a3b
Staleness: 55
Complexity: 20
Confidence: 85
keep open Implements uv cache directory caching to match pip's location. PR is approved, CI failures are known or fixed elsewhere, and maintainers are evaluating a new cache-sharing approach without rejecting this change.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 20
Confidence: 85
close stale Adds caching for the uv directory alongside pip's cache. Inactive for 104 days; a maintainer indicated a broader opt-in cache sharing solution is in development, superseding this targeted change.

Update history

Date Change
updated

Related work

  • Related To: canonical/craft-providers#910 (confidence 95%)

    @bepri: 'Lint error is fixed in #910'; #910 is merged and resolves the ty lint failure on this branch.

  • Related To: canonical/craft-providers#394 (confidence 95%)

    Merged pip-cache PR whose _mount_shared_cache_dirs implementation (craft_providers/base.py) this change extends.

  • Likely Fixed By: canonical/charmcraft#2461 (confidence 90%)

    PR body states it fixes charmcraft#2461 (uv plugin doesn't cache wheels to LXC host); that issue is open and reported blocked on this PR.

Related issues

Issue Project State Summary Similarity
#394 feat(base): cache pip directory craft-providers merged Merged PR #394 (af89ca5), adding pip-directory caching for base providers and fixing #397.
70%