From b29ac5783624e237afb960eb01cb70cb3b024820 Mon Sep 17 00:00:00 2001 From: Ambient Code Bot Date: Fri, 3 Apr 2026 08:44:29 -0500 Subject: [PATCH] fix: wait for DataScienceCluster v2 API, not just CRD existence The CRD exists with v1 from the initial operator install, but the v2 version is registered later. The previous check found the v1 CRD and proceeded, then the v2 DSC apply failed. Now checks that the v2 API is actually served before applying. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/components-build-deploy.yml | 12 ++++++------ .github/workflows/prod-release-deploy.yaml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/components-build-deploy.yml b/.github/workflows/components-build-deploy.yml index 700ec3d945..a5d63ae751 100644 --- a/.github/workflows/components-build-deploy.yml +++ b/.github/workflows/components-build-deploy.yml @@ -235,19 +235,19 @@ jobs: oc wait csv "$CSV" -n redhat-ods-operator \ --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s - - name: Wait for DataScienceCluster CRD to be available + - name: Wait for DataScienceCluster v2 API to be available run: | - echo "Waiting for DataScienceCluster CRD to be registered..." + echo "Waiting for DataScienceCluster v2 API to be served..." for i in $(seq 1 60); do - if oc get crd datascienceclusters.datasciencecluster.opendatahub.io &>/dev/null; then - echo "DataScienceCluster CRD is available" + if oc api-resources --api-group=datasciencecluster.opendatahub.io 2>/dev/null | grep -q v2; then + echo "DataScienceCluster v2 API is available" break fi if [ "$i" -eq 60 ]; then - echo "::error::DataScienceCluster CRD did not become available within timeout" + echo "::error::DataScienceCluster v2 API did not become available within timeout" exit 1 fi - echo "Attempt $i/60 - CRD not yet available, waiting 10s..." + echo "Attempt $i/60 - v2 API not yet available, waiting 10s..." sleep 10 done diff --git a/.github/workflows/prod-release-deploy.yaml b/.github/workflows/prod-release-deploy.yaml index 1983b266b7..ee444b27a1 100644 --- a/.github/workflows/prod-release-deploy.yaml +++ b/.github/workflows/prod-release-deploy.yaml @@ -374,19 +374,19 @@ jobs: oc wait csv "$CSV" -n redhat-ods-operator \ --for=jsonpath='{.status.phase}'=Succeeded --timeout=600s - - name: Wait for DataScienceCluster CRD to be available + - name: Wait for DataScienceCluster v2 API to be available run: | - echo "Waiting for DataScienceCluster CRD to be registered..." + echo "Waiting for DataScienceCluster v2 API to be served..." for i in $(seq 1 60); do - if oc get crd datascienceclusters.datasciencecluster.opendatahub.io &>/dev/null; then - echo "DataScienceCluster CRD is available" + if oc api-resources --api-group=datasciencecluster.opendatahub.io 2>/dev/null | grep -q v2; then + echo "DataScienceCluster v2 API is available" break fi if [ "$i" -eq 60 ]; then - echo "::error::DataScienceCluster CRD did not become available within timeout" + echo "::error::DataScienceCluster v2 API did not become available within timeout" exit 1 fi - echo "Attempt $i/60 - CRD not yet available, waiting 10s..." + echo "Attempt $i/60 - v2 API not yet available, waiting 10s..." sleep 10 done