juju / python-libjuju

Python library for the Juju API
Apache License 2.0
59 stars 100 forks source link

[Juju 3.6] Restrict supported series by what controller actually supports #1172

Open dimaqq opened 3 hours ago

dimaqq commented 3 hours ago

Description

ResolveCharms returns:

{'request-id': 9, 'response': {'Results': [
{'url': 'ch:amd64/ubuntu-25', 'charm-origin':
 {'source': 'charm-hub', 'type': 'charm', 'id': '', 'risk': 'stable', 'revision': 25, 'track': 'latest',
  'architecture': 'amd64', 'base': {'name': 'ubuntu', 'channel': '22.04/stable'}},
  'supported-series': [
        'jammy',
        'focal',
        'bionic',
        'xenial',
        'trusty',
        'precise',
        'groovy',
        'disco',
        'cosmic',
        'artful',
        'vivid'
]}]}}

However, controller will reject an attempt to deploy on vivid.

Likewise, if the client always picked the newest (charmhub) base and ran against older Juju, client could ask for jammy that is not yet supported.

It's not an issue for older Jujus today, because older Juju returns 'ch:amd64/jammy/ubuntu-25' directly indicating the (preferred?) base.

Urgency

Casually reporting

Python-libjuju version

any

Juju version

3.6

Reproduce / Test

model.deploy("ubuntu")
dimaqq commented 3 hours ago

Connected: #1171

dimaqq commented 1 hour ago

Matrix: https://matrix.to/#/!wJiiHsLipVywuWOyNi:ubuntu.com/$6rfAHjMWxDSuib424AIN1pdjMJs2dp2QBSPYktCRw_w?via=ubuntu.com&via=matrix.org