`CRAFT_SHARED_CACHE` broken or ignored in charmcraft 3.1
Metadata
Current evaluation
Closed without resolution or comments. The reported CRAFT_SHARED_CACHE bug in charmcraft 3.1 appears abandoned, with no fix or follow-up activity recorded.
Suggested action: —
No scores available.
Issue body
### Bug Description
`CRAFT_SHARED_CACHE` appears to be broken in charmcraft 3.1
charmcraft ignores wheels in `CRAFT_SHARED_CACHE` and doesn't appear to populate `CRAFT_SHARED_CACHE` after running a pack
### To Reproduce
Reproduce issue with `CRAFT_SHARED_CACHE` not being populated
```
$ git clone https://github.com/canonical/mysql-router-k8s-operator/
$ cd mysql-router-k8s-operator
$ sudo snap install charmcraft --channel candidate --classic
charmcraft (candidate) 3.1.1 from Canonical✓ installed
$ ls ~/snap/
lxd
$ tox run -e build-production -- -v
[...]
$ ls ~/snap/charmcraft/common/cache/charmcraft/ -a
. ..
```
Reproduce issue with wheels in `CRAFT_SHARED_CACHE` being ignored
```
$ git clone https://github.com/canonical/mysql-router-k8s-operator/
$ cd mysql-router-k8s-operator
$ sudo snap install charmcraft --channel candidate --classic
charmcraft (candidate) 3.1.1 from Canonical✓ installed
$ tox run -e build-dev -- -v
[...]
# Charmcraft builds wheels from source when it should use already built wheels
```
### Environment
Ubuntu 22.04
### charmcraft.yaml
```shell
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
type: charm
bases:
- name: ubuntu
channel: "22.04"
architectures: [amd64]
- name: ubuntu
channel: "22.04"
architectures: [arm64]
parts:
charm:
override-pull: |
craftctl default
if [[ ! -f requirements.txt ]]
then
echo 'ERROR: Use "tox run -e build-dev" instead of calling "charmcraft pack" directly' >&2
exit 1
fi
charm-strict-dependencies: true
charm-entrypoint: src/kubernetes_charm.py
prime:
- charm_version
- workload_version
- scripts
build-packages:
- libffi-dev
- libssl-dev
- pkg-config
- rustc
- cargo
```
### Relevant log output
For issue with `CRAFT_SHARED_CACHE` not being populated
[terminal_output_no_cache.txt](https://github.com/user-attachments/files/16372863/terminal_output_no_cache.txt)
[charmcraft-20240725-074836.719086.log](https://github.com/user-attachments/files/16372866/charmcraft-20240725-074836.719086.log)
For issue with wheels in `CRAFT_SHARED_CACHE` being ignored
[terminal_output_cache.txt](https://github.com/user-attachments/files/16373073/terminal_output_cache.txt)
[charmcraft-20240725-081921.214270.log](https://github.com/user-attachments/files/16373080/charmcraft-20240725-081921.214270.log)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution or comments. The reported CRAFT_SHARED_CACHE bug in charmcraft 3.1 appears abandoned, with no fix or follow-up activity recorded. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. CRAFT_SHARED_CACHE population and wheel caching issues in charmcraft 3.1 remain unaddressed due to inactivity. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without documented resolution. The report details CRAFT_SHARED_CACHE failing to populate or ignore cached wheels in charmcraft 3.1, but no fix or follow-up action was recorded. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without comments or resolution. The CRAFT_SHARED_CACHE population and wheel caching issues in charmcraft 3.1 appear abandoned. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without comments or resolution after two days, indicating the report was abandoned. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1752 Document `CRAFT_SHARED_CACHE` | charmcraft | closed | Closed as a duplicate of issue #1431. The maintainer confirmed the documentation request for CRAFT_SHARED_CACHE was already addressed elsewhere, superseding this ticket. |