← Back to issue list

snapcraft clean failed but exit 0

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2044389
Type
issue
State
open
Author
~moisesperezespinosa
Labels
—
Created
Updated
Closed
—

Current evaluation

Snapcraft 7.5.3 reports a missing build environment during clean but exits 0; a maintainer confirmed the bug and agreed it should fail, with no fix recorded.

Suggested action: keep open

Reason: The reporter provides the exact command, version, error output, and observed return code, and maintainer @~mr-cal confirmed that exiting successfully when the build environment does not exist is incorrect. The issue remains open with no resolving commit or PR, and the desired behavior is clear, though implementation requires tracing and testing clean's error propagation.

Evaluated by: mr-cal-bot

Impact: 52 Quick Win: 31 Complexity: 34 Confidence: 95 Actionability: 90

Issue body

On our jenkins pipelines we're using snapcraft to generate our package. Just before calling 'snapcraft' command we use the 'snapcraft clean' command. We noticed the 'snapcraft clean' command without something to clean doesn't give an exit 1 error. Our shell scripts are set with the option > set -e This is the output of the 'snapcraft clean' command: ---------------------------------------------------------------------------------------------------- Calling 'snapcraft clean' ... info failed: The following errors occurred: instance "snapcraft-<app-name>" does not exist Starting Snapcraft 7.5.3 Logging execution to '/home/user/.local/state/snapcraft/log/snapcraft-20231122-235234.244208.log' ... 'snapcraft clean' complete. ---------------------------------------------------------------------------------------------------- Despite the reported error the return code is 0

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 52
Quick Win: 31
Complexity: 34
Confidence: 95
Actionability: 90
keep open Snapcraft 7.5.3 reports a missing build environment during clean but exits 0; a maintainer confirmed the bug and agreed it should fail, with no fix recorded.
stealth/space-bunny-alpha
Impact: 48
Quick Win: 25
Complexity: 42
Confidence: 94
Actionability: 89
keep open Acknowledged bug: Snapcraft 7.5.3 logs that the build environment does not exist during clean but exits 0; the maintainer agrees it should fail.
stealth/space-bunny-alpha
Impact: 42
Quick Win: 16
Complexity: 50
Confidence: 79
Actionability: 75
needs triage Snapcraft 7.5.3 reports a missing build instance during clean but returns exit code 0, allowing Jenkins set -e scripts to continue; the untriaged report remains unresolved.
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 35
Staleness: 85
Complexity: 30
Confidence: 55
Support Request: 10
close stale snapcraft clean returns exit code 0 despite reporting an error about missing instance. Reported for version 7.5.3, no maintainer response in 2.7 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 10
needs triage snapcraft clean reports an error but exits with code 0, breaking CI pipelines using set -e. The issue is unlabelled, has zero maintainer comments, and has been inactive for over two years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 10
close stale snapcraft clean returns exit code 0 despite printing an error about a missing instance, breaking scripts using set -e. Unlabelled, no maintainer response, inactive for over 2.5 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 10
Confidence: 75
Support Request: 5
needs triage snapcraft clean returns exit code 0 despite reporting an error about a missing instance, causing CI pipeline failures. Issue is unlabelled, inactive for ~2.6 years, and lacks maintainer response.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1497371 (confidence 82%)

    Earlier issue concerns snapcraft clean on an already-clean directory; it was closed without a documented fix.

Related issues

Issue Project State Summary Similarity
#1808800 snapcraft clean does not work inside snapcraft --debug snapcraft (launchpad) closed The managed-host failure in snapcraft clean inside snapcraft --debug was already fixed in an earlier release; maintainer confirmation was added on 2020-08-24.
78%
#1497371 snapcraft clean fails on a clean directory snapcraft (launchpad) closed The missing parts-directory crash in #1497371 was closed without a documented fixing PR, commit, release, or maintainer explanation.
77%
#1675516 can't cleanbuild snapcraft itself snapcraft (launchpad) closed Fresh testing confirmed Snapcraft could build itself successfully; the report was closed after the suspected interim fix was verified.
76%
#1697979 snapcraft fails on initial cleanbuild probe snapcraft (launchpad) closed Closed as obsolete: cleanbuild was decommissioned, and standard Snapcraft builds now transparently use a clean build environment.
76%
#1609803 snapcraft cleanbuild --no-clean-up snapcraft (launchpad) closed Cleanbuild debugging landed in snapcore/snapcraft PR #740 (commit a24083e75); follow-up PR #1404 made --debug enter a shell when builds fail.
76%
#1811208 snapcraft failed to build with cleanbuild on 18.04 snapcraft (launchpad) closed Expired after 60 days without activity; no fix was recorded. A maintainer advised using --destructive-mode because cross-compilation in build environments was unsupported.
75%
#1746381 snapcraft cleanbuild shouldn't always delete container at end snapcraft (launchpad) closed No fix was made: maintainers confirmed cleanbuild containers were disposable, recommended SNAPCRAFT_CONTAINER_BUILDS, and left the request for default failure shells unimplemented.
74%
#1746359 snapcraft cleanbuild --debug should provide guidance on build failure snapcraft (launchpad) closed Superseded by Snapcraft 3.x base-based build environments, which replaced the legacy cleanbuild --debug container workflow.
73%
#1690139 "snapcraft clean <part>" fails if the files I asked it to clean don't exist snapcraft (launchpad) closed Closed after a maintainer reported that `snapcraft clean` works as expected; no resolving PR or commit was cited.
73%
#1817288 snapcraft cleanbuild produces incorrect architecture snap snapcraft (launchpad) closed Bug (legacy cleanbuild naming a snap _multi.snap despite correct advanced architectures) was never fixed; closed in Aug 2023 by ~sergiusens noting cleanbuild is no longer supported and all builds are now transparently clean.
73%