Skip to content

Commit

Permalink
Revert "fix(ci): Use juju wait-for instead wait_for_idle() (#614)"
Browse files Browse the repository at this point in the history
This reverts commit ce22b75.
  • Loading branch information
orfeas-k committed Nov 27, 2024
1 parent 8eacbbe commit 5547a10
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
1 change: 0 additions & 1 deletion requirements-integration-v1.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ pytest
pytest-operator
pyyaml
tenacity
sh
2 changes: 0 additions & 2 deletions requirements-integration-v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ rich==13.7.1
# via typer
rsa==4.9
# via google-auth
sh==2.1.0
# via -r requirements-integration-v1.in
shellingham==1.5.4
# via typer
six==1.16.0
Expand Down
16 changes: 10 additions & 6 deletions tests/integration/test_kfp_functional_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
SAMPLE_VIEWER,
)

import sh
import kfp
import lightkube
import pytest
Expand Down Expand Up @@ -109,11 +108,16 @@ async def test_build_and_deploy(ops_test: OpsTest, request, lightkube_client):
# Deploy the kfp-operators bundle from the rendered bundle file
await deploy_bundle(ops_test, bundle_path=rendered_bundle, trust=True)

# Use `juju wait-for` instead of `wait_for_idle()`
# due to https://github.com/canonical/kfp-operators/issues/601
# and https://github.com/juju/python-libjuju/issues/1204
log.info("Waiting on model applications to be active")
sh.juju("wait-for","model","kubeflow", query="forEach(applications, app => app.status == 'active')", timeout="30m")
# Wait for everything to be up. Note, at time of writing these charms would naturally go
# into blocked during deploy while waiting for each other to satisfy relations, so we don't
# raise_on_blocked.
await ops_test.model.wait_for_idle(
status="active",
raise_on_blocked=False, # These apps block while waiting for each other to deploy/relate
raise_on_error=True,
timeout=3600,
idle_period=30,
)


# ---- KFP API Server focused test cases
Expand Down
16 changes: 11 additions & 5 deletions tests/integration/test_kfp_functional_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,17 @@ async def test_build_and_deploy(ops_test: OpsTest, request, lightkube_client):
# Deploy the kfp-operators bundle from the rendered bundle file
await deploy_bundle(ops_test, bundle_path=rendered_bundle, trust=True)

# Use `juju wait-for` instead of `wait_for_idle()`
# due to https://github.com/canonical/kfp-operators/issues/601
# and https://github.com/juju/python-libjuju/issues/1204
log.info("Waiting on model applications to be active")
sh.juju("wait-for","model","kubeflow", query="forEach(applications, app => app.status == 'active')", timeout="30m")
# Wait for everything to be up. Note, at time of writing these charms would naturally go
# into blocked during deploy while waiting for each other to satisfy relations, so we don't
# raise_on_blocked.
await ops_test.model.wait_for_idle(
status="active",
raise_on_blocked=False, # These apps block while waiting for each other to deploy/relate
raise_on_error=True,
timeout=3600,
idle_period=30,
)


# ---- KFP API Server focused test cases
async def test_upload_pipeline(kfp_client):
Expand Down

0 comments on commit 5547a10

Please sign in to comment.