Use `snap refresh --hold`
Metadata
Current evaluation
craft-providers 1.15.0 adopted `snap refresh --hold` during setup instead of repeatedly setting refresh.hold; fixed by commit 09ef06f.
Resolution: closed resolved
Reason: Commit 09ef06f replaced the unreliable refresh.hold setting with `snap refresh --hold`. The 1.15.0 changelog confirms this behavior shipped.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This https://github.com/canonical/craft-providers/pull/182 adds support for pausing automatic snap refreshes.
It has to run `snap set system refresh.hold=<24h>` during every `setup()` and `warmup()` call.
It would be more efficient to run `snap refresh --hold` once during `setup()`. This feature of snapd is not yet stable. Once it becomes stable, craft-providers should use this command instead.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | craft-providers 1.15.0 adopted `snap refresh --hold` during setup instead of repeatedly setting refresh.hold; fixed by commit 09ef06f. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Fixed in craft-providers via commit 09ef06f, which replaces `snap set system refresh.hold` with `snap refresh --hold` to pause automatic snap refreshes. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
canonical/craft-providers#182
(confidence 100%)
Introduced the earlier refresh.hold workaround that #184 replaced.
-
Related To:
canonical/charmcraft#1202
(confidence 98%)
Demonstrated that refresh.hold did not prevent snap refreshes and motivated the fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #382 bases: use `snap refresh --hold` | craft-providers | merged | Merged PR #382 by mr-cal: replaces `snap set system refresh.hold` with `snap refresh --hold`, restores pre-1.13.0 behaviour of running snapd calls only in setup (not warmup), and bumps the compatibility tag. Landed as commit 09ef06f. | |
| #182 bases: disable automatic snap refreshes | craft-providers | merged | Merged PR #182 (commit 562257a, CRAFT-1518) disables automatic snap refreshes in build providers by running `snap set system refresh.hold=24h` during setup() and warmup(), fixing #174 and LP#1998100. |