This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:charmed-hpc/slurmd-operator into pu…
…ll-ci-fixes Pulls the latest CI changes to be able to correctly test our patches.
- Loading branch information
Showing
5 changed files
with
25 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,12 +65,16 @@ jobs: | |
|
||
integration-test: | ||
strategy: | ||
fail-fast: true | ||
fail-fast: false | ||
matrix: | ||
bases: | ||
bases: | ||
- [email protected] | ||
name: Integration tests (LXD) | ${{ matrix.bases }} | ||
local: [true, false] | ||
name: Integration tests (LXD) ${{ matrix.local && '|' || '| Charmhub (edge) |'}} ${{ matrix.bases }} | ||
runs-on: ubuntu-latest | ||
# Testing against Charmhub will probably yield errors when doing breaking changes, so don't | ||
# block CI on that. | ||
continue-on-error: ${{ !matrix.local }} | ||
needs: | ||
- inclusive-naming-check | ||
- lint | ||
|
@@ -79,10 +83,21 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: main | ||
- name: Fetch slurmctld | ||
uses: actions/checkout@v4 | ||
if: ${{ matrix.local }} | ||
with: | ||
repository: charmed-hpc/slurmctld-operator | ||
path: slurmctld-operator | ||
- name: Setup operator environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: lxd | ||
juju-channel: 3.1/stable | ||
- name: Run tests | ||
run: tox run -e integration -- --charm-base=${{ matrix.bases }} | ||
run: | | ||
cd main && tox run -e integration -- \ | ||
--charm-base=${{ matrix.bases }} \ | ||
${{ matrix.local && '--use-local' || '' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,12 @@ | |
@pytest.mark.skip_if_deployed | ||
@pytest.mark.order(1) | ||
async def test_build_and_deploy( | ||
ops_test: OpsTest, charm_base: str, slurmd_charm, slurmctld_charm, slurmdbd_charm | ||
ops_test: OpsTest, charm_base: str, slurmd_charm, slurmctld_charm | ||
) -> None: | ||
"""Test that the slurmd charm can stabilize against slurmctld, slurmdbd and MySQL.""" | ||
logger.info(f"Deploying {SLURMD} against {SLURMCTLD}, {SLURMDBD}, and {DATABASE}") | ||
logger.info(f"Deploying {SLURMD} against {SLURMCTLD}") | ||
# Pack charms and download NHC resource for slurmd operator. | ||
slurmd, slurmctld, slurmdbd = await asyncio.gather( | ||
slurmd_charm, slurmctld_charm, slurmdbd_charm | ||
) | ||
slurmd, slurmctld = await asyncio.gather(slurmd_charm, slurmctld_charm) | ||
# Deploy the test Charmed SLURM cloud. | ||
await asyncio.gather( | ||
ops_test.model.deploy( | ||
|
@@ -58,33 +56,9 @@ async def test_build_and_deploy( | |
num_units=1, | ||
base=charm_base, | ||
), | ||
ops_test.model.deploy( | ||
str(slurmdbd), | ||
application_name=SLURMDBD, | ||
channel="edge" if isinstance(slurmdbd, str) else None, | ||
num_units=1, | ||
base=charm_base, | ||
), | ||
ops_test.model.deploy( | ||
ROUTER, | ||
application_name=f"{SLURMDBD}-{ROUTER}", | ||
channel="dpe/edge", | ||
num_units=0, | ||
base=charm_base, | ||
), | ||
ops_test.model.deploy( | ||
DATABASE, | ||
application_name=DATABASE, | ||
channel="8.0/edge", | ||
num_units=1, | ||
base="[email protected]", | ||
), | ||
) | ||
# Set relations for charmed applications. | ||
await ops_test.model.integrate(f"{SLURMD}:{SLURMCTLD}", f"{SLURMCTLD}:{SLURMD}") | ||
await ops_test.model.integrate(f"{SLURMDBD}:{SLURMCTLD}", f"{SLURMCTLD}:{SLURMDBD}") | ||
await ops_test.model.integrate(f"{SLURMDBD}-{ROUTER}:backend-database", f"{DATABASE}:database") | ||
await ops_test.model.integrate(f"{SLURMDBD}:database", f"{SLURMDBD}-{ROUTER}:database") | ||
# Reduce the update status frequency to accelerate the triggering of deferred events. | ||
async with ops_test.fast_forward(): | ||
await ops_test.model.wait_for_idle(apps=[SLURMD], status="active", timeout=1000) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters