Skip to content

Commit 6bfbe24

Browse files
committed
fix(series): add noble support
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 Add an integration test which deploys a charm to noble
1 parent 4737dc8 commit 6bfbe24

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)