From ed317a73968bc94f8c552af83a48c49f30e43df0 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Tue, 15 Oct 2024 17:41:52 +0200 Subject: [PATCH] NO-JIRA: fix(gha) improve robustness by checking for resource existence Without this, the gha is flaky and may fail with ``` notebook.kubeflow.org/minimal-notebook created Error from server (NotFound): statefulsets.apps "minimal-notebook" not found ``` --- .github/workflows/odh_notebook_controller_integration_test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/odh_notebook_controller_integration_test.yaml b/.github/workflows/odh_notebook_controller_integration_test.yaml index 52ab71fa80b..3d451d0a33e 100644 --- a/.github/workflows/odh_notebook_controller_integration_test.yaml +++ b/.github/workflows/odh_notebook_controller_integration_test.yaml @@ -271,6 +271,8 @@ jobs: port: notebook-port EOF + # wait for the statefulset to be created + timeout 100 bash -c -- 'until kubectl get statefulset minimal-notebook; do sleep 1; done' # wait for the good result kubectl rollout status --watch statefulset minimal-notebook kubectl wait statefulset minimal-notebook --for=jsonpath='{.spec.replicas}'=1 --timeout=100s