Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPE-4976] Add workflow for nightly scheduled tests with juju 3.6 #502

Merged
merged 17 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
25715e9
Add workflow for nightly scheduled tests with juju 3.6
shayancanonical Aug 6, 2024
fdd1394
For testing purposes, only run 3.6 tests on amd64
shayancanonical Aug 6, 2024
b688db4
Only run 3.6 tests on PR + specify juju channel
shayancanonical Aug 6, 2024
7f55f13
Explicitly specify base for mysql-test-app + charmcraft prime files w…
shayancanonical Aug 13, 2024
45ac8e0
Merge branch 'main' into feature/juju_3_6_tests
shayancanonical Aug 19, 2024
3ca35c4
Explicitly use base instead of series, and hardcode base as ubuntu@22.04
shayancanonical Aug 19, 2024
4c7ba8e
Explicitly specify base for subordinate charms as well
shayancanonical Aug 19, 2024
d65a2a5
Enable juju 3.4.3 testing on PRs and only run 3.6 tests on nightly sc…
shayancanonical Aug 20, 2024
2e24f7d
Run juju 3.6 tests on arm64 + amd64; run them on PR to confirm pass
shayancanonical Aug 20, 2024
b2d40a4
Avoid running juju 3.6 tests on PRs
shayancanonical Aug 20, 2024
8b24091
Add juju 3.6 in CI matrix and dpw will run it nightly only
shayancanonical Aug 21, 2024
b2b1a00
Merge branch 'main' into feature/juju_3_6_tests
shayancanonical Aug 21, 2024
0f57e9a
Address PR feedback
shayancanonical Aug 21, 2024
775d5e5
Use dpw v21.0.0
shayancanonical Aug 21, 2024
12b4a0e
Remove duplicate entry + add entry for running tests on 3.6 on arm64
shayancanonical Aug 21, 2024
0cc2e09
Remove pin of lxd-snap-channel to always use the latest lxd channel
shayancanonical Aug 22, 2024
794aceb
Upgrade all dpw dependencies to v21.0.0
shayancanonical Aug 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,32 @@ jobs:
agent: 3.4.4 # renovate: juju-agent-pin-minor
allure_on_amd64: true
architecture: arm64
name: Integration | ${{ matrix.juju.agent }} | ${{ matrix.architecture }}
- juju:
snap_channel: 3.6/stable
libjuju: 3.5.2.0
shayancanonical marked this conversation as resolved.
Show resolved Hide resolved
allure_on_amd64: false
architecture: amd64
lxd_channel: 6.1/stable
- juju:
snap_channel: 3.6/stable
shayancanonical marked this conversation as resolved.
Show resolved Hide resolved
libjuju: 3.5.2.0
allure_on_amd64: false
architecture: arm64
shayancanonical marked this conversation as resolved.
Show resolved Hide resolved
lxd_channel: 6.1/stable
name: Integration | ${{ matrix.juju.agent }}${{ matrix.juju.snap_channel }} | ${{ matrix.architecture }}
shayancanonical marked this conversation as resolved.
Show resolved Hide resolved
needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v20.0.2
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@3.6-nightly # TODO: change back to a semver
with:
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
architecture: ${{ matrix.architecture }}
cloud: lxd
juju-agent-version: ${{ matrix.juju.agent }}
juju-snap-channel: ${{ matrix.juju.snap_channel }}
libjuju-version-constraint: ${{ matrix.juju.libjuju }}
lxd-snap-channel: 5.21/stable
lxd-snap-channel: ${{ matrix.lxd_channel || '5.21/stable' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use same lxd channel for all runs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running all tests with lxd 6.1/stable in 0f57e9a. please confirm that this is alright @taurus-forever

_beta_allure_report: ${{ matrix.juju.allure_on_amd64 && matrix.architecture == 'amd64' }}
secrets:
# GitHub appears to redact each line of a multi-line secret
Expand Down
6 changes: 4 additions & 2 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ bases:
channel: "22.04"
architectures: [arm64]
parts:
files:
plugin: nil
shayancanonical marked this conversation as resolved.
Show resolved Hide resolved
prime:
- snap_revisions.json
charm:
override-pull: |
craftctl default
Expand All @@ -19,8 +23,6 @@ parts:
exit 1
fi
charm-strict-dependencies: true
prime:
- snap_revisions.json
build-packages:
- libffi-dev
- libssl-dev
Expand Down
1 change: 0 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def deploy_and_scale_mysql(
application_name=mysql_application_name,
config=config,
num_units=num_units,
series="jammy",
base="ubuntu@22.04",
)

await ops_test.model.wait_for_idle(
Expand Down Expand Up @@ -177,6 +177,7 @@ async def deploy_and_scale_application(ops_test: OpsTest) -> str:
application_name=APPLICATION_DEFAULT_APP_NAME,
num_units=1,
channel="latest/edge",
base="ubuntu@22.04",
)

await ops_test.model.wait_for_idle(
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/high_availability/test_async_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ async def test_build_and_deploy(
application_name=MYSQL_APP1,
num_units=3,
config=config,
base="ubuntu@22.04",
)
config["cluster-name"] = "cuzco"
await second_model.deploy(
charm,
application_name=MYSQL_APP2,
num_units=3,
config=config,
base="ubuntu@22.04",
)

logger.info("Waiting for the applications to settle")
Expand Down Expand Up @@ -175,15 +177,15 @@ async def test_deploy_router_and_app(first_model: Model) -> None:
await first_model.deploy(
MYSQL_ROUTER_APP_NAME,
application_name=MYSQL_ROUTER_APP_NAME,
series="jammy",
base="ubuntu@22.04",
channel="dpe/edge",
num_units=1,
trust=True,
)
await first_model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
series="jammy",
base="ubuntu@22.04",
channel="latest/edge",
num_units=1,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/high_availability/test_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ async def test_cluster_isolation(ops_test: OpsTest, highly_available_cluster) ->
charm,
application_name=ANOTHER_APP_NAME,
num_units=1,
series="jammy",
base="ubuntu@22.04",
)
async with ops_test.fast_forward("60s"):
await ops_test.model.block_until(
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/high_availability/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ async def test_deploy_latest(ops_test: OpsTest) -> None:
num_units=3,
channel="8.0/edge",
config={"profile": "testing"},
series="jammy",
base="ubuntu@22.04",
),
ops_test.model.deploy(
TEST_APP_NAME,
application_name=TEST_APP_NAME,
num_units=1,
channel="latest/edge",
base="ubuntu@22.04",
),
)
await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ async def test_deploy_stable(ops_test: OpsTest) -> None:
application_name=MYSQL_APP_NAME,
num_units=3,
channel="8.0/stable",
series="jammy",
base="ubuntu@22.04",
config={"profile": "testing"},
),
ops_test.model.deploy(
TEST_APP_NAME,
application_name=TEST_APP_NAME,
num_units=1,
channel="latest/edge",
base="ubuntu@22.04",
),
)
await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
charm,
application_name=MYSQL_APP_NAME,
num_units=3,
series="jammy",
base="ubuntu@22.04",
config={"profile": "testing", "plugin-audit-enabled": "false"},
)

Expand All @@ -62,6 +62,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
application_name=TEST_APP,
channel="latest/edge",
num_units=1,
base="ubuntu@22.04",
)

await relate_mysql_and_application(ops_test, MYSQL_APP_NAME, TEST_APP)
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/relations/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
application_name=DATABASE_APP_NAME,
config=config,
num_units=3,
series="jammy",
base="ubuntu@22.04",
),
ops_test.model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
num_units=2,
channel="latest/edge",
base="ubuntu@22.04",
),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/relations/test_db_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async def test_keystone_bundle_db_router(ops_test: OpsTest) -> None:
config = {"cluster-name": CLUSTER_NAME, "profile": "testing"}

mysql_app = await ops_test.model.deploy(
charm, application_name=APP_NAME, config=config, num_units=1, series="jammy"
charm, application_name=APP_NAME, config=config, num_units=1, base="ubuntu@22.04"
)

# Deploy keystone
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/relations/test_relation_mysql_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
application_name=DATABASE_APP_NAME,
config=config,
num_units=3,
series="jammy",
base="ubuntu@22.04",
),
ops_test.model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
num_units=1,
channel="latest/edge",
base="ubuntu@22.04",
),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/relations/test_shared_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def test_keystone_bundle_shared_db(ops_test: OpsTest) -> None:
application_name=APP_NAME,
config=config,
num_units=3,
series="jammy",
base="ubuntu@22.04",
)

# Reduce the update_status frequency for the duration of the test
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_backup_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3 integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="ubuntu@22.04")
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)

await ops_test.model.wait_for_idle(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_backup_ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3 integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="ubuntu@22.04")
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)

await ops_test.model.wait_for_idle(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_backup_gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

logger.info("Deploying s3 integrator")

await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL)
await ops_test.model.deploy(S3_INTEGRATOR, channel=S3_INTEGRATOR_CHANNEL, base="ubuntu@22.04")
await ops_test.model.relate(mysql_application_name, S3_INTEGRATOR)

await ops_test.model.wait_for_idle(
Expand Down
5 changes: 4 additions & 1 deletion tests/integration/test_subordinate_charms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ async def test_ubuntu_pro(ops_test, github_secrets):
db_charm,
application_name=DATABASE_APP_NAME,
config={"cluster-name": CLUSTER_NAME, "profile": "testing"},
series="jammy",
base="ubuntu@22.04",
),
ops_test.model.deploy(
APPLICATION_APP_NAME,
application_name=APPLICATION_APP_NAME,
channel="latest/edge",
base="ubuntu@22.04",
),
ops_test.model.deploy(
UBUNTU_PRO_APP_NAME,
application_name=UBUNTU_PRO_APP_NAME,
channel="latest/edge",
config={"token": github_secrets["UBUNTU_PRO_TOKEN"]},
base="ubuntu@22.04",
),
)
await ops_test.model.relate(
Expand All @@ -59,6 +61,7 @@ async def test_landscape_client(ops_test, github_secrets):
"registration-key": github_secrets["LANDSCAPE_REGISTRATION_KEY"],
"ppa": "ppa:landscape/self-hosted-beta",
},
base="ubuntu@22.04",
)
await ops_test.model.relate(DATABASE_APP_NAME, LANDSCAPE_CLIENT_APP_NAME)
async with ops_test.fast_forward("60s"):
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/test_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
charm,
application_name=APP_NAME,
num_units=3,
series="jammy",
base="ubuntu@22.04",
)

# Reduce the update_status frequency until the cluster is deployed
Expand Down Expand Up @@ -117,7 +117,9 @@ async def test_enable_tls(ops_test: OpsTest) -> None:
# Deploy TLS Certificates operator.
logger.info("Deploy TLS operator")
async with ops_test.fast_forward("60s"):
await ops_test.model.deploy(tls_app_name, channel=tls_channel, config=tls_config)
await ops_test.model.deploy(
tls_app_name, channel=tls_channel, config=tls_config, base="ubuntu@22.04"
)
await ops_test.model.wait_for_idle(apps=[tls_app_name], status="active", timeout=15 * 60)

# Relate with TLS charm
Expand Down
Loading