Comment 4 for bug 1981579

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

Hi Guillermo, you marked this as Fix Released, but I see the same behavior in another charm that has a Focal vs Jammy release:

https://bugs.launchpad.net/juju/+bug/1996590

When I do the query, I see that it is, indeed, returning the possibility of Jammy, but it is not selecting that as the default base:
$ 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"
    }
  ]
}

Maybe this is just a misunderstanding on my part about base sorting order. I thought that it was in reverse descending LTS releases, which means that 22.04 should sort before 20.04.
But when I query a different charm (juju-controller) that does have a stable 22.04 release, it also seems to prefer focal to jammy.
(Though when I query something with a very long history, but not yet Jammy, I do see the reverse descending LTS order).