Skip to content

Commit a33f413

Browse files
[DPE-4976] Add workflow for nightly scheduled tests with juju 3.6 (#502)
* Add workflow for nightly scheduled tests with juju 3.6 * For testing purposes, only run 3.6 tests on amd64 * Only run 3.6 tests on PR + specify juju channel * Explicitly specify base for mysql-test-app + charmcraft prime files with consistent approach * Explicitly use base instead of series, and hardcode base as [email protected] * Explicitly specify base for subordinate charms as well * Enable juju 3.4.3 testing on PRs and only run 3.6 tests on nightly schedule * Run juju 3.6 tests on arm64 + amd64; run them on PR to confirm pass * Avoid running juju 3.6 tests on PRs * Add juju 3.6 in CI matrix and dpw will run it nightly only * Address PR feedback * Use dpw v21.0.0 * Remove duplicate entry + add entry for running tests on 3.6 on arm64 * Remove pin of lxd-snap-channel to always use the latest lxd channel * Upgrade all dpw dependencies to v21.0.0
1 parent 25a8a79 commit a33f413

19 files changed

+66
-44
lines changed

.github/workflows/ci.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,32 @@ jobs:
7070
allure_on_amd64: false
7171
- agent: 3.4.4 # renovate: juju-agent-pin-minor
7272
allure_on_amd64: true
73+
- snap_channel: 3.6/beta
74+
allure_on_amd64: false
7375
architecture:
7476
- amd64
7577
include:
7678
- juju:
7779
agent: 3.4.4 # renovate: juju-agent-pin-minor
7880
allure_on_amd64: true
7981
architecture: arm64
80-
name: Integration | ${{ matrix.juju.agent }} | ${{ matrix.architecture }}
82+
- juju:
83+
snap_channel: 3.6/beta
84+
allure_on_amd64: false
85+
architecture: arm64
86+
name: Integration | ${{ matrix.juju.agent || matrix.juju.snap_channel }} | ${{ matrix.architecture }}
8187
needs:
8288
- lint
8389
- unit-test
8490
- build
85-
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v20.0.2
91+
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v21.0.0
8692
with:
8793
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
8894
architecture: ${{ matrix.architecture }}
8995
cloud: lxd
9096
juju-agent-version: ${{ matrix.juju.agent }}
97+
juju-snap-channel: ${{ matrix.juju.snap_channel }}
9198
libjuju-version-constraint: ${{ matrix.juju.libjuju }}
92-
lxd-snap-channel: 5.21/stable
9399
_beta_allure_report: ${{ matrix.juju.allure_on_amd64 && matrix.architecture == 'amd64' }}
94100
secrets:
95101
# GitHub appears to redact each line of a multi-line secret

charmcraft.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ bases:
1010
channel: "22.04"
1111
architectures: [arm64]
1212
parts:
13+
files:
14+
plugin: dump
15+
source: .
16+
prime:
17+
- snap_revisions.json
1318
charm:
1419
override-pull: |
1520
craftctl default
@@ -19,8 +24,6 @@ parts:
1924
exit 1
2025
fi
2126
charm-strict-dependencies: true
22-
prime:
23-
- snap_revisions.json
2427
build-packages:
2528
- libffi-dev
2629
- libssl-dev

poetry.lock

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ parameterized = "^0.9.0"
5454

5555
[tool.poetry.group.integration.dependencies]
5656
pytest = "^7.4.0"
57-
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v20.0.2", subdirectory = "python/pytest_plugins/github_secrets"}
58-
pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v20.0.2", subdirectory = "python/pytest_plugins/microceph"}
57+
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
58+
pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/microceph"}
5959
pytest-operator = "^0.28.0"
60-
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v20.0.2", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
61-
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v20.0.2", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
62-
juju = "^3.2.2"
60+
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
61+
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
62+
juju = "^3.5.2.0"
6363
mysql-connector-python = "~8.0.33"
6464
tenacity = "^8.2.2"
6565
boto3 = "^1.28.11"
6666
pyyaml = "^6.0"
6767
urllib3 = "^1.26.16"
6868
allure-pytest = "^2.13.2"
69-
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v20.0.2", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
69+
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v21.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
7070

7171

7272
[tool.coverage.run]

tests/integration/high_availability/high_availability_helpers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async def deploy_and_scale_mysql(
142142
application_name=mysql_application_name,
143143
config=config,
144144
num_units=num_units,
145-
series="jammy",
145+
146146
)
147147

148148
await ops_test.model.wait_for_idle(
@@ -177,6 +177,7 @@ async def deploy_and_scale_application(ops_test: OpsTest) -> str:
177177
application_name=APPLICATION_DEFAULT_APP_NAME,
178178
num_units=1,
179179
channel="latest/edge",
180+
180181
)
181182

182183
await ops_test.model.wait_for_idle(

tests/integration/high_availability/test_async_replication.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@ async def test_build_and_deploy(
7979
application_name=MYSQL_APP1,
8080
num_units=3,
8181
config=config,
82+
8283
)
8384
config["cluster-name"] = "cuzco"
8485
await second_model.deploy(
8586
charm,
8687
application_name=MYSQL_APP2,
8788
num_units=3,
8889
config=config,
90+
8991
)
9092

9193
logger.info("Waiting for the applications to settle")
@@ -175,15 +177,15 @@ async def test_deploy_router_and_app(first_model: Model) -> None:
175177
await first_model.deploy(
176178
MYSQL_ROUTER_APP_NAME,
177179
application_name=MYSQL_ROUTER_APP_NAME,
178-
series="jammy",
180+
179181
channel="dpe/edge",
180182
num_units=1,
181183
trust=True,
182184
)
183185
await first_model.deploy(
184186
APPLICATION_APP_NAME,
185187
application_name=APPLICATION_APP_NAME,
186-
series="jammy",
188+
187189
channel="latest/edge",
188190
num_units=1,
189191
)

tests/integration/high_availability/test_replication.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ async def test_cluster_isolation(ops_test: OpsTest, highly_available_cluster) ->
285285
charm,
286286
application_name=ANOTHER_APP_NAME,
287287
num_units=1,
288-
series="jammy",
288+
289289
)
290290
async with ops_test.fast_forward("60s"):
291291
await ops_test.model.block_until(

tests/integration/high_availability/test_upgrade.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ async def test_deploy_latest(ops_test: OpsTest) -> None:
4444
num_units=3,
4545
channel="8.0/edge",
4646
config={"profile": "testing"},
47-
series="jammy",
47+
4848
),
4949
ops_test.model.deploy(
5050
TEST_APP_NAME,
5151
application_name=TEST_APP_NAME,
5252
num_units=1,
5353
channel="latest/edge",
54+
5455
),
5556
)
5657
await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP_NAME)

tests/integration/high_availability/test_upgrade_from_stable.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@ async def test_deploy_stable(ops_test: OpsTest) -> None:
3333
application_name=MYSQL_APP_NAME,
3434
num_units=3,
3535
channel="8.0/stable",
36-
series="jammy",
36+
3737
config={"profile": "testing"},
3838
),
3939
ops_test.model.deploy(
4040
TEST_APP_NAME,
4141
application_name=TEST_APP_NAME,
4242
num_units=1,
4343
channel="latest/edge",
44+
4445
),
4546
)
4647
await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP_NAME)

tests/integration/high_availability/test_upgrade_rollback_incompat.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
5353
charm,
5454
application_name=MYSQL_APP_NAME,
5555
num_units=3,
56-
series="jammy",
56+
5757
config={"profile": "testing", "plugin-audit-enabled": "false"},
5858
)
5959

@@ -62,6 +62,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
6262
application_name=TEST_APP,
6363
channel="latest/edge",
6464
num_units=1,
65+
6566
)
6667

6768
await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP)

tests/integration/relations/test_database.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
5757
application_name=DATABASE_APP_NAME,
5858
config=config,
5959
num_units=3,
60-
series="jammy",
60+
6161
),
6262
ops_test.model.deploy(
6363
APPLICATION_APP_NAME,
6464
application_name=APPLICATION_APP_NAME,
6565
num_units=2,
6666
channel="latest/edge",
67+
6768
),
6869
)
6970

tests/integration/relations/test_db_router.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def test_keystone_bundle_db_router(ops_test: OpsTest) -> None:
118118
config = {"cluster-name": CLUSTER_NAME, "profile": "testing"}
119119

120120
mysql_app = await ops_test.model.deploy(
121-
charm, application_name=APP_NAME, config=config, num_units=1, series="jammy"
121+
charm, application_name=APP_NAME, config=config, num_units=1, base="[email protected]"
122122
)
123123

124124
# Deploy keystone

tests/integration/relations/test_relation_mysql_legacy.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
5252
application_name=DATABASE_APP_NAME,
5353
config=config,
5454
num_units=3,
55-
series="jammy",
55+
5656
),
5757
ops_test.model.deploy(
5858
APPLICATION_APP_NAME,
5959
application_name=APPLICATION_APP_NAME,
6060
num_units=1,
6161
channel="latest/edge",
62+
6263
),
6364
)
6465

tests/integration/relations/test_shared_db.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ async def test_keystone_bundle_shared_db(ops_test: OpsTest) -> None:
161161
application_name=APP_NAME,
162162
config=config,
163163
num_units=3,
164-
series="jammy",
164+
165165
)
166166

167167
# Reduce the update_status frequency for the duration of the test

tests/integration/test_backup_aws.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
101101

102102
logger.info("Deploying s3 integrator")
103103

104-
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
104+
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="[email protected]")
105105
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)
106106

107107
await ops_test.model.wait_for_idle(

tests/integration/test_backup_ceph.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
101101

102102
logger.info("Deploying s3 integrator")
103103

104-
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
104+
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="[email protected]")
105105
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)
106106

107107
await ops_test.model.wait_for_idle(

tests/integration/test_backup_gcp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
101101

102102
logger.info("Deploying s3 integrator")
103103

104-
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
104+
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="[email protected]")
105105
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)
106106

107107
await ops_test.model.wait_for_idle(

tests/integration/test_subordinate_charms.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,20 @@ async def test_ubuntu_pro(ops_test, github_secrets):
2121
db_charm,
2222
application_name=DATABASE_APP_NAME,
2323
config={"cluster-name": CLUSTER_NAME, "profile": "testing"},
24-
series="jammy",
24+
2525
),
2626
ops_test.model.deploy(
2727
APPLICATION_APP_NAME,
2828
application_name=APPLICATION_APP_NAME,
2929
channel="latest/edge",
30+
3031
),
3132
ops_test.model.deploy(
3233
UBUNTU_PRO_APP_NAME,
3334
application_name=UBUNTU_PRO_APP_NAME,
3435
channel="latest/edge",
3536
config={"token": github_secrets["UBUNTU_PRO_TOKEN"]},
37+
3638
),
3739
)
3840
await ops_test.model.relate(
@@ -59,6 +61,7 @@ async def test_landscape_client(ops_test, github_secrets):
5961
"registration-key": github_secrets["LANDSCAPE_REGISTRATION_KEY"],
6062
"ppa": "ppa:landscape/self-hosted-beta",
6163
},
64+
6265
)
6366
await ops_test.model.relate(DATABASE_APP_NAME, LANDSCAPE_CLIENT_APP_NAME)
6467
async with ops_test.fast_forward("60s"):

0 commit comments

Comments
 (0)