From 839e60704e7d9ef0d080c5d493f35ff719dfe067 Mon Sep 17 00:00:00 2001 From: Meni Yakove Date: Sun, 16 Jul 2023 21:12:55 +0300 Subject: [PATCH] support rosa and hypershift clusters --- app/libs/rosa_clusters.py | 15 +++------------ poetry.lock | 4 ++-- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/app/libs/rosa_clusters.py b/app/libs/rosa_clusters.py index 21acbb09..055393c2 100644 --- a/app/libs/rosa_clusters.py +++ b/app/libs/rosa_clusters.py @@ -54,18 +54,9 @@ def wait_for_osd_cluster_ready_job(ocp_client): name="osd-cluster-ready", namespace="openshift-monitoring", ) - # TODO: use job.wait_for_condition() once https://github.com/RedHatQE/openshift-python-wrapper/pull/1248 merged - # job.wait_for_condition( - # condition=job.Condition.COMPLETE, status="True", timeout=tts(ts="40m") - # ) - for sample in TimeoutSampler( - wait_timeout=tts(ts="40m"), - sleep=1, - func=lambda: job.instance, - ): - for cond in sample.get("status", {}).get("conditions", []): - if cond["type"] == job.Condition.COMPLETE and cond["status"] == "True": - return + job.wait_for_condition( + condition=job.Condition.COMPLETE, status="True", timeout=tts(ts="40m") + ) def dump_cluster_data_to_file(cluster_data): diff --git a/poetry.lock b/poetry.lock index c96561eb..9fef4bdc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1206,12 +1206,12 @@ PyYAML = "*" [[package]] name = "openshift-python-wrapper" -version = "4.14.1" +version = "4.14.2" description = "Wrapper around https://github.com/openshift/openshift-restclient-python" optional = false python-versions = ">=3.7" files = [ - {file = "openshift-python-wrapper-4.14.1.tar.gz", hash = "sha256:d1e6ace4d32d710144f91b3ddf8ab1c1d74b3fa3318e68147e4aecfcaa8e5c93"}, + {file = "openshift-python-wrapper-4.14.2.tar.gz", hash = "sha256:21a5154fa32459b95c19562ee06c952b0a79a34147b139901df5df09745eff2a"}, ] [package.dependencies]