juju / python-libjuju

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

fix(series): add noble support #1063

Closed jack-w-shaw closed 2 months ago

jack-w-shaw commented 3 months ago

The pylibjuju client hardcodes a mapping between series codename and the base channel.

Noble was absent from this mapping, meaning pylibjuju doesn't know know to deploy to noble.

Add noble to this mapping.

After noble, we will only support deploying by base. Noble will be the last series added to this map

Fixes: https://github.com/juju/python-libjuju/issues/1062

QA Steps

Download a local charm juju download ubuntu, unzip, and amend the manifest,yaml to support ubuntu@24.04

Place the charm dir at ./ubuntu

You will see

$ cat ./ubuntu/manifest.yaml
bases:
- architectures:
  - amd64
  channel: '20.04'
  name: ubuntu
- architectures:
  - amd64
  channel: '22.04'
  name: ubuntu
- architectures:
  - amd64
  channel: '24.04'
  name: ubuntu

Then:

$ juju bootstrap lxd lxd
$ juju add-model
$ python -m asyncio
>>> from juju.model import Model
>>> m = Model()
>>> await m.connect()
>>> await m.deploy("./ubuntu", series="noble")
<Application entity_id="ubuntu">
>>> exit
(wait)
$ juju status
 Model  Controller  Cloud/Region         Version      SLA          Timestamp
m      lxd         localhost/localhost  3.6-beta1.1  unsupported  12:03:15+01:00

App     Version  Status  Scale  Charm   Channel  Rev  Exposed  Message
ubuntu  24.04    active      1  ubuntu             0  no       

Unit       Workload  Agent  Machine  Public address  Ports  Message
ubuntu/0*  active    idle   0        10.219.211.77          

Machine  State    Address        Inst id        Base          AZ  Message
0        started  10.219.211.77  juju-742671-0  ubuntu@24.04      Running

All CI tests need to pass.

jack-w-shaw commented 3 months ago

Yeah this makes sense, let's also add an integration test that deploys a workload on noble, just to catch future regressions about that, because compatibility across versions will be relevant when the 4.0 comes, we don't wanna miss anything there.

Integration test added

jack-w-shaw commented 3 months ago

/merge

jack-w-shaw commented 3 months ago

/merge

UtkarshBhatthere commented 2 months ago

Hey guys! is there any ETA for this patch to land ?

cderici commented 2 months ago

/merge

sabaini commented 2 months ago

Hm, it looks like merging is still blocked?

cderici commented 2 months ago

@UtkarshBhatthere @sabaini Yeah we're currently working on fixing some trouble with the jenkins job, it should be fixed in a day or two, after that, we're good to go 👍

jack-w-shaw commented 2 months ago

/merge

jack-w-shaw commented 2 months ago

/merge

jack-w-shaw commented 2 months ago

/merge

jack-w-shaw commented 2 months ago

/merge