"snap info" should provide detailed track/channel release information.

Bug #1675054 reported by Daniel Manrique
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Undecided
Unassigned

Bug Description

Snap info should show track information, if the snap is using tracks, under its channels section.

Current example:

$ snap info othersnap
name: othersnap
summary: "other-snap testing snap"
publisher: someone
description: |
  This is a test snap
channels:
  stable: 1.5 (4) 86kB -
  candidate: 1.5 (4) 86kB -
  beta: 1.5 (4) 86kB -
  edge: 1.5 (4) 86kB -

The design document suggests it should show information like this:

$ snap info othersnap
name: othersnap
summary: "Test snap"
publisher: someone
tracking: 2.1/stable
channels:
  - latest:
      stable: 3.1 (5) 0B -
      candidate: 3.1 (5) 0B -
      beta: 3.1 (5) 0B -
      edge: 3.1 (5) 0B -
  - 2.1:
      stable: 2.1 (1) 0B -
      candidate: 2.1 (1) 0B -
      beta: 2.3 (3) 0B -
      edge: 2.3 (3) 0B -

The detailed channel map list with track data can be obtained by asking for the channel_maps_list as a field when hitting the /details endpoint (if you don't ask for this info, it just will behave as before, so there's no compatibilities concern).

A real example from etcd, a snap that uses tracks:

$ curl -H 'x-ubuntu-series: 16' -H 'x-ubuntu-architecture: amd64' https://search.apps.ubuntu.com/api/v1/snaps/details/etcd?fields=name,revision,channel_maps_list | jq .

{
  "name": "etcd.canonical",
  "package_name": "etcd",
  "_links": {
    "curies": [
      {
        "href": "https://wiki.ubuntu.com/AppStore/Interfaces/ClickPackageIndex#reltype_{rel}",
        "name": "clickindex",
        "templated": true
      }
    ],
    "self": {
      "href": "https://search.apps.ubuntu.com/api/v1/snaps/details/etcd?fields=name,revision,channel_maps_list"
    }
  },
  "channel_maps_list": [
    {
      "track": "latest",
      "map": [
        {
          "info": "released",
          "version": "3.1.3",
          "binary_filesize": 7340032,
          "epoch": "0",
          "confinement": "strict",
          "channel": "stable",
          "revision": 41
        },
        {
          "info": null,
          "channel": "candidate"
        },
        {
          "info": null,
          "channel": "beta"
        },
        {
          "info": "released",
          "version": "3.1+master",
          "binary_filesize": 10715136,
          "epoch": "0",
          "confinement": "strict",
          "channel": "edge",
          "revision": 43
        }
      ]
    },
    {
      "track": "2.3",
      "map": [
        {
          "info": "released",
          "version": "2.3.8",
          "binary_filesize": 5795840,
          "epoch": "0",
          "confinement": "strict",
          "channel": "2.3/stable",
          "revision": 22
        },
        {
          "info": "released",
          "version": "2.3.8",
          "binary_filesize": 5795840,
          "epoch": "0",
          "confinement": "strict",
          "channel": "2.3/candidate",
          "revision": 39
        },
        {
          "info": null,
          "channel": "2.3/beta"
        },
        {
          "info": null,
          "channel": "2.3/edge"
        }
      ]
    },
    {
      "track": "3.0",
      "map": [
        {
          "info": "released",
          "version": "3.0.17",
          "binary_filesize": 7950336,
          "epoch": "0",
          "confinement": "strict",
          "channel": "3.0/stable",
          "revision": 24
        },
        {
          "info": "released",
          "version": "3.0.17",
          "binary_filesize": 7950336,
          "epoch": "0",
          "confinement": "strict",
          "channel": "3.0/candidate",
          "revision": 40
        },
        {
          "info": null,
          "channel": "3.0/beta"
        },
        {
          "info": null,
          "channel": "3.0/edge"
        }
      ]
    },
    {
      "track": "3.1",
      "map": [
        {
          "info": "released",
          "version": "3.1.3",
          "binary_filesize": 7340032,
          "epoch": "0",
          "confinement": "strict",
          "channel": "3.1/stable",
          "revision": 41
        },
        {
          "info": null,
          "channel": "3.1/candidate"
        },
        {
          "info": null,
          "channel": "3.1/beta"
        },
        {
          "info": "released",
          "version": "3.1+master",
          "binary_filesize": 10715136,
          "epoch": "0",
          "confinement": "strict",
          "channel": "3.1/edge",
          "revision": 43
        }
      ]
    },
    {
      "track": "ingest",
      "map": [
        {
          "info": "released",
          "version": "ingest-0.5",
          "binary_filesize": 4096,
          "epoch": "0",
          "confinement": "classic",
          "channel": "ingest/stable",
          "revision": 12
        },
        {
          "info": null,
          "channel": "ingest/candidate"
        },
        {
          "info": null,
          "channel": "ingest/beta"
        },
        {
          "info": null,
          "channel": "ingest/edge"
        }
      ]
    }
  ],
  "revision": 41
}

Revision history for this message
Michael Vogt (mvo) wrote :

Work has started, but some open questions needs to be resolved first, I started a discussion in https://forum.snapcraft.io/t/channels-2-0-implementation/156

Changed in snappy:
status: New → In Progress
Revision history for this message
Facundo Batista (facundo) wrote :

Thanks Michael!

Note that after we fixed a bug, we have channel_maps_list for hello-world again.

Changed in snappy:
status: In Progress → Fix Committed
Changed in snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.