api.snapcraft.io/charms/v5/meta/any does not return required include response

Bug #1967002 reported by Heather Lanigan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Store Server
Confirmed
Undecided
Jonathan Hartley

Bug Description

curl 'api.staging.snapcraft.io/charms/v5/meta/any?id=cs%3A~containers%2Fdocker-registry&ignore-auth=1&include=id-revision'
[{"Id":"cs:~containers/docker-registry-188"}]

"id-revision" data is not included in the response. Results in a juju error:

machine-0: 17:43:33 ERROR juju.apiserver.charmrevisionupdater charmstore: while getting latest charm revision info: cannot get metadata from the charm store: cannot unmarshal response: json: cannot unmarshal array into Go value of type map[string]struct { Meta struct { IdRevision params.IdRevisionResponse "json:\"id-revision\"" } }

From: https://github.com/juju/charmrepo/blob/e14fe8a32ad3f0927eed8cc7b139f23a61cc5d79/csclient/csclient.go#L1319

Revision history for this message
Daniel Manrique (roadmr) wrote :

Response should look like this:

{
  "cs:~containers/docker-registry": {
    "Id": "cs:~containers/docker-registry-240",
    "Meta": {
      "id-revision": {
        "Revision": 240
      }
    }
  }
}

Looks like "id-revision" is trivially the revision number that was resolved.

Changed in snapstore-server:
assignee: nobody → Jonathan Hartley (tartley)
status: New → Confirmed
Revision history for this message
Jonathan Hartley (tartley) wrote :
Revision history for this message
Jonathan Hartley (tartley) wrote :
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.