Skip to content

Commit

Permalink
ci: update juju to 3.1 and microk8s to 1.25 (#148)
Browse files Browse the repository at this point in the history
* ci: update juju to 3.1 and microk8s to 1.25
* fix: wait for idle charm in integration test
  • Loading branch information
NohaIhab authored Sep 13, 2023
1 parent 4467fb1 commit 71b1afa
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 58 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,16 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: 1.24/stable
juju-channel: 2.9/stable
channel: 1.25-strict/stable
juju-channel: 3.1/stable
charmcraft-channel: latest/candidate

- name: Run test
run: |
sg microk8s -c "tox -e integration -- --model testing"
sg snap_microk8s -c "tox -e integration -- --model testing"
- name: Get all
run: kubectl get all -A
Expand Down
4 changes: 2 additions & 2 deletions requirements-integration.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aiohttp
jinja2
# Pinning to <3.0 due to compatibility with the 2.9 controller version and 3.0 not being maintained anymore
juju<3.0
# Pinning to <4.0 due to compatibility with the 3.1 controller version
juju<4.0
lightkube
pytest-operator
requests
Expand Down
46 changes: 21 additions & 25 deletions requirements-integration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ aiohttp==3.8.5
# via -r requirements-integration.in
aiosignal==1.3.1
# via aiohttp
anyio==3.7.1
anyio==4.0.0
# via httpcore
asttokens==2.2.1
asttokens==2.4.0
# via stack-data
async-timeout==4.0.3
# via aiohttp
Expand Down Expand Up @@ -42,7 +42,7 @@ decorator==5.1.1
# via
# ipdb
# ipython
exceptiongroup==1.1.2
exceptiongroup==1.1.3
# via
# anyio
# pytest
Expand All @@ -52,14 +52,16 @@ frozenlist==1.4.0
# via
# aiohttp
# aiosignal
google-auth==2.22.0
google-auth==2.23.0
# via kubernetes
h11==0.14.0
# via httpcore
httpcore==0.17.3
httpcore==0.18.0
# via httpx
httpx==0.24.1
httpx==0.25.0
# via lightkube
hvac==1.2.1
# via juju
idna==3.4
# via
# anyio
Expand All @@ -78,22 +80,18 @@ jinja2==3.1.2
# via
# -r requirements-integration.in
# pytest-operator
juju==2.9.44.0
juju==3.2.2
# via
# -r requirements-integration.in
# pytest-operator
jujubundlelib==0.5.7
# via theblues
kubernetes==27.2.0
# via juju
lightkube==0.14.0
# via -r requirements-integration.in
lightkube-models==1.27.1.4
lightkube-models==1.28.1.4
# via lightkube
macaroonbakery==1.3.1
# via
# juju
# theblues
# via juju
markupsafe==2.1.3
# via jinja2
matplotlib-inline==0.1.6
Expand All @@ -118,7 +116,7 @@ pexpect==4.8.0
# via ipython
pickleshare==0.7.5
# via ipython
pluggy==1.2.0
pluggy==1.3.0
# via pytest
prompt-toolkit==3.0.39
# via ipython
Expand All @@ -139,6 +137,8 @@ pycparser==2.21
# via cffi
pygments==2.16.1
# via ipython
pyhcl==0.4.5
# via hvac
pymacaroons==0.13.0
# via macaroonbakery
pynacl==1.5.0
Expand All @@ -150,40 +150,38 @@ pyrfc3339==1.1
# via
# juju
# macaroonbakery
pytest==7.4.0
pytest==7.4.2
# via
# pytest-asyncio
# pytest-operator
pytest-asyncio==0.21.1
# via pytest-operator
pytest-operator==0.28.0
pytest-operator==0.29.0
# via -r requirements-integration.in
python-dateutil==2.8.2
# via kubernetes
pytz==2023.3
pytz==2023.3.post1
# via pyrfc3339
pyyaml==6.0.1
# via
# juju
# jujubundlelib
# kubernetes
# lightkube
# pytest-operator
requests==2.31.0
# via
# -r requirements-integration.in
# hvac
# kubernetes
# macaroonbakery
# requests-oauthlib
# theblues
requests-oauthlib==1.3.1
# via kubernetes
rsa==4.9
# via google-auth
six==1.16.0
# via
# asttokens
# google-auth
# kubernetes
# macaroonbakery
# paramiko
Expand All @@ -196,10 +194,8 @@ sniffio==1.3.0
# httpx
stack-data==0.6.2
# via ipython
tenacity==8.2.2
tenacity==8.2.3
# via -r requirements-integration.in
theblues==0.5.2
# via juju
tomli==2.0.1
# via
# ipdb
Expand All @@ -223,9 +219,9 @@ urllib3==1.26.16
# requests
wcwidth==0.2.6
# via prompt-toolkit
websocket-client==1.6.1
websocket-client==1.6.3
# via kubernetes
websockets==7.0
websockets==8.1
# via juju
yarl==1.9.2
# via aiohttp
22 changes: 11 additions & 11 deletions requirements-unit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile requirements-unit.in
#
anyio==3.7.1
anyio==4.0.0
# via httpcore
attrs==23.1.0
# via jsonschema
Expand All @@ -17,19 +17,19 @@ charmed-kubeflow-chisme==0.2.0
# via -r requirements.in
charset-normalizer==3.2.0
# via requests
coverage==7.3.0
coverage==7.3.1
# via -r requirements-unit.in
deepdiff==6.2.1
# via charmed-kubeflow-chisme
exceptiongroup==1.1.2
exceptiongroup==1.1.3
# via
# anyio
# pytest
h11==0.14.0
# via httpcore
httpcore==0.17.3
httpcore==0.18.0
# via httpx
httpx==0.24.1
httpx==0.25.0
# via lightkube
idna==3.4
# via
Expand All @@ -49,11 +49,11 @@ lightkube==0.14.0
# -r requirements-unit.in
# -r requirements.in
# charmed-kubeflow-chisme
lightkube-models==1.27.1.4
lightkube-models==1.28.1.4
# via lightkube
markupsafe==2.1.3
# via jinja2
ops==2.5.0
ops==2.6.0
# via
# -r requirements-unit.in
# -r requirements.in
Expand All @@ -65,11 +65,11 @@ packaging==23.1
# via pytest
pkgutil-resolve-name==1.3.10
# via jsonschema
pluggy==1.2.0
pluggy==1.3.0
# via pytest
pyrsistent==0.19.3
# via jsonschema
pytest==7.4.0
pytest==7.4.2
# via
# -r requirements-unit.in
# pytest-lazy-fixture
Expand Down Expand Up @@ -98,15 +98,15 @@ sniffio==1.3.0
# anyio
# httpcore
# httpx
tenacity==8.2.2
tenacity==8.2.3
# via
# -r requirements.in
# charmed-kubeflow-chisme
tomli==2.0.1
# via pytest
urllib3==2.0.4
# via requests
websocket-client==1.6.1
websocket-client==1.6.3
# via ops
zipp==3.16.2
# via importlib-resources
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile requirements.in
#
anyio==3.7.1
anyio==4.0.0
# via httpcore
attrs==23.1.0
# via jsonschema
Expand All @@ -19,13 +19,13 @@ charset-normalizer==3.2.0
# via requests
deepdiff==6.2.1
# via charmed-kubeflow-chisme
exceptiongroup==1.1.2
exceptiongroup==1.1.3
# via anyio
h11==0.14.0
# via httpcore
httpcore==0.17.3
httpcore==0.18.0
# via httpx
httpx==0.24.1
httpx==0.25.0
# via lightkube
idna==3.4
# via
Expand All @@ -42,11 +42,11 @@ lightkube==0.14.0
# via
# -r requirements.in
# charmed-kubeflow-chisme
lightkube-models==1.27.1.4
lightkube-models==1.28.1.4
# via lightkube
markupsafe==2.1.3
# via jinja2
ops==2.5.0
ops==2.6.0
# via
# -r requirements.in
# charmed-kubeflow-chisme
Expand Down Expand Up @@ -77,13 +77,13 @@ sniffio==1.3.0
# anyio
# httpcore
# httpx
tenacity==8.2.2
tenacity==8.2.3
# via
# -r requirements.in
# charmed-kubeflow-chisme
urllib3==2.0.4
# via requests
websocket-client==1.6.1
websocket-client==1.6.3
# via ops
zipp==3.16.2
# via importlib-resources
9 changes: 2 additions & 7 deletions tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,8 @@ async def test_build_and_deploy(ops_test):

await ops_test.model.deploy(my_charm, resources=resources, trust=True)

await ops_test.model.block_until(
lambda: all(
(unit.workload_status == "active") and unit.agent_status == "idle"
for _, application in ops_test.model.applications.items()
for unit in application.units
),
timeout=600,
await ops_test.model.wait_for_idle(
apps=[CHARM_NAME], status="active", raise_on_blocked=True, timeout=600
)


Expand Down

0 comments on commit 71b1afa

Please sign in to comment.