On GET v2/snaps "channel" property is empty on preinstalled snaps
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Invalid
|
High
|
Samuele Pedroni |
Bug Description
Description:
When using REST API to query the installed snaps ("GET v2/snaps"), the "channel" fields are empty for those snaps which are preinstalled and not refreshed. However, "snap list" command gives a correct output.
Image:
http://
Reproduce method:
Run the ubuntu core image through KVM, and use cURL to query the snap list.
$ sudo snap install toolbox --devmode # for debugging
$ snap list --all
$ sudo timeout -s 2 2 toolbox.curl -N -s -0 --unix-socket /run/snapd.socket "http:/localhost
Output:
$ snap list --all
Name Version Rev Tracking Publisher Notes
core18 20200124 1668 latest/beta canonical* base
pc 18-2 36 18/beta canonical* gadget
pc-kernel 4.15.0-89.89 403 18/beta canonical* kernel
snapd 2.43.3 6434 latest/beta canonical* snapd,disabled
snapd 2.44~pre1+
toolbox 0.5.47 817 latest/stable ondra devmode
# part of the "v2/snaps" output
{
"id": "CSO04Jhav2yK0u
"summary": "Runtime environment based on Ubuntu 18.04",
"
"name": "core18",
"publisher": {
"id": "canonical",
"username": "canonical",
},
"developer": "canonical",
"status": "active",
"type": "base",
"version": "20200124",
"channel": "",
"
"
"revision": "1668",
"
"private": false,
"devmode": false,
"jailmode": false,
"contact": "",
"
"
},
{
"id": "PMrrV4ml8uWuEU
"title": "snapd",
"summary": "Background service that manages and maintains installed snaps",
"
at update automatically, are easy to install, secure, cross-platform and dependency-free. They're being used on millions of Linux systems every day.\n\nAlongside its var
ious service and management functions, snapd:\n- provides the _snap_ command that's used to install and remove snaps and interact with the wider snap ecosystem\n- implem
ents the confinement policies that isolate snaps from the base system and from each other\n- governs the interfaces that allow snaps to access specific system resources
outside of their confinement\n\nFor general details, including _installation_ and _Getting started_ guides, head over to our _Snap documentation_: https:/
docs\n\nIf you want to build your own snaps, start with our _Creating a snap_ documentation: https:/
_open source_ project and we warmly welcome community contributions, suggestions, and constructive feedback. If you're interested in contributing, please take a look at
our _Code of Conduct_ first.\n\n- to report an issue, please file _a bug report_ (https:/
ugs.launchpad.
nually, or to get started with snapd development, see _HACKING.md (https:/
ndly! We have a community forum at https:/
time with the snapd team and our wider community on the _#snappy_ (https:/
or news and updates, follow us on _T1witter_ (https:/
ound on GitHub: https:/
"icon": "https:/
"
"name": "snapd",
"publisher": {
"id": "canonical",
"username": "canonical",
},
"developer": "canonical",
"status": "active",
"type": "snapd",
"version": "2.44~pre1+
"channel": "latest/beta",
"
"
"revision": "6608",
"
"private": false,
"devmode": false,
"jailmode": false,
"contact": "",
"license": "GPL-3.0",
"
"website": "https:/
"media": [
{
"type": "icon",
"url": "https:/
"width": 460,
"height": 460
},
{
"type": "screenshot",
"url": "https:/
"width": 956,
"height": 648
},
{
"type": "screenshot",
"url": "https:/
"width": 956,
"height": 648
},
{
"type": "screenshot",
"url": "https:/
"width": 1023,
"height": 834
},
{
"type": "screenshot",
"url": "https:/
"width": 956,
"height": 648
}
],
"
}
Changed in snapd: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in snapd: | |
assignee: | nobody → Samuele Pedroni (pedronis) |
I looked into this now. It's a bit of an open question if it's a bug because technically we did not talk to the store yet so we don't have channel information. However it's also a bit strange to return "" here. I will lean on Samuele to decide what we should do. Something like https:/ /github. com/snapcore/ snapd/compare/ master. ..mvo5: snapstate- local-install- channel? expand= 1 might help.