unused and potentially confusing support for plugs/slots at a part level in the snapcraft.yaml schema

Bug #1581166 reported by Zygmunt Krynicki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Zygmunt Krynicki
snapcraft (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * snapcraft has a schema that describes allowed snapcraft.yaml files. Part of this schema describes plugs and slots that are defined as the level of a part (so not globally and not at the level of an app).

 * keeping this code in the schema can create potential confusion for users who expect snapcraft to validate the input to be correct.

 * the change is minimal, altering the schema only

[Test Case]

 * create a snapcrat.yaml with a part defining a plug and a slot
 * run snapcraft
 * snapcraft should complain about the plug/slot definition at a part level

...
parts:
  foo:
    plugin: nil
    plugs: [iface1]
    slots: [iface2]
...

[Regression Potential]

 * snaps that used parts defining plugs or slots will no longer build
 * snaps that will be built after removing the offending declarations will behave exactly as before so the regression potential is minimal

[Other Info]

Zygmunt Krynicki (zyga)
Changed in snapcraft:
status: New → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
Changed in snapcraft:
milestone: none → 2.9
importance: Undecided → Medium
Changed in snapcraft (Ubuntu Xenial):
milestone: none → xenial-updates
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Kyle Fazzari (kyrofa)
Changed in snapcraft:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package snapcraft - 2.9+16.10

---------------
snapcraft (2.9+16.10) yakkety; urgency=medium

  [ Leo Arias ]
  * autopkgtests: run the install examples tests in classic. (#481)
    (LP: #1572764)

  [ Matteo Bertini ]
  * Fix typo in description of the python3 example. (#504)

  [ Jamie Bennett ]
  * Documentation: Use plugs instead of caps. (#507)

  [ Chris Wayne ]
  * Add in bash completion. (#453) (LP: #1570506)

  [ Sergio Schvezov ]
  * Fail validation if plugs or slots are declared at the part level (#514)
    (LP: #1581166)

  [ Kyle Fazzari ]
  * Make pull and build steps dirty if target arch changes. (#450)
    (LP: #1564192)
  * Add support for the confinement property. (#501) (LP: #1580819)
  * Add support for the epoch property. (#502) (LP: #1581113)

 -- Sergio Schvezov <email address hidden> Tue, 24 May 2016 23:32:11 -0300

Changed in snapcraft (Ubuntu Yakkety):
status: New → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Zygmunt, or anyone else affected,

Accepted snapcraft into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/snapcraft/2.9 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in snapcraft (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Leo Arias (elopio) wrote :

Tested in an up-to-date xenial system:
- Enabled the proposed archive
- updated snapcraft to 2.9
- cd into a directory and snapcraft init
- filled the required values, added one app and one part.
- added plugs to the part. It fails with the expected error message.
- added slots to the part. It fails with the expected error message.

I'm marking the verification as done. Thanks Chris!

tags: added: verification-done
removed: verification-needed
Changed in snapcraft:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package snapcraft - 2.9

---------------
snapcraft (2.9) xenial; urgency=medium

  [ Leo Arias ]
  * autopkgtests: run the install examples tests in classic. (#481)
    (LP: #1572764)

  [ Matteo Bertini ]
  * Fix typo in description of the python3 example. (#504)

  [ Jamie Bennett ]
  * Documentation: Use plugs instead of caps. (#507)

  [ Chris Wayne ]
  * Add in bash completion. (#453) (LP: #1570506)

  [ Sergio Schvezov ]
  * Fail validation if plugs or slots are declared at the part level (#514)
    (LP: #1581166)

  [ Kyle Fazzari ]
  * Make pull and build steps dirty if target arch changes. (#450)
    (LP: #1564192)
  * Add support for the confinement property. (#501) (LP: #1580819)
  * Add support for the epoch property. (#502) (LP: #1581113)

 -- Sergio Schvezov <email address hidden> Tue, 24 May 2016 23:32:11 -0300

Changed in snapcraft (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for snapcraft has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.