← Back to issue list

Unpredictable "passthrough" behaviour

View original Launchpad issue

Metadata

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

Current evaluation

Reports that a `passthrough:` key is flattened into meta/snap.yaml but left literal in a copied gadget.yaml, producing inconsistent output. Still reproduces in current code (snap_yaml.py vs setup_assets.py/package.py). No labels, no maintainer comments.

Suggested action: needs triage

Reason: The inconsistency is real and still present: snapcraft/meta/snap_yaml.py:507-508 expands `project.passthrough` into meta/snap.yaml, while gadget.yaml is copied/verbatim-read (snapcraft/parts/setup_assets.py:99-102 for core22, snapcraft/services/package.py:89-108 via `_read_project_metadata_file` for core24+), so a `passthrough` key survives as literal gadget data. A git log search for passthrough+gadget returns no fixing commit. However the issue has no labels, no comments, no assignee and no maintainer acknowledgement, and it states no expected behaviour or reproducer — it only notes the risk of 'unexpected content', so it still requires maintainer triage to decide whether the fix is expansion, a warning, or documentation (docs already advise removing passthrough keys in change-from-core20-to-core22.rst).

Evaluated by: mr-cal-bot

Impact: 28 Quick Win: 7 Complexity: 40 Confidence: 68 Actionability: 42

Issue body

"passthrough:" stanza behaves differently when used in snapcraft.yaml and gadget.yaml If used in snapcraft.yaml, "passthrough" level is removed and the block under "passthrough" is bumped one level up, without snapcraft doing any sanity parsing of that block. Like this, there is no "passthrough" in generated meta/snap.yaml I assume this is correct behaviour. But if "passthrough" us used in gadget.yaml, it is not touched and passed to generated meta/gadget.yaml This created inconsistent behaviour and easily leads to yaml file in gadget snap having unexpected content.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 28
Quick Win: 7
Complexity: 40
Confidence: 68
Actionability: 42
needs triage Reports that a `passthrough:` key is flattened into meta/snap.yaml but left literal in a copied gadget.yaml, producing inconsistent output. Still reproduces in current code (snap_yaml.py vs setup_assets.py/package.py). No labels, no maintainer comments.
stealth/space-bunny-alpha
Impact: 34
Quick Win: 9
Complexity: 47
Confidence: 80
Actionability: 49
needs triage Passthrough is expanded for snap.yaml but left intact in copied gadget.yaml, potentially producing unexpected gadget metadata; the report remains unlabelled and has no maintainer comments.
stealth/space-bunny-alpha
Impact: 28
Quick Win: 6
Complexity: 47
Confidence: 86
Actionability: 42
needs triage Snapcraft unwraps passthrough for snap.yaml but preserves gadget.yaml verbatim, leaving the key in generated gadget metadata. The report has no reproducer or specified expected outcome.
qwen3.6-35b-a3b-mtp-q6
Impact: 40
Quick Win: 28
Staleness: 95
Complexity: 30
Confidence: 65
Support Request: 20
close stale Inconsistent passthrough behavior between snapcraft.yaml and gadget.yaml; untriaged, no activity for 1326 days
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 90
Support Request: 10
close stale Reports inconsistent behavior of the passthrough stanza in snapcraft.yaml versus gadget.yaml. Issue has been inactive for over 3.5 years with no maintainer response or labels.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 45
Confidence: 75
Support Request: 10
needs triage Inconsistent YAML passthrough behavior between snapcraft.yaml and gadget.yaml configuration files. Issue remains unlabelled, unassigned, and completely inactive for over three years with zero maintainer engagement.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 50
Confidence: 80
Support Request: 10
needs triage Inconsistent handling of the passthrough stanza between snapcraft.yaml and gadget.yaml. The report is over three years old, lacks labels, and has received no maintainer comments or triage.

Update history

Date Change
created

Related work

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

    "snapcraft doesn't validate gadget.yaml" (open) is the same underlying gap: gadget.yaml is only copied/read, so unknown keys like passthrough pass through unvalidated.

  • Related To: canonical/snapcraft#4344 (confidence 70%)

    Open enhancement (CRAFT-3264) to treat gadget.yaml like other snap meta files; touches the same code paths (setup_assets.py, services/package.py) that would need changing to normalize passthrough.

Related issues

No related issues found above the similarity threshold.