When a snap has been published and has an established user base, tracks and channels help balance the risk of a release containing unexpected issues against user expectations for new features. This is covered in Release management.
Progressive releases offer an additional strategy to help mitigate the risk of unexpected issues affecting users. They help by making a release available only to a specific percentage of a snap’s user base. This percentage can be initially small, perhaps 10% or 20%, and increases as confidence in a release grows.
To deploy a progressive releases, add an additional argument to the
snapcraft release command, which itself operates on an uploaded revision of a snap:
snapcraft release <snap-name> <revision> <channel> --progressive <percent>
The percentage value defines the proportion of devices a progressive release will be deployed to.
This feature is currently considered experimental, and its implementation may change. See the Progressive releases specification for more details.
Creating a progressive release
Progressive releases are currently considered an experimental feature and require Snapcraft 4.4+ . To enable this feature, add the following flag to the snapcraft command:
First, ensure there is a revision of the target snap available on the Snap Store. See Releasing your app for details on building and uploading locally, or Remote build to create a revision on remote servers using Launchpad.
snapcraft revisions command can be used to see which revisions have been uploaded and available:
$ snapcraft revisions <snap-name> Rev. Uploaded Arches Version Channels 357 2020-11-03T11:29:13Z amd64,armhf 4.1255 - 356 2020-11-03T08:27:23Z amd64,armhf 4.1249 latest/candidate* 355 2020-10-26T13:07:16Z amd64,armhf 4.1246 latest/stable
In the above example output, revision 357 of the snap has been uploaded but has not been released, revision 356 is on the candidate channel and 355 is on the stable channel. To release revision 356 to the stable channel of the default (latest) track, issue the following command:
$ snapcraft release <snap-name> 356 stable
To release revision 356 to the stable channel of the default (latest) track as a progressive release, with 30% deployment, issue the following command:
$ snapcraft release <snap-name> 356 stable --progressive 30
The command above will release the snap to 30% of devices, chosen pseudo-randomly based in part on a hash of their device ID, with the snap installed from its stable channel. This means that roughly every third device will get the update when it next requests a refresh.
Monitoring a release
The snapcraft status command can be used to monitor the progress of a progressive release:
$ snapcraft status <snap-name> Track Arch Channel Version Revision Progress latest amd64 stable 4.1246 341 73 → 70% 4.1249 355 21 → 30% candidate ↑ ↑ - beta - - - edge - - -
The above output shows that the progressive release of the stable channel has been set to target 30% of devices, with 70% remaining on revision 341 and 30% upgrading to revision 355. The Progress column shows the current deployment progress towards those percentages.
If an issue is discovered with a revision deployed as a progressive release, a new revision can be built and uploaded to address the issue without further deployment. When the new revision is itself published as a progressive release to the same channel, the devices that received the earlier release will be prioritised.
Last updated 1 year, 9 months ago.