← Back to issue list

in order to clean, the snapcraft.yaml has to be valid and the parts cache up-to-date

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1596596
Type
issue
State
closed
Author
~elopio
Labels
—
Created
Updated
Closed

Current evaluation

Full-workspace `snapcraft clean` no longer needs a valid snapcraft.yaml or updated parts cache. Fixed by merged snapcore/snapcraft PR #1007 (commit bacf75dfe); maintainer kyrofa pointed to it when closing LP#1596596.

Resolution: closed resolved

Reason: PR canonical/snapcraft#1007 ("lifecycle: clean without parsing if possible") was merged as commit bacf75dfe, letting a full clean skip YAML parsing; maintainer ~kyrofa linked that PR on 2016-12-19 as the fix before the Launchpad bug was closed.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When you try to clean up the snapcraft workspace, it will fail if the yaml file is not valid or if you are using a wiki part and haven't run snapcraft update. This happens because in order to clean up a step or a part, parsing the yaml is necessary. But it shouldn't be necessary to parse it if we just want to clean up everything. It should just delete the dirs even if the yaml is not valid.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Full-workspace `snapcraft clean` no longer needs a valid snapcraft.yaml or updated parts cache. Fixed by merged snapcore/snapcraft PR #1007 (commit bacf75dfe); maintainer kyrofa pointed to it when closing LP#1596596.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR canonical/snapcraft#1007 (bacf75dfe): full-workspace cleanup now skips YAML parsing, allowing cleanup despite invalid snapcraft.yaml or an outdated parts cache.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #1416 (commit 7a181162c), making cleanup work without requiring valid snapcraft.yaml or an updated parts cache.
qwen/qwen3.6-35b-a3b — — Abandoned without resolution. The reported limitation where snapcraft clean fails on invalid YAML or outdated cache remains unaddressed, as no fix or pull request was provided.
qwen/qwen3.6-35b-a3b — — Cleanup failures caused by invalid YAML or stale cache were not addressed. The request to bypass YAML parsing during workspace deletion was closed without resolution, indicating the enhancement was abandoned.
qwen/qwen3.6-35b-a3b — — Requested snapcraft clean behavior bypassing YAML validation was closed without resolution. No fix or pull request was implemented, indicating the report was abandoned due to inactivity.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#1007 (confidence 96%)

    Merged PR bacf75dfe making clean skip yaml parsing when cleaning the whole project; cited by kyrofa in the closing comment.

Related issues

Issue Project State Summary Similarity
#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.
75%
#1007 lifecycle: clean without parsing if possible. snapcraft merged Merged in snapcraft#1007 via commit bacf75dfe, allowing full clean operations to bypass snapcraft.yaml parsing unless part-specific cleanup is required.
72%
#1777501 snapcraft clean should require a minimal valid yaml with at least a name snapcraft (launchpad) closed Added validation so snapcraft clean rejects missing or invalid snapcraft.yaml without a name; fixed by merged PR #2458 (commit bf5dbbb3f).
71%