test(spread): wait out in-progress auto-refresh in prepare
Metadata
Current evaluation
Merged PR #1170 as fea3e835, adding a 24-hour snap refresh hold and waiting for active auto-refreshes to prevent spread prepare races.
Resolution: closed resolved
Reason: Commit fea3e835 merged PR #1170 and updated spread.yaml to hold snap refreshes and wait for any active auto-refresh before installing or refreshing snaps.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The spread `prepare` step intermittently fails, e.g. https://github.com/canonical/craft-application/actions/runs/33190796208/job/98916457923:
```
error: snap "lxd" has "auto-refresh" change in progress
```
This races because snapd may start an auto-refresh of the pre-installed LXD snap while `prepare` is trying to refresh it to a different channel.
Fix, following Charmcraft's approach: hold refreshes for 24 hours (`refresh.hold`) and wait for the last in-progress auto-refresh (`snap watch --last=auto-refresh?`) before installing or refreshing any snaps.
This PR was sloperated using OpenCode and moonshotai/kimi-k3
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1170 as fea3e835, adding a 24-hour snap refresh hold and waiting for active auto-refreshes to prevent spread prepare races. | |
| stealth/space-bunny-alpha | — | closed superseded | Approved PR #1170 added a 24-hour snap refresh hold and waited for active auto-refreshes, then closed. PR #1190 pursued the same LXD race fix in spread prepare. | |
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
35
Quick Win:
30
Staleness:
15
Complexity:
15
Confidence:
85
|
needs review | Fixes spread prepare step race condition with snapd auto-refresh by holding refreshes and waiting for in-progress operations. Approved, CI passing. | |
| qwen/qwen3.8-27b |
Impact:
35
Quick Win:
30
Staleness:
5
Complexity:
15
Confidence:
65
|
needs review | Adds a 24-hour snap refresh hold and waits for in-progress auto-refresh before installing or refreshing snaps in the spread prepare step, fixing an intermittent LXD refresh race. Approved with 1 unresolved review comment; all CI passing except a pending OpenStack snap-tests job. | |
| qwen/qwen3.8-27b |
Impact:
25
Quick Win:
21
Staleness:
0
Complexity:
15
Confidence:
85
|
needs review | Adds refresh.hold and a snap watch for in-progress auto-refreshes to the spread prepare step, fixing intermittent 'auto-refresh change in progress' failures when refreshing the pre-installed LXD snap. New PR, CI mostly green, awaiting review. | |
| qwen/qwen3.8-27b |
Impact:
20
Quick Win:
17
Staleness:
5
Complexity:
15
Confidence:
85
|
needs review | Adds refresh.hold (24h) and waits for in-progress auto-refresh in the spread prepare step to fix intermittent 'snap lxd has auto-refresh change in progress' CI failures. Fresh, CI mostly green, 0 reviewers. | |
| qwen/qwen3.8-27b |
Impact:
30
Quick Win:
26
Staleness:
5
Complexity:
15
Confidence:
75
|
needs review | Adds 7 lines to spread.yaml prepare step to hold snap refreshes for 24h and wait for in-progress auto-refresh before installing LXD, fixing intermittent 'auto-refresh change in progress' CI failures. Fresh PR (0 days old), CI mostly passing with some pending checks, 1 unresolved review comment, pending review. |
Update history
| Date | Change |
|---|---|
| closed | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| created |
Related work
-
Related To:
craft-application#1190
(confidence 98%)
A later, narrower attempt at the same LXD auto-refresh race; it was closed unmerged after #1170 landed.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1133 test(spread): make LXD refresh in prepare more reliable | craft-application | closed | Closed unmerged; its LXD auto-refresh race fix was superseded by merged PR #1170 (commit fea3e835), which waits for active snap refreshes during spread prepare. | |
| #1190 test(spread): wait for pending snap auto-refresh before refreshing lxd | craft-application | closed | Superseded by merged PR canonical/craft-application#1170 (fea3e835), which added a broader snap auto-refresh hold and wait; #1190's narrower fix was closed unmerged. | |
| #1172 chore: block snap auto-refreshes during tests | craft-application | closed | PR #1172 (block snap auto-refreshes during tests) was closed unmerged as a duplicate of #1170, which already added a refresh hold and wait in spread prepare (merged as fea3e835). |