Comment 2 for bug 1996590

Revision history for this message
John A Meinel (jameinel) wrote :

So I dug a bit more, and I do see the response from Charmhub indicating that there is both a jammy and a focal base available for the edge channel:

```
$ curl -X POST -H 'Content-type: application/json' -s https://api.charmhub.io/v2/charms/refresh -d '{"context": [], "actions": [{"name": "nginx-ingress-integrator", "base": {"architecture": "amd64", "name": "NA", "channel": "NA"}, "action": "install", "channel": "edge", "instance-key": "a-test"}]}' | jq .
{
  "error-list": [],
  "results": [
    {
      "charm": null,
      "error": {
        "code": "invalid-charm-base",
        "extra": {
          "default-bases": [
            {
              "architecture": "amd64",
              "channel": "20.04",
              "name": "ubuntu"
            },
            {
              "architecture": "amd64",
              "channel": "22.04",
              "name": "ubuntu"
            }
          ]
        },
        "message": "Instance key 'a-test' invalid 'base' in 'install' for charm_id=aQVXlrbsLWBTiAiQF0lilvUFolDOpKaE name=nginx-ingress-integrator"
      },
      "id": "aQVXlrbsLWBTiAiQF0lilvUFolDOpKaE",
      "instance-key": "a-test",
      "name": "nginx-ingress-integrator",
      "released-at": null,
      "result": "error"
    }
  ]
}
```

However, Charmhub still prefers Focal to Jammy (it comes first in the order).