Charmhub compatibility references incorrect stable channel for bundles

Bug #1973624 reported by Adam Dyess
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Store Server
Fix Released
High
Guillermo Gonzalez

Bug Description

Lookups through the charmhub compatibility API seem to be resolving requests without a channel to the wrong stable channel:

Current Revisions & Channels:

---------------------------------------------
❯ charmcraft status charmed-kubernetes
Track Base Channel Version Revision
latest - stable 1020 1020
                 candidate 814 814
                 beta 1006 1006
                 edge 1026 1026
1.23 - stable - -
                 candidate - -
                 beta - -
                 edge 942 942
1.24 - stable 1021 1021
                 candidate ↑ ↑
                 beta 1005 1005
                 edge 1027 1027

# With a stable channel, the referenced bundle is latest/stable 1020
❯ curl 'https://api.jujucharms.com/charmstore/v5/charmed-kubernetes/meta/any?channel=stable'
{"Id":"cs:bundle/charmed-kubernetes-1020"}

# With a candidate channel, the referenced bundle is latest/candidate 814
❯ curl 'https://api.jujucharms.com/charmstore/v5/charmed-kubernetes/meta/any?channel=candidate'
{"Id":"cs:bundle/charmed-kubernetes-814"}

# With a beta channel, the referenced bundle is latest/beta 1006
❯ curl 'https://api.jujucharms.com/charmstore/v5/charmed-kubernetes/meta/any?channel=beta'
{"Id":"cs:bundle/charmed-kubernetes-1006"}

# With a edge channel, the referenced bundle is latest/edge 1026
❯ curl 'https://api.jujucharms.com/charmstore/v5/charmed-kubernetes/meta/any?channel=edge'
{"Id":"cs:bundle/charmed-kubernetes-1026"}

# Without a channel, the bundle resolved is 1.24/stable 1021
❯ curl 'https://api.jujucharms.com/charmstore/v5/charmed-kubernetes/meta/any'
{"Id":"cs:bundle/charmed-kubernetes-1021"}

---------------------------------------------

1021 - this bundle isn't the latest/stable bundle -- the expected bundle according to
1021 - this bundle isn't even the edgiest of bundles like 1026
1021 seems to be the most recently published bundle with a risk stable, but that doesn't mean it's the latest/stable

I believe the latest/stable channel should be referenced when the channel isn't provided by the compatibility api according to the charmstore docs https://github.com/juju/charmstore/blob/v5/docs/API.md#channels

Tags: charmhub
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

Thanks for reporting this problem.

I can confirm this is a filtering related bug on the compatibility API which is using the most recent released revision by only filtering by risk and not taking track into account.

Changed in snapstore-server:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Guillermo Gonzalez (verterok)
Changed in snapstore-server:
status: Confirmed → In Progress
Changed in snapstore-server:
status: In Progress → Fix Committed
Changed in snapstore-server:
status: Fix Committed → Fix Released
Revision history for this message
Adam Dyess (addyess) wrote :

Yep! Awesome. Works like a champ! Thanks so much

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.