Skip to content

Commit 18917b4

Browse files
authored
Merge pull request #1063 from jack-w-shaw/JUJU-6223_add_noble_support
#1063 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: #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.
2 parents 4737dc8 + 6bfbe24 commit 18917b4

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

juju/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ def get_local_charm_charmcraft_yaml(path):
301301
KINETIC = "kinetic"
302302
LUNAR = "lunar"
303303
MANTIC = "mantic"
304+
NOBLE = "noble"
304305

305306
UBUNTU_SERIES = {
306307
PRECISE: "12.04",
@@ -327,6 +328,7 @@ def get_local_charm_charmcraft_yaml(path):
327328
KINETIC: "22.10",
328329
LUNAR: "23.04",
329330
MANTIC: "23.10",
331+
NOBLE: "24.04",
330332
}
331333

332334
KUBERNETES = "kubernetes"

tests/integration/charm-manifest/manifest.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ bases:
99
- amd64
1010
channel: '20.04'
1111
name: ubuntu
12+
- architectures:
13+
- amd64
14+
channel: '24.04'
15+
name: ubuntu
1216
charmcraft-started-at: '2021-08-20T08:09:00.639806Z'
1317
charmcraft-version: 1.2.1

tests/integration/test_model.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,15 @@ async def test_deploy_with_base():
437437
await model.wait_for_idle(status='active')
438438

439439

440+
@base.bootstrapped
441+
async def test_deploy_noble():
442+
charm_path = INTEGRATION_TEST_DIR / 'charm-manifest'
443+
444+
async with base.CleanModel() as model:
445+
await model.deploy(str(charm_path), base="ubuntu@24.04")
446+
await model.wait_for_idle(status='active')
447+
448+
440449
@base.bootstrapped
441450
async def test_add_machine():
442451
from juju.machine import Machine

0 commit comments

Comments
 (0)