Specifying a nonexistent plug does cause any errors

Bug #1617302 reported by Matthew Williams
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
John Lenton

Bug Description

If for example I misspell network-bind

    command: foo
    plugs: [network-bin]

The snap still builds, but I get errors at runtime because no plug has been applied, it would be much better to error or at least warn that the plug I specified doesn't exist

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I am not sure how to fix this on snapcraft (as some interfaces may be specific to the target and not host) but leaving the bug open.

If there is a way to call snap and have it list in a machine readable format ALL the interface types it know about that we can already be in a good state in preventing typos. The other solution I am not fond of is a hard coded list, which would make new interfaces added to snapd harder to use as you will have to wait for snapcraft to whitelist it.

That said, snap could raise an error on invalid interface being used.

Changed in snapcraft:
status: New → Triaged
Michael Vogt (mvo)
summary: - Specifying a nonexistent part does cause any errors
+ Specifying a nonexistent plug does cause any errors
Revision history for this message
Leo Arias (elopio) wrote :

Bug #1697468 brings the idea of checking for well-formed names, using the same regexp that snapd uses for naming interfaces.

Revision history for this message
John Lenton (chipaca) wrote :

Sergio, let's chat about this sometime.

Changed in snappy:
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → Medium
assignee: nobody → John Lenton (chipaca)
John Lenton (chipaca)
Changed in snappy:
status: Triaged → Fix Committed
affects: snappy → snapd
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Snapd performs interface validation and snapcraft has access to this for a long time. Marking as released.

Changed in snapd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.