Support automatically cleaning dirty steps
Metadata
Current evaluation
Fixed by automatically cleaning dirty lifecycle steps in snapcraft PR #2145, merged as commit d033c7d0f.
Resolution: closed resolved
Reason: The proposed implementation was merged in snapcraft PR #2145 as commit d033c7d0f, titled "lifecycle: automatically clean dirty steps". It addresses the reported failure when lifecycle steps become dirty after earlier execution.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The snapcraft CLI currently errors out if a given step has already run, but changed since doing so (e.g. is a part has been pulled, but then has a `stage-package` added). We should support automatically cleaning these.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by automatically cleaning dirty lifecycle steps in snapcraft PR #2145, merged as commit d033c7d0f. | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft added automatic cleanup and rebuilding of outdated lifecycle steps in PR #2145, merged as commit d033c7d0f. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #2145 (commit d033c7d0f), adding opt-in automatic cleaning so changed lifecycle steps are rebuilt. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The automatic dirty step cleaning feature for snapcraft was abandoned after 86 days with zero comments or pull requests. Users must manually clean steps. | |
| qwen/qwen3.6-35b-a3b | — | — | Automatic cleaning of dirty steps in the snapcraft CLI was closed and abandoned due to inactivity. No implementation or resolution was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Requesting automatic cleaning of dirty steps in snapcraft was closed without implementation. Zero comments and no resolution indicate the feature request was abandoned due to inactivity. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without implementation. The feature request to automatically clean dirty steps in the snapcraft CLI was abandoned after eight years with no comments or associated pull requests. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcraft#2145
(confidence 100%)
The linked proposed solution is recorded in the repository as merged commit d033c7d0f implementing automatic cleanup of dirty steps.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1647907 When a step is dirty, snapcraft doesn't autoclean and reexecute it | snapcraft (launchpad) | closed | Automatic cleanup and rebuilding of outdated lifecycle steps was implemented in canonical/snapcraft#2145 and merged as d033c7d0f. | |
| #2145 lifecycle: automatically clean dirty steps | snapcraft | merged | Merged in canonical/snapcraft#2145 (commit d033c7d0f), adding opt-in outdated_step_action=clean to rebuild changed lifecycle steps and resolve LP #1774021. | |
| #1774260 Automatically clean and redo step if part is specified | snapcraft (launchpad) | closed | Explicitly named parts now clean and rerun the requested lifecycle step instead of being skipped; fixed by merged PR canonical/snapcraft#2152 (9d1407a85). | |
| #384 Support per-step clean command. | snapcraft | merged | Merged as commit 10772e569: adds a --step argument to `snapcraft clean`, cleaning of reverse dependencies, and placeholder per-step clean rules, advancing LP bug #1537786. Follow-up #401 implemented the real rules and closed the bug. | |
| #1561328 cleaning a step on a dir built with an old snapcraft doesn't mention that a full clean is needed too | snapcraft (launchpad) | closed | Closed by merged PR #421 (commit 6ade3431), which changed the step-clean error to suggest a full clean instead of re-running the step when state is missing from an older snapcraft build dir. | |
| #1578170 Your first snap: snapcraft clean needed before second snapcraft stage | snapcraft (launchpad) | closed | Fixed in canonical/snapcraft#4 by PRs #442–#448 (commits 1a6a21831, 80de92254, 6224553ae, da1411df0): snapcraft.yaml changes now dirty lifecycle steps, avoiding the required manual clean. | |
| #403 Added valid STEPs info to clean command | snapcraft | closed | Valid STEP help text for `snapcraft clean -s` was superseded by merged PR #423, landing as commit 28f568d99. | |
| #794 Improve lifecycle execution of steps | snapcraft | merged | Merged as commit f1ac5209f (snapcraft#794): lifecycle now runs steps in order using a list instead of a set, moving skip checks to runtime to speed up execution (LP #1590599). | |
| #1666366 Need --autoclean or similar | snapcraft (launchpad) | open | Requested opt-in automatic cleanup of stale lifecycle steps. The maintainer agreed with the opt-in approach, but current Snapcraft exposes no autoclean option or equivalent. | |
| #1957915 Cleaning later steps and re-pulling with snapcraft 6.0.1 | snapcraft (launchpad) | closed | Closed as stale after years of inactivity; no fix, resolving pull request, commit, or maintainer explanation was documented. |