From 39a676dfdefbfcf161d519b3ff6a855858e0dae4 Mon Sep 17 00:00:00 2001 From: Dustin Row Date: Fri, 15 May 2026 10:04:12 -0700 Subject: [PATCH] Fix rosa-e2e-test script crash on Classic STS clusters The hypershift endpoint returns an error for Classic STS clusters, which under set -o errexit kills the entire script. Add || true so MC_NAME gets set to empty and the script continues to the test execution block. Jira: https://redhat.atlassian.net/browse/SREP-4870 --- .../step-registry/rosa/e2e/test/rosa-e2e-test-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/rosa/e2e/test/rosa-e2e-test-commands.sh b/ci-operator/step-registry/rosa/e2e/test/rosa-e2e-test-commands.sh index 60d502e874286..5cfc2d9377cb9 100755 --- a/ci-operator/step-registry/rosa/e2e/test/rosa-e2e-test-commands.sh +++ b/ci-operator/step-registry/rosa/e2e/test/rosa-e2e-test-commands.sh @@ -47,7 +47,7 @@ export AWS_REGION="${LEASED_RESOURCE}" # Try to get management cluster access via OCM API log "Attempting management cluster access..." -MC_NAME=$(ocm get /api/clusters_mgmt/v1/clusters/"${CLUSTER_ID}"/hypershift 2>/dev/null | jq -r '.management_cluster // empty') +MC_NAME=$(ocm get /api/clusters_mgmt/v1/clusters/"${CLUSTER_ID}"/hypershift 2>/dev/null | jq -r '.management_cluster // empty' || true) if [[ -n "${MC_NAME}" ]]; then log "Management cluster name: ${MC_NAME}" MANAGEMENT_CLUSTER_ID=$(ocm get /api/clusters_mgmt/v1/clusters --parameter search="name='${MC_NAME}'" --parameter size=1 2>/dev/null | jq -r '.items[0].id // empty')