Charmcraft snap fails to install due to a timeout on the configure hook
Metadata
Current evaluation
Fixed in PR #1984 and released. The charmcraft snap configure hook timeout was resolved. Flaky failures occurred when LXD was absent, triggering a transient store download. The issue is closed.
Suggested action: —
No scores available.
Issue body
### Bug Description
Recently I've seen a flaky error appear on `snap install charmcraft`.
It seems that the `configure` step times out. It only occurs in CI so far, so it's probably due to resource constraints.
Example failure in CI:
https://github.com/canonical/tempo-coordinator-k8s-operator/actions/runs/11814262043/job/32912967414?pr=62
Sometimes to make it go away it's enough to retry (a couple of times...).
### To Reproduce
`snap install charmcraft --classic --channel 3.x/candidate`
### Environment
Current runner version: '2.320.0'
Operating System
Ubuntu
[2](https://github.com/canonical/tempo-coordinator-k8s-operator/actions/runs/11814262043/job/32912967414?pr=62#step:1:2)4.04.1
LTS
Runner Image
Image: ubuntu-2[4](https://github.com/canonical/tempo-coordinator-k8s-operator/actions/runs/11814262043/job/32912967414?pr=62#step:1:4).04
Version: 20241112.1.0
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20241112.1/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20241112.1
### charmcraft.yaml
```yaml
not applicable
```
### Relevant log output
```shell
/usr/bin/sudo snap install charmcraft --classic --channel 3.x/candidate
error: cannot perform the following tasks:
- Run configure hook of "charmcraft" snap if present (run hook "configure": <exceeded maximum runtime of 5m0s>)
Error: The process '/usr/bin/sudo' failed with exit code 1
Error: Error: The process '/usr/bin/sudo' failed with exit code 1
at ExecState._setResult (/home/runner/work/_actions/canonical/charming-actions/934193396735701141a1decc3613818e412da606/dist/check-libraries/index.js:3950:25)
at ExecState.CheckComplete (/home/runner/work/_actions/canonical/charming-actions/934193396735701141a1decc3613818e412da606/dist/check-libraries/index.js:3933:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/canonical/charming-actions/934193396735701141a1decc3613818e412da606/dist/check-libraries/index.js:3827:27)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in PR #1984 and released. The charmcraft snap configure hook timeout was resolved. Flaky failures occurred when LXD was absent, triggering a transient store download. The issue is closed. | |
| qwen/qwen3.6-35b-a3b | — | — | The charmcraft snap configure hook timeout in CI was fixed in pull request #1984. While a workaround suggested installing LXD beforehand, the underlying issue was resolved and scheduled for release. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed in PR #1984. The charmcraft snap configure hook timeout during CI installation was resolved. A temporary workaround suggested pre-installing LXD, but the underlying issue was permanently addressed in the merged pull request. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in PR #1984. The charmcraft snap configure hook timeout during CI installation was resolved. Pre-installing LXD served as a temporary workaround before the fix was merged and released. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in PR #1984. The charmcraft snap configure hook timeout was resolved by addressing LXD dependency handling and store synchronization. CI flakiness was mitigated by ensuring explicit LXD installation and improving hook execution reliability. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #560 Charmcraft pack is giving error frequently | charmcraft | closed | Charmcraft pack failed due to an apt-get network error installing snapd in an LXD container. Maintainers linked it to a known networking issue. The reporter confirmed a workaround failed. Closed without a code fix, likely abandoned. | |
| #1202 `charmcraft` installs newer version in LXC container & doesn't respect pinned snap revision | charmcraft | closed | Closed. A fix is planned to switch craft-providers to the newer snap refresh --hold=forever syntax, preventing automatic container updates. A regression test will be added. |