Support the new channels.json format in a backward compatible way

Bug #1221841 reported by Stéphane Graber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu system image
Fix Released
Critical
Barry Warsaw

Bug Description

To allow for the new channel alias feature and for hidden channels, we need to change the channels.json format to be more flexible.

An example of the new syntax is as follow:
{
    "daily": {
        "alias": "saucy",
        "devices": {
            "grouper": {
                "index": "/daily/grouper/index.json"
            },
            "maguro": {
                "index": "/daily/maguro/index.json"
            },
            "mako": {
                "index": "/daily/mako/index.json"
            },
            "manta": {
                "index": "/daily/manta/index.json"
            }
        }
    },
    "saucy": {
        "devices": {
            "grouper": {
                "index": "/daily-proposed/grouper/index.json"
            },
            "maguro": {
                "index": "/daily-proposed/maguro/index.json"
            },
            "mako": {
                "index": "/daily-proposed/mako/index.json"
            },
            "manta": {
                "index": "/daily-proposed/manta/index.json"
            }
        }
    },
    "saucy-proposed": {
        "hidden": true,
        "devices": {
            "grouper": {
                "index": "/daily-proposed/grouper/index.json"
            },
            "maguro": {
                "index": "/daily-proposed/maguro/index.json"
            },
            "mako": {
                "index": "/daily-proposed/mako/index.json"
            },
            "manta": {
                "index": "/daily-proposed/manta/index.json"
            }
        }
    }
}

There are three main changes:
 - Addition of "hidden", boolean, defaults to false. When set to true, the client shouldn't include that channel in any user visible list, though it should still allow updating to/within that channel.
 - Addition of "alias", string, defaults to non-existent. When set, points to the name of the channel this alias is based on. It's currently safe for the client to ignore this and just consider the channel as a regular channel.
 - All the devices are moved from directly within the channel dict to a sub-dict called "devices", syntax within it remains unchanged.

This needs to be supported in system-image-cli ASAP as the planned cut-off is Thursday next week (12th of September) and we need to allow users to update to a newer system-image-cli before that (so that their device understand both formats and can deal with the change).

Tags: client
Changed in ubuntu-system-image:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Barry Warsaw (barry)
tags: added: client
Barry Warsaw (barry)
Changed in ubuntu-system-image:
milestone: none → 1.5
status: Triaged → In Progress
Revision history for this message
Barry Warsaw (barry) wrote :

For the record and verification, if a channel has a device specific keyring, it'll still show up in under the 'keyring' field as before ('keyring' is a sibling of 'index').

Revision history for this message
Stéphane Graber (stgraber) wrote :

Yes, device keyrings are per-device and show up next to index.

Barry Warsaw (barry)
Changed in ubuntu-system-image:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in ubuntu-system-image:
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.