When a step is dirty, snapcraft doesn't autoclean and reexecute it
Metadata
Current evaluation
Automatic cleanup and rebuilding of outdated lifecycle steps was implemented in canonical/snapcraft#2145 and merged as d033c7d0f.
Resolution: closed resolved
Reason: Resolved by canonical/snapcraft#2145, which implemented automatic cleanup and re-execution of dirty lifecycle steps and merged as commit d033c7d0f.
Evaluated by: mr-cal-bot
No scores available.
Issue body
In a python snap, I changed the python-version and then re-run the snapcraft command. I got this:
The 'pull' step of 'my-part' is out of date:
The 'python-version' part property appears to have changed.
Please clean that part's 'pull' step in order to continue
I think that this message should never be displayed to the user. Instead, we should notice that the part is dirty, clean it, and continue.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Automatic cleanup and rebuilding of outdated lifecycle steps was implemented in canonical/snapcraft#2145 and merged as d033c7d0f. | |
| stealth/space-bunny-alpha | — | closed resolved | Automatic cleanup and rebuilding of outdated lifecycle steps was merged in canonical/snapcraft#2145 (commit d033c7d0f), with opt-in outdated-step cleaning. | |
| stealth/space-bunny-alpha | — | closed resolved | Automatic cleanup and rebuilding of outdated lifecycle steps was implemented in canonical/snapcraft#2145, merged as commit d033c7d0f. | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft now automatically cleans dirty lifecycle steps and reruns them via merged PR #2145 (commit d033c7d0f). | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. Automatic step cleaning was not implemented, requiring manual intervention. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The request for automatic dirty-step cleaning was abandoned due to prolonged inactivity. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed and abandoned. The requested auto-cleaning and reexecution for dirty steps was not implemented. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#2145
(confidence 99%)
Implemented the requested automatic cleanup and rebuild behavior.
-
Related To:
canonical/snapcraft@d033c7d0f
(confidence 99%)
Merged resolving commit.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #1774021 Support automatically cleaning dirty steps | snapcraft (launchpad) | closed | Fixed by automatically cleaning dirty lifecycle steps in snapcraft PR #2145, merged as commit d033c7d0f. | |
| #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). | |
| #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. | |
| #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. | |
| #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. | |
| #1477904 snapcraft.yaml needs to make all stages dirty (was: the can't add file without recreating entire package) | snapcraft (launchpad) | closed | snapcraft.yaml changes now invalidate and rerun all lifecycle steps, implemented by canonical/snapcraft PRs #442–#448; final pull-stage fix landed as da1411df0. | |
| #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). | |
| #1537786 lifecycle: allow do clean rebuild of all/parts without having to pull all again | snapcraft (launchpad) | closed | Added per-part, per-step clean commands via merged canonical/snapcraft PR #401 (88d21b180), allowing lifecycle rebuilds without recloning all sources. | |
| #1513 lifecycle: outdated step should raise SnapcraftError | snapcraft | merged | Merged PR #1513 in commit 141d7fdd7, updating lifecycle handling so outdated steps raise SnapcraftError derivatives. |