test(spread): wait out in-progress auto-refresh in prepare
Metadata
Current evaluation
Fixes spread prepare step race condition with snapd auto-refresh by holding refreshes and waiting for in-progress operations. Approved, CI passing.
Suggested action: needs review
Reason: PR is approved by 1 reviewer with 0 unresolved comments and all CI checks passing. The fix addresses a real intermittent test failure (snap auto-refresh race condition) by following Charmcraft's established approach. Ready for maintainer merge.
Impact:
35
Quick Win:
29.75
Staleness:
15
Complexity:
15
Confidence:
85
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 |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
35
Quick Win:
29.75
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:
29.75
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.25
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.0
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:
25.5
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 |
|---|---|
| updated | |
| updated | |
| updated | |
| updated | |
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1133 test(spread): make LXD refresh in prepare more reliable | craft-application | open | Retry only the known LXD auto-refresh transient error in spread prepare to avoid hard failures. Has 1 unresolved review comment, 49 days of inactivity, and failing CI checks. |