Skip to content

Latest commit

 

History

History
99 lines (78 loc) · 3.82 KB

progressive-releases.org

File metadata and controls

99 lines (78 loc) · 3.82 KB

Progressive Releases

Scope

Progressive Releases is scoped to defining how progressive releases are executed and how their status is displayed.

Enabling the feature

As an experimental feature, an option must be used to enable this feature as defined on Enabling Experimental Features.

Such that a progressive status can only be shown or a progressive release executed if combined with the experimental flag:

snapcraft <status|release> --experimental-progressive-releases

Or with the following environment variable defined:

SNAPCRAFT_EXPERIMENTAL_PROGRESSIVE_RELEASES=y snapcraft <status|release>

When the flag is used, the following shall be displayed using snapcraft.cli.echo.warning:

*EXPERIMENTAL* progressive releases in use.

User Experience

Showing Progress

Progress shall be displayed when used when the definitions in Enabling the feature are satisfied.

When run, for the case of a snap that has a progressive release on the edge channel set to 80% with 71% for the progressive release and 23% of the population on the actual release, the following behavior shall be observed:

$ snapcraft status candycane
Track     Arch    Channel    Version    Revision    Progress
latest    all     stable     -          -           -
                  candidate  -          -           -
                  beta       0.6        8           23→20%
                             10         13          71→80%
                  edge       ↑          ↑           -

If a progressive release is done on edge while edge is currently following beta, then following information shall be observed:

$ snapcraft status candycane
Track     Arch    Channel    Version    Revision    Progress
latest    all     stable     -          -           -
                  candidate  -          -           -
                  beta       10         13           -
                  edge       ↑          ↑           55→40%
                             11         15          44→60%

Executing a Release

To execute a progressive release the following syntax shall be used, assuming the definitions in Enabling the feature are followed:

$ snapcraft release <snap-name> <revision> <channel,channel,...> --progressive <percentage>

Will create a progressive release for each channel with a percentage of percentage. After successfully releasing status as defined in Showing Progress scoped to tracks in channel the architecture of revision shall be displayed followed by the list of opened channels.

When the progressive percentage is set to 100%, a normal release shall take place.

Implementation

Snap Store API

New API is required to implement the progressive releases feature. That is provided by the channel-map endpoint.

Use of the API shall be mediated by implementation following the code style used in snapcraft.storeapi.

The existing release endpoint now takes a new parameter progressive where the percentage for the release is set.

As this API is the preferred mechanism used for displaying status, the state endpoint shall be removed from the code base.

Affected commands

These commands are affected as they display status information on command execution:

  • release
  • status
  • promote
  • close