Merge ~txiao/charm-infra-node:jammy-support into charm-infra-node:master

Proposed by Tianqi Xiao
Status: Merged
Approved by: Eric Chen
Approved revision: 572c798e12cb0bfbef6d7a5a6e97b40aa5826af9
Merged at revision: 94607333e68a9593f585750f4435234e640be133
Proposed branch: ~txiao/charm-infra-node:jammy-support
Merge into: charm-infra-node:master
Diff against target: 95 lines (+13/-11)
3 files modified
charmcraft.yaml (+4/-4)
src/metadata.yaml (+1/-1)
src/tests/functional/test_deploy.py (+8/-6)
Reviewer Review Type Date Requested Status
Eric Chen Approve
BootStack Reviewers Pending
Review via email: mp+427733@code.launchpad.net

Commit message

Add jammy support and update fixtures in func tests

Description of the change

- Added jammy support
- Dropped xenial in the main development track due to package dependency issue
- Updated fixtures in fun tests to resolve bug LP#1983398 [1]

[1]: https://bugs.launchpad.net/charm-nagios/+bug/1983398

func-test: https://pastebin.ubuntu.com/p/CnpWCYgWcS/

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Eric Chen (eric-chen) wrote :

I prefer to do 1 thing in one merge request only.
We should separate these two things into two MR.
- Jammy support
- Update pytest fixture for async functions

I can accept it this time since the MR is too simple.

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 94607333e68a9593f585750f4435234e640be133

Revision history for this message
Robert Gildein (rgildein) wrote (last edit ):

This has already been merged, but how was it tested? Can we add the
results of these tests here?

Revision history for this message
Tianqi Xiao (txiao) wrote :

Thanks Robert for your feedback. I've added the func-test result to the MP description.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charmcraft.yaml b/charmcraft.yaml
2index 29d1baa..7e84403 100644
3--- a/charmcraft.yaml
4+++ b/charmcraft.yaml
5@@ -7,18 +7,18 @@ parts:
6 bases:
7 - build-on:
8 - name: ubuntu
9- channel: "18.04"
10+ channel: "22.04"
11 architectures: ["amd64"]
12 run-on:
13 - name: ubuntu
14- channel: "20.04"
15+ channel: "22.04"
16 architectures:
17 - amd64
18 - name: ubuntu
19- channel: "18.04"
20+ channel: "20.04"
21 architectures:
22 - amd64
23 - name: ubuntu
24- channel: "16.04"
25+ channel: "18.04"
26 architectures:
27 - amd64
28diff --git a/src/metadata.yaml b/src/metadata.yaml
29index 9dc2306..6d3f4bc 100644
30--- a/src/metadata.yaml
31+++ b/src/metadata.yaml
32@@ -14,4 +14,4 @@ provides:
33 series:
34 - bionic
35 - focal
36- - xenial
37+ - jammy
38diff --git a/src/tests/functional/test_deploy.py b/src/tests/functional/test_deploy.py
39index d83e09a..10faad9 100644
40--- a/src/tests/functional/test_deploy.py
41+++ b/src/tests/functional/test_deploy.py
42@@ -1,18 +1,19 @@
43 import os
44 from collections import defaultdict
45 import pytest
46+import pytest_asyncio
47 from juju.model import Model
48
49 # Treat tests as coroutines
50 pytestmark = pytest.mark.asyncio
51
52-series = ['xenial', 'bionic', 'focal']
53+series = ['bionic', 'focal', 'jammy']
54 nagios_series = defaultdict(lambda: 'bionic')
55 nagios_series['xenial'] = "xenial"
56 charm_location = os.getenv('CHARM_LOCATION', '.').rstrip('/')
57
58
59-@pytest.fixture
60+@pytest_asyncio.fixture
61 async def model():
62 model = Model()
63 await model.connect_current()
64@@ -20,7 +21,7 @@ async def model():
65 await model.disconnect()
66
67
68-@pytest.fixture
69+@pytest_asyncio.fixture
70 async def apps(model):
71 apps = []
72 for entry in series:
73@@ -29,7 +30,7 @@ async def apps(model):
74 return apps
75
76
77-@pytest.fixture
78+@pytest_asyncio.fixture
79 async def units(apps):
80 units = []
81 for app in apps:
82@@ -43,10 +44,11 @@ async def test_infranode_deploy(model, series):
83 await model.deploy('{}/infra-node.charm'.format(charm_location),
84 series=series,
85 application_name='infra-node-{}'.format(series))
86- await model.deploy('cs:nagios',
87+ await model.deploy('ch:nagios',
88 series=nagios_series[series],
89 application_name='nagios-{}'.format(series))
90- await model.deploy('cs:nrpe',
91+ await model.deploy('cs:nrpe', # after jammy support made available to nrpe,
92+ # we need to change the source to charmhub(ch)
93 series=series,
94 application_name='nrpe-{}'.format(series),
95 num_units=0)

Subscribers

People subscribed via source and target branches

to all changes: