← Back to issue list

Can’t distinguish programmatically between snapcraft.yaml errors and other errors

View original Launchpad issue

Metadata

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

Current evaluation

Requests a programmatic distinction (exit code) between snapcraft.yaml errors and other snapcraft failures, for build.snapcraft.io UI. Still unimplemented: errors.py subclasses set retcode in only 3 cases. Needs re-triage.

Suggested action: keep open

Reason: Maintainer ~kalikiana acknowledged the request and named the implementation path ("This can actually be implemented now by adding get_exit_code to error subclasses in snapcraft/internal/errors.py"), so the issue is acknowledged and valid rather than untriaged. Inspection confirms it is still open: snapcraft/errors.py has SnapcraftError(CraftError) with retcode support, but ProjectValidationError, SnapcraftAssertionError and MissingBase never set one, and commands/lint.py only runs snaplint on a built .snap rather than validating snapcraft.yaml. Impact is modest because the original consumer, build.snapcraft.io, was superseded by Launchpad builds, and the legacy core22 vs craft-application split means scope should be re-confirmed.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 11 Complexity: 35 Confidence: 72 Actionability: 55

Issue body

Apologies for the incomplete bug report. snapcraft may return an error because of a problem with the snapcraft.yaml (for example bug 1578024), or it may fail for other reasons (for example bug 1624019) Evan says that currently, there is not a programmatic distinction (such as an error code) between these two kinds of error. This would be helpful in build.snapcraft.io, so that snapcraft.yaml-specific errors can be attached to the snapcraft.yaml UI.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 11
Complexity: 35
Confidence: 72
Actionability: 55
keep open Requests a programmatic distinction (exit code) between snapcraft.yaml errors and other snapcraft failures, for build.snapcraft.io UI. Still unimplemented: errors.py subclasses set retcode in only 3 cases. Needs re-triage.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 29
Complexity: 24
Confidence: 88
Actionability: 86
close resolved Programmatic snapcraft.yaml error classification through exception exit codes was implemented by PR #1491; this historical issue remained open.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 19
Complexity: 20
Confidence: 90
Actionability: 80
close resolved Requested programmatic distinction between snapcraft.yaml errors and other errors. Resolved via error hierarchy refactor (PR #2602) introducing ProjectValidationError and other typed exceptions.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18
Staleness: 95
Complexity: 40
Confidence: 60
Support Request: 15
close stale 2016 feature request for programmatic error codes distinguishing snapcraft.yaml validation failures from other build errors, so build.snapcraft.io could attach yaml errors to its UI. No labels, no comments, no maintainer activity for ~9.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 25
close stale Feature request to add programmatic error codes distinguishing snapcraft.yaml validation errors from other runtime failures. Issue is completely inactive with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 20
Confidence: 85
Support Request: 10
close stale Feature request from 2015 asking for distinct error codes to differentiate snapcraft.yaml errors from other failures. No maintainer engagement, labels, or activity in over 9 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 80
Support Request: 10
close stale Feature request from 9+ years ago asking for distinct error codes to differentiate snapcraft.yaml errors from other failures. Zero maintainer activity since 2021. Project architecture has likely evolved significantly since then.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1578024 (confidence 45%)

    Cited in the issue body as an example of a snapcraft.yaml-caused failure that callers currently cannot distinguish

  • Related To: snapcraft (launchpad)#1624019 (confidence 45%)

    Cited in the issue body as the contrasting 'other reason' failure that must be distinguishable from YAML errors

Related issues

No related issues found above the similarity threshold.