← Back to issue list

uv plugin doesn't cache wheels to LXC host

View original Github issue

Metadata

Project
charmcraft
Number
#2461
Type
issue
State
open
Author
carlcsaposs-canonical
Labels
—
Created
Updated
Closed
—

Current evaluation

uv with no-binary builds caches inside the LXC guest instead of CRAFT_SHARED_CACHE; the bug remains open and is blocked on craft-providers PR #900.

Suggested action: keep open

Reason: The exact reproducer and directory listings show uv caching under /root/snap/charmcraft/common/cache/uv in the guest while the host cache contains only pip. The issue remains active, and @astrojuanlu identified canonical/craft-providers#900 as the primary upstream blocker.

Evaluated by: mr-cal-bot

Impact: 58 Quick Win: 19 Complexity: 62 Confidence: 93 Actionability: 84

Issue body

### Bug Description When the uv plugin is used with ```toml # pyproject.toml [tool.uv] no-binary = true ``` wheels built from source are not saved to charmcraft's cache on the LXC host ### To Reproduce ```shell git clone https://github.com/carlcsaposs-canonical/bug-report-charmcraft-uv-no-cache cd bug-report-charmcraft-uv-no-cache/ mkdir ~/foo CRAFT_SHARED_CACHE=/home/ubuntu/foo charmcraft pack -v ``` ```shell ubuntu@juju-378fe5-stg-carlcsaposs-dev-env-46:~/bug-report-charmcraft-uv-no-cache$ ls ~/foo/ charmcraft-buildd-base-v7 charmcraft.lock ubuntu@juju-378fe5-stg-carlcsaposs-dev-env-46:~/bug-report-charmcraft-uv-no-cache$ ls ~/foo/charmcraft-buildd-base-v7/ BuilddBaseAlias.NOBLE ubuntu@juju-378fe5-stg-carlcsaposs-dev-env-46:~/bug-report-charmcraft-uv-no-cache$ ls ~/foo/charmcraft-buildd-base-v7/BuilddBaseAlias.NOBLE/ pip ubuntu@juju-378fe5-stg-carlcsaposs-dev-env-46:~/bug-report-charmcraft-uv-no-cache$ ls ~/foo/charmcraft-buildd-base-v7/BuilddBaseAlias.NOBLE/pip/ ubuntu@juju-378fe5-stg-carlcsaposs-dev-env-46:~/bug-report-charmcraft-uv-no-cache$ ``` ### Environment Ubuntu 24.04 Using charmcraft with lxc containers ### charmcraft.yaml ```yaml type: charm platforms: ubuntu@24.04:amd64: parts: charm-uv: plugin: uv source: . build-snaps: - astral-uv ``` ### Relevant log output ```shell N/A ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 58
Quick Win: 19
Complexity: 62
Confidence: 93
Actionability: 84
keep open uv with no-binary builds caches inside the LXC guest instead of CRAFT_SHARED_CACHE; the bug remains open and is blocked on craft-providers PR #900.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 19
Complexity: 45
Confidence: 88
Actionability: 78
keep open The uv plugin cache remains inside the LXC guest instead of using Charmcraft's host cache set by CRAFT_SHARED_CACHE; the report is unresolved pending upstream provider work.
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 34
Complexity: 40
Confidence: 70
Actionability: 80
keep open uv plugin fails to cache wheels to LXC host shared cache when no-binary=true; cache dir inside container is /root/snap/charmcraft/common/cache/uv but not populated
qwen/qwen3.8-27b
Impact: 50
Quick Win: 30
Staleness: 55
Complexity: 40
Confidence: 75
Support Request: 10
needs triage uv plugin with no-binary=true does not persist built wheels to the LXC host shared cache (CRAFT_SHARED_CACHE); only the pip cache dir is mounted, so the uv cache stays container-local.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 50
Confidence: 75
Support Request: 10
close stale uv plugin fails to cache source-built wheels to the LXC host when no-binary is enabled. Inactive for over nine months with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 45
Confidence: 75
Support Request: 5
needs triage uv plugin fails to cache wheels to the LXC host shared cache when building from source. Currently untriaged and inactive for 216 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 75
Support Request: 10
needs triage uv plugin fails to cache built wheels to the LXC host cache directory when no-binary is enabled. Issue lacks maintainer assessment after 8 months of inactivity.

Update history

Date Change
updated
updated

Related work

  • Related To: charmcraftlocal#10 (confidence 98%)

    A commenter linked this issue to a uv migration blocked by Charmcraft's missing cache support.

  • Blocked By: canonical/craft-providers#900 (confidence 95%)

    @astrojuanlu identified this provider PR as the main blocker for host cache propagation.

Related issues

Issue Project State Summary Similarity
#2501 fix: cache uv plugin wheels to LXC host charmcraft open Sets UV_CACHE_DIR for source-built wheels and adds unit and spread coverage; awaiting re-review, with two unresolved comments and most CI checks still pending.
74%