← Back to issue list

bases: use `snap refresh --hold`

View original Github issue

Metadata

Project
craft-providers
Number
#382
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed resolved

Reason: The PR was approved and merged to main as commit 09ef06f ("bases: use `snap refresh --hold`"), followed by commit 16a76cc bumping the compatibility tag; the changelog records "Use ``snap refresh --hold`` inside instances" and the issue it resolves (#184) is now closed.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `tox`? ----- ### Overview - Replace `snap set system refresh.hold=<24h>` with `snap refresh --hold` - Execute this call only during `setup` instead of `setup` and `warmup` - Bump compatibility tag ### Details This required moving a few other snapd-related calls to only execute during `setup`. In `craft-providers<1.13.0`, these snapd calls were [only made once](https://github.com/canonical/craft-providers/blob/3ea09344578f03a458676fac51784bbe6ea7f305/craft_providers/bases/ubuntu.py#L378-L379) during `setup`. During the [base refactor](https://github.com/canonical/craft-providers/pull/274) in `1.13.0`, these calls were made during `setup` and `warmup`. I've reverted to the previous behavior because it works, speeds up warmup, and is a neat and tidy way to make this change. Compatibility tag bump is in a separate commit for your viewing pleasure. Resolves #184 https://github.com/canonical/charmcraft/issues/1202 (CRAFT-1984)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
qwen/qwen3.6-35b-a3b — closed resolved Merged PR #382, replacing `snap set system refresh.hold` with `snap refresh --hold` and moving execution to `setup` only, resolving #184.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/craft-providers#184 (confidence 97%)

    The issue 'Use `snap refresh --hold`' that this PR explicitly resolves (Resolves #184).

  • Related To: canonical/charmcraft#1202 (confidence 85%)

    Upstream charmcraft issue cited in the PR body (CRAFT-1984) that motivated the snapd refresh-hold change.

  • Related To: canonical/craft-providers#274 (confidence 72%)

    The base refactor in 1.13.0 whose setup/warmup snapd-call duplication this PR partially reverts.

Related issues

Issue Project State Summary Similarity
#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.
74%
#184 Use `snap refresh --hold` craft-providers closed craft-providers 1.15.0 adopted `snap refresh --hold` during setup instead of repeatedly setting refresh.hold; fixed by commit 09ef06f.
74%