Add support for epoch property

Bug #1581113 reported by Kyle Fazzari
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Click Reviewers tools (obsolete)
Fix Released
Undecided
Unassigned
Snapcraft
Fix Released
Wishlist
Kyle Fazzari
snapcraft (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * In order to support step upgrades, snaps need to be able to specify upgrade paths.

 * The method decided upon to specify upgrade paths is an optional "epoch" property. Valid values consist of integers and an asterisk (e.g. 1 is epoch 1, 1* is the upgrade path from 1 to 2, and 2 is epoch 2).

 * `snapcraft init` should not specify "epoch" at all.

 * The "epoch" property, if specified, should be copied into the resulting `snap.yaml`.

 * Example YAML:

        name: foo
        version: 1
        summary: foo
        description: foo
        epoch: 1*

        parts:
          foo:
            plugin: nil

[Test Case]

 * Run `snapcraft init`. Make sure "epoch" is not specified.

 * Create a valid snapcraft.yaml (without "epoch" property) and run `snapcraft` on it. Make sure the resulting `snap.yaml` doesn't contain "epoch" property.

 * Create a valid snapcraft.yaml and include the "epoch" property. Run `snapcraft`. Make sure the resulting `snap.yaml` contains the same "epoch" property.

[Regression Potential]

 * snapcraft.yaml validation could be incorrect (required properties may not be required correctly, etc.)

Kyle Fazzari (kyrofa)
Changed in snapcraft:
importance: Undecided → High
assignee: nobody → Kyle Fazzari (kyrofa)
status: New → In Progress
milestone: none → 2.9
importance: High → Wishlist
Revision history for this message
Kyle Fazzari (kyrofa) wrote :
Kyle Fazzari (kyrofa)
description: updated
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Note that this is closely related to https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1583298 for snapd. They're kept separate to make the SRUs easier to test.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Adding the review tool since it probably requires changes to handle this new property.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I worked on this last week. It is in yakkety, working through SRU in xenial and the store guys will pull it in this week.

Changed in click-reviewers-tools:
status: New → Fix Released
Changed in snapcraft (Ubuntu Xenial):
milestone: none → xenial-updates
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 Kyle, 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. No epoch in the snapcraft.yaml
- copied an example without an epoch and snapcraft it. No epoch in the snap.yaml
- Added an epoch. It also appears in the snap.yaml.

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.