Behavior change: risk-only channel specifications will not switch track!

upcoming

#1

We are planning to change the behavior of refresh/switch operations when a risk and only a risk (edge,beta,candidate,stable) is specified, to only change the risk but keep what is the current track of the installation of the snap.

This means for example if a snap is tracking 2.0/stable, snap refresh --candidate SNAP would refresh and switch to using 2.0/candidate. (Now it would jump to latest/candidate).

The context of this is the coming introduction of default tracks and is a generalization of what was done for model-pinned tracks and hinted there.

Reasoning

The tracks of a snap should represent established development trails of its software with a smooth upgrade story within them. Changing the track for an already existing install should be an explicit decision/operation.

So far a snap can have a set of optional tracks and a latest track which represents a rolling development trail. We are working introducing the concept of a default track for a snap, a pointer to one of those tracks, that would typically represent what is currently recommended when starting with a fresh install. The default track would change over time, but preexisting installs would not follow on a change. A snap with a default track might not have a latest track at all.

An install specifying --edge|--beta|--candidate|--stable would use the default track if that is set, whereas this asks for latest/RISK now.

This opens the question of what refresh/switch operations should do in this new world when only a risk is specified. At the moment they ask for a jump all the way to latest/RISK. Historically these options existed before the introduction of tracks at all, given that as we remarked changing track for an existing install should be a very conscious/explicit decision we wonder if keeping that behavior is sensible within the now much richer world of tracks and default tracks, and think it is appropriate to consider moving to a safer behavior where they switch only the risk keeping the current track.

Specifying a full channel with a track would still allow to switch track, and we would also introduce a default alias to refer to the current default track. Also for a snap with only a latest track the behavior would also continue to be the same.

We are interested in feedback about this planned behavior change.


#2