Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

All notable changes to this project will be documented in this file.

## [1.1.28] - Current
## [1.1.29] - Current

### Fixed

- **Orchestrator installation script operator status check**: Fixed `install-orchestrator.sh` timeout issue caused by incorrect operator display name. The script was searching for "Red Hat OpenShift Serverless Logic" but the actual display name is "OpenShift Serverless Logic Operator", causing empty Phase values and 500-second timeout.
- **Robust operator status checking**: Refactored `check_operator_status()` to query by CSV name prefix (e.g., `logic-operator`) instead of display name, making it more stable across operator version updates and preventing similar issues in the future.

## [1.1.28]

- **APIHelper.createGitHubRepoWithFile**: Ensure file creation happens after repository creation.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@red-hat-developer-hub/e2e-test-utils",
"version": "1.1.28",
"version": "1.1.29",
"description": "Test utilities for RHDH E2E tests",
"license": "Apache-2.0",
"repository": {
Expand Down
18 changes: 12 additions & 6 deletions src/deployment/orchestrator/install-orchestrator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,19 @@ EOD
}

check_operator_status() {
local timeout=${1:-300} namespace=$2 operator_name=$3 expected_status=${4:-Succeeded}
log::info "Checking operator '${operator_name}' in '${namespace}' (timeout ${timeout}s, expected: ${expected_status})"
local timeout=${1:-300} namespace=$2 csv_name_prefix=$3 expected_status=${4:-Succeeded}
log::info "Checking operator CSV '${csv_name_prefix}*' in '${namespace}' (timeout ${timeout}s, expected: ${expected_status})"
timeout "${timeout}" bash -c "
while true; do
CURRENT_PHASE=\$(oc get csv -n '${namespace}' -o jsonpath='{.items[?(@.spec.displayName==\"${operator_name}\")].status.phase}')
echo \"[check_operator_status] Phase: \${CURRENT_PHASE}\" >&2
CSV_NAME=\$(oc get csv -n '${namespace}' -o name 2>/dev/null | grep \"/${csv_name_prefix}\" | head -1 | cut -d'/' -f2)
if [[ -n \"\${CSV_NAME}\" ]]; then
CURRENT_PHASE=\$(oc get csv \"\${CSV_NAME}\" -n '${namespace}' -o jsonpath='{.status.phase}' 2>/dev/null)
else
CURRENT_PHASE=\"\"
fi
echo \"[check_operator_status] CSV: \${CSV_NAME}, Phase: \${CURRENT_PHASE}\" >&2
[[ \"\${CURRENT_PHASE}\" == \"${expected_status}\" ]] && echo \"[check_operator_status] Operator reached ${expected_status}\" >&2 && break
[[ -z \"\${CSV_NAME}\" ]] && echo \"[check_operator_status] No CSV found matching '${csv_name_prefix}'\" >&2
sleep 10
done
" || { log::error "Operator did not reach ${expected_status} in time."; return 1; }
Expand All @@ -140,7 +146,7 @@ install_serverless_logic_ocp_operator() {
return 0
}
waitfor_serverless_logic_ocp_operator() {
check_operator_status 500 openshift-operators "Red Hat OpenShift Serverless Logic" Succeeded
check_operator_status 500 openshift-operators "logic-operator" Succeeded
return 0
}

Expand All @@ -149,7 +155,7 @@ install_serverless_ocp_operator() {
return 0
}
waitfor_serverless_ocp_operator() {
check_operator_status 300 openshift-operators "Red Hat OpenShift Serverless" Succeeded
check_operator_status 300 openshift-operators "serverless-operator" Succeeded
return 0
}

Expand Down
Loading