cli: migrate close to use the new channel map
Metadata
Current evaluation
Merged migration of the close CLI command to the new channel map. Fixed a bug where channels were incorrectly shown as open due to missing progressive release awareness. Simplified tests, added a TODO for upload logic, and passed CI checks.
Suggested action: —
No scores available.
Issue body
The implementation was moved to the CLI as being done for all commands.
With this, the new implementation for displaying a channel map is used,
which avoids the bug in the channel_map_tree returned in close that is
not progressive release aware and shows channels mistakenly as open.
The closed_channels API results are skipped as well as they are not
really track aware, returning mixed results for tracks in some scenarios
and plain risks for others (when latest is used, which is not allowed
when using more than one track).
The tests have been simplified to the concerns of the close CLI results
as display variants of the channel map tree are already done under test_status.
A missing todo checklist entry was added to take care of the upload logic.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged migration of the close CLI command to the new channel map. Fixed a bug where channels were incorrectly shown as open due to missing progressive release awareness. Simplified tests, added a TODO for upload logic, and passed CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged migration of the close CLI command to a new channel map implementation. Fixes a bug where channels were incorrectly shown as open due to missing progressive release awareness. Tests simplified, problematic API results skipped, and upload logic TODO added. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged migration of the close CLI command to a new channel map implementation. This fixes a bug where channels were incorrectly shown as open due to missing progressive release awareness. Tests were simplified and a TODO for upload logic was added. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3145 cli: migrate upload and release to new channel-map | snapcraft | merged | Migrated CLI upload and release commands to the new channel-map. Approved by a reviewer, passed CI checks, and merged into master with a net reduction of 9 lines across 5 files. | |
| #3008 cli: use the channel-map api for status | snapcraft | merged | Merged into main branch. Updates the CLI status command to use the channel-map API, introduces the --experimental-progressive-delivery flag, and fixes the channel-map schema. The author dismissed a CI spread failure as unrelated to the changes. | |
| #3116 cli: fix following hints in channel status | snapcraft | merged | Merged a fix for the CLI channel status command. The following logic previously ignored prior states, incorrectly marking all channels as closed. The update now correctly tracks state history to display accurate following status. Approved and passed CI. |