Mixed `juju info` for the same architecture and the same base

Bug #2031409 reported by Nobuto Murata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned
Snap Store Server
New
Undecided
Unassigned

Bug Description

When I try to query what charm revision is available for 22.04 and amd64, I get the mixed results from `juju info`.

$ snap list juju
Name Version Rev Tracking Publisher Notes
juju 3.1.5 23354 3.1/stable canonical✓ -

$ juju info ubuntu
...
supports: ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
subordinate: false
channels: |
  latest/stable: 24 2023-05-26 (24) 2MB amd64, arm, arm64, i386, ppc64 ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
  latest/candidate: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64 ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
  latest/beta: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64 ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
  latest/edge: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64 ubuntu@18.04, ubuntu@20.04, ubuntu@22.04

^^^ it seems to be revision "24" for 22.04 and amd64

$ juju info --base ubuntu@22.04 ubuntu
...
supports: ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
subordinate: false
channels: |
  latest/stable: 24 2023-05-26 (24) 2MB amd64, arm, arm64, i386, ppc64
                     21 2022-09-15 (21) 2MB amd64
  latest/candidate: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64
                     21 2022-09-15 (21) 2MB amd64
  latest/beta: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64
                     21 2022-09-15 (21) 2MB amd64
  latest/edge: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64
                     21 2022-09-15 (21) 2MB amd64

^^^ this query shows both revision "21" and "24"

$ juju info --arch amd64 ubuntu
...
supports: ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
subordinate: false
channels: |
  latest/stable: 24 2023-05-26 (24) 2MB ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
  latest/candidate: 24 2023-05-19 (24) 2MB ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
  latest/beta: 24 2023-05-19 (24) 2MB ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
  latest/edge: 24 2023-05-19 (24) 2MB ubuntu@18.04, ubuntu@20.04, ubuntu@22.04

^^^ this query only shows "24"

Tags: bitesize
Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Joseph Phillips (manadart) wrote :

This might be a Charmhub issue. Can you confirm Heather?

Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
Revision history for this message
John A Meinel (jameinel) wrote :

My guess is that there is confusion around a given track and architecture and a charm that claims multiple architecture / multiple base support.

Specifically, if you download ubuntu_r24, then it has this in metadata.yaml:

series:
  - focal
  - bionic
  - jammy

and this in manifest.yaml:
bases:
- architectures:
  - amd64
  - arm
  - arm64
  - i386
  - ppc64
  channel: '18.04'
  name: ubuntu
- architectures:
  - amd64
  - arm
  - arm64
  - i386
  - ppc64
  channel: '20.04'
  name: ubuntu
- architectures:
  - amd64
  - arm
  - arm64
  - i386
  - ppc64
  channel: '22.04'
  name: ubuntu

Which does indicate that it supports all the architectures for 22.04 with that version.

That said, I'm guessing that at some point in the past revision 21 of the charm was uploaded to just the sub channel latest/edge amd64, probably with metadata that didn't indicate it supported "all" versions.

That does, generally, indicate that there is inconsistent information in charmhub itself:
$ juju info --base ubuntu@22.04 ubuntu
name: ubuntu
publisher: charmers
summary: A pristine Ubuntu Server
description: |
  This simply deploys the Ubuntu Cloud/Server image
store-url: https://charmhub.io/ubuntu
charm-id: DksXQKAQTZfsUmBAGanZAhpoS4dpmXel
supports: ubuntu@18.04, ubuntu@20.04, ubuntu@22.04
subordinate: false
channels: |
  latest/stable: 24 2023-05-26 (24) 2MB amd64, arm, arm64, i386, ppc64
                     21 2022-09-15 (21) 2MB amd64
  latest/candidate: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64
                     21 2022-09-15 (21) 2MB amd64
  latest/beta: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64
                     21 2022-09-15 (21) 2MB amd64
  latest/edge: 24 2023-05-19 (24) 2MB amd64, arm, arm64, i386, ppc64
                     21 2022-09-15 (21) 2MB amd64

tags: added: charmhub
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Not a charm hub issue.

The juju client has to parse response data from charm hub to display this data. It appears how we parse for results asking for a base is different from parsing for an architecture.

tags: added: bitesize
removed: charmhub
Changed in juju:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
John A Meinel (jameinel) wrote :
Download full text (3.5 KiB)

You can run:
juju --debug --logging-config "#charmhub=TRACE" info --base ubuntu@22.04 ubuntu

To get the concrete request and responses. from Charmhub.

I see that Charmhub is returning a response for:
        {
            Channel: transport.Channel{
                Name: "candidate",
                Base: transport.Base{Architecture:"amd64", Name:"ubuntu", Channel:"16.04"},
                ReleasedAt: "2022-09-15T15:21:00.599964+00:00",
                Risk: "candidate",
                Track: "latest",
            },
            Revision: transport.InfoRevision{
                ConfigYAML: "",
                CreatedAt: "2022-09-15T14:31:52.411705+00:00",
                Download: transport.Download{HashSHA256:"", HashSHA384:"", Size:2113928, URL:""},
                MetadataYAML: "",
                BundleYAML: "",
                Bases: {
                    {Architecture:"amd64", Name:"ubuntu", Channel:"16.04"},
                    {Architecture:"amd64", Name:"ubuntu", Channel:"18.04"},
                    {Architecture:"amd64", Name:"ubuntu", Channel:"20.04"},
                    {Architecture:"amd64", Name:"ubuntu", Channel:"22.04"},
                },
                Revision: 21,
                Version: "21",
            },
        },

and
        {
            Channel: transport.Channel{
                Name: "stable",
                Base: transport.Base{Architecture:"arm64", Name:"ubuntu", Channel:"22.04"},
                ReleasedAt: "2023-05-26T00:01:57.835985+00:00",
                Risk: "stable",
                Track: "latest",
            },
            Revision: transport.InfoRevision{
                ConfigYAML: "",
                CreatedAt: "2023-05-19T14:05:37.530491+00:00",
                Download: transport.Download{HashSHA256:"", HashSHA384:"", Size:2139977, URL:""},
                MetadataYAML: "",
                BundleYAML: "",
                Bases: {
                    {Architecture:"amd64", Name:"ubuntu", Channel:"18.04"},
                    {Architecture:"arm", Name:"ubuntu", Channel:"18.04"},
                    {Architecture:"arm64", Name:"ubuntu", Channel:"18.04"},
                    {Architecture:"i386", Name:"ubuntu", Channel:"18.04"},
                    {Architecture:"ppc64", Name:"ubuntu", Channel:"18.04"},
                    {Architecture:"amd64", Name:"ubuntu", Channel:"20.04"},
                    {Architecture:"arm", Name:"ubuntu", Channel:"20.04"},
                    {Architecture:"arm64", Name:"ubuntu", Channel:"20.04"},
                    {Architecture:"i386", Name:"ubuntu", Channel:"20.04"},
                    {Architecture:"ppc64", Name:"ubuntu", Channel:"20.04"},
                    {Architecture:"amd64", Name:"ubuntu", Channel:"22.04"},
                    {Architecture:"arm", Name:"ubuntu", Channel:"22.04"},
                    {Architecture:"arm64", Name:"ubuntu", Channel:"22.04"},
                    {Architecture:"i386", Name:"ubuntu", Channel:"22.04"},
                    {Architecture:"ppc64", Name:"ubuntu", Channel:"22.04"},
                },
                Revision: 24,
                Ve...

Read more...

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

John is correct, the data includes all revisions in a channel since the last time the channel was closed by the charm owner via charmcraft. So some tracks have multiple revisions. Things like displaying a closed track are interpreted from the result data rather than explicitly defined in that data. This makes the order of the result data very important.

The `juju info` output above the `channels: |` line comes from the Default listed at the bottom of the info result data.

Changed in juju:
assignee: Heather Lanigan (hmlanigan) → nobody
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.