charm channel branch is not visible in juju info

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

Bug Description

juju version: 3.5.4-genericlinux-amd64

When we have a branch in a charm channel e.g. <track>/<risk>/<branch>, it's not visible in juju info although juju deploy and juju download work with no problem.
https://juju.is/docs/juju/channel#heading--branch

$ juju info postgresql --channel 14/edge/pr611 --base ubuntu@22.04
name: postgresql
publisher: Canonical
summary: Charmed PostgreSQL VM operator
description: |
  Charm to operate the PostgreSQL database on machines.
store-url: https://charmhub.io/postgresql
charm-id: ChgcZB3RhaDOnhkAv9cgRg52LhjBbDt8
tags: databases
subordinate: false

^^^ No revision information is available.

$ juju download postgresql --channel 14/edge/pr611 --base ubuntu@22.04
Fetching charm "postgresql" revision 483 using "14/edge/pr611" channel and base "amd64/ubuntu/22.04"
Install the "postgresql" charm with:
    juju deploy ./postgresql_r483.charm

^^^ but the download actually works.

Revision history for this message
Nobuto Murata (nobuto) wrote :

Looks like a charmhub issue.

11:21:31 TRACE juju.cmd.juju.charmhub.client http.go:235 GET request GET /v2/charms/info/postgresql?channel=14%2Fedge%2Fpr611&fields=result.categories.featured%2Cresult.categories.name%2Cresult.contains-charms.name%2Cresult.contains-charms.package-id%2Cresult.contains-charms.store-url%2Cresult.description%2Cresult.license%2Cresult.publisher.display-name%2Cresult.store-url%2Cresult.summary%2Cdefault-release.revision.download.size%2Cdefault-release.revision.config-yaml%2Cdefault-release.revision.metadata-yaml%2Cdefault-release.revision.bundle-yaml%2Cdefault-release.revision.bases.architecture%2Cdefault-release.revision.bases.name%2Cdefault-release.revision.bases.channel%2Cdefault-release.revision.revision%2Cdefault-release.revision.version%2Cdefault-release.channel.name%2Cdefault-release.channel.base.architecture%2Cdefault-release.channel.base.name%2Cdefault-release.channel.base.channel%2Cdefault-release.channel.released-at%2Cdefault-release.channel.risk%2Cdefault-release.channel.track%2Cchannel-map.revision.download.size%2Cchannel-map.revision.created-at%2Cchannel-map.revision.bases.architecture%2Cchannel-map.revision.bases.name%2Cchannel-map.revision.bases.channel%2Cchannel-map.revision.revision%2Cchannel-map.revision.version%2Cchannel-map.channel.name%2Cchannel-map.channel.base.architecture%2Cchannel-map.channel.base.name%2Cchannel-map.channel.base.channel%2Cchannel-map.channel.released-at%2Cchannel-map.channel.risk%2Cchannel-map.channel.track HTTP/1.1

11:21:32 TRACE juju.cmd.juju.charmhub.client info.go:98 Info() unmarshalled: transport.InfoResponse{
    Type: "charm",
    ID: "ChgcZB3RhaDOnhkAv9cgRg52LhjBbDt8",
    Name: "postgresql",
    Entity: transport.Entity{
        Categories: {
            {Featured:false, Name:"databases"},
        },
        Charms: nil,
        Description: "Charm to operate the PostgreSQL database on machines.\n",
        License: "",
        Publisher: {"display-name":"Canonical", "id":"gVVkuxw4C56POG1eszt4RPR3L5Eak8XE", "username":"data-platform", "validation":"unproven"},
        Summary: "Charmed PostgreSQL VM operator",
        UsedBy: nil,
        StoreURL: "https://charmhub.io/postgresql",
    },
    ChannelMap: {
    },
    DefaultRelease: transport.InfoChannelMap{},
    ErrorList: nil,
}
name: postgresql
publisher: Canonical
summary: Charmed PostgreSQL VM operator
description: |
  Charm to operate the PostgreSQL database on machines.
store-url: https://charmhub.io/postgresql
charm-id: ChgcZB3RhaDOnhkAv9cgRg52LhjBbDt8
tags: databases
subordinate: false
11:21:32 INFO cmd supercommand.go:556 command finished

Revision history for this message
Alastair Flynn (aflynn50) wrote :

Hey Nobuto, this does indeed look like an issue with the charmhub api. It seems the information is not included in the response. The branch information is however included in the request, which is why download works correctly.

To fix this in Juju we would first need an update to the charmhub API.

Changed in juju:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Heather Lanigan (hmlanigan) wrote (last edit ):

@nobutu, this is expected behavior and maps to the same behavior with snaps. Branches are transient and can disappear anytime after 30 days. They should only be used by those told of them, not discovered.

"Branch names convey their purpose, such as fix-for-bug123, but the name isn’t exposed in the normal way, such as with the snap info command. Instead, they can only be installed by someone who knows the branch name, and this is usually only shared by the snap developer to test a specific fix or releases" - https://snapcraft.io/docs/channels#:~:text=A%20branch%20is%20an%20optional,with%20fixes%20or%20temporary%20experimentation.

Changed in juju:
status: Triaged → Invalid
Revision history for this message
Nobuto Murata (nobuto) wrote :

1. the explanation in the snapcraft doc is not in the Juju documentation:
https://juju.is/docs/juju/channel#heading--branch

2. I'm not asking for the discoverability of channel branch names. The use case here is an user already knows the branch name and they would like to see the revision information in the channel branch as in the bug description. Because there may be revision 2, 3, 4, and on for a bug fix by having multiple rounds of fixes and testing.

$ juju info postgresql --channel 14/edge/pr611 --base ubuntu@22.04

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.