The snap CLI incorrectly indicates that installation is possible from a closed channel.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
New
|
Undecided
|
Unassigned |
Bug Description
### Bug Description
Hi everyone,
We maintain the `k8s` snap and provide the following channels for each Kubernetes release:
```
1.XX
1.XX-classic
1.XX-moonray
```
We now had to close the 1.XX channels.
However, the snap CLI is now suggesting that the installation can proceed from higher-risk channels when attempting to install from 1.31/candidate, even though the channel is closed:
```
root@c2:~# sudo snap install k8s --channel=
error: snap "k8s" is not available on 1.31/candidate but is available to install on the following
channels:
1.31/beta snap install --channel=1.31/beta k8s
1.31/edge snap install --channel=1.31/edge k8s
Get more information with 'snap info k8s'.
```
Further attempts to install from 1.31/beta and 1.31/edge produce similar errors, with the CLI falling back to listing other tracks:
```
root@c2:~# sudo snap install k8s --channel=1.31/edge
error: snap "k8s" is not available on 1.31/edge but is available to install on the following tracks:
...
...
Please be mindful that different tracks may include different features. Get more information
with 'snap info k8s'.
```
Let us know if this is intended behavior or have suggestions for handling closed channels in this scenario.
Thanks!
### To Reproduce
Try to install from any risk level in 1.31
```
sudo snap install k8s --channel 1.31/candidate
```
### Environment
tested on LXD 22.04 but this also happens in other environments.