Specifying a nonexistent plug does cause any errors

Bug #1617302 reported by Matthew Williams on 2016-08-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Undecided
Unassigned
snapd
Medium
John Lenton

Bug Description

If for example I misspell network-bind

apps:
  foo:
    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

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) on 2016-11-29
summary: - Specifying a nonexistent part does cause any errors
+ Specifying a nonexistent plug does cause any errors
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.

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) on 2019-12-05
Changed in snappy:
status: Triaged → Fix Committed
affects: snappy → snapd
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers