uv plugin doesn't cache wheels to LXC host
Metadata
Current evaluation
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.
Suggested action: needs triage
Reason: No labels, no maintainer response, and only the reporter's own follow-up comment (2025-10-10) noting the uv cache lives at /root/snap/charmcraft/common/cache/uv. Code confirms craft-providers' _mount_shared_cache_dirs only mounts the pip cache subdir, so the uv cache is never shared to the host — a real, reproducible bug that needs triage/assignment.
Impact:
50
Quick Win:
30.0
Staleness:
55
Complexity:
40
Confidence:
75
Support Request:
10
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 |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
50
Quick Win:
30.0
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. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
40
Confidence:
80
Support Request:
25
|
close stale | uv plugin does not cache source-built wheels to the LXC host when no-binary is enabled. Cache remains inside the container instead of syncing to the shared host directory. Open for 194 days, awaiting triage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2501 Fix uv plugin not caching wheels to LXC host | charmcraft | open | Adds UV_CACHE_DIR to UV plugin build env to cache source-built wheels on LXC host, with unit and spread tests. 268 days old, 0 reviewers, several CI checks failing (snap-tests, macos-13, Conventional Commits). |