SREP-4870: Fix rosa-e2e-test script crash on Classic STS clusters#79350
SREP-4870: Fix rosa-e2e-test script crash on Classic STS clusters#79350dustman9000 wants to merge 1 commit into
Conversation
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
|
@dustman9000: This pull request references SREP-4870 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThe ROSA e2e test script's management cluster discovery now tolerates OCM API and JSON extraction failures. The ChangesManagement Cluster Discovery Resilience
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dustman9000 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/pj-rehearse periodic-ci-openshift-online-rosa-e2e-main-periodics-rosa-classic-sts-e2e-stable-4-19 |
|
@dustman9000: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@dustman9000: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
rosa-e2e-teststep script crashes on Classic STS clusters becauseocm get .../hypershiftreturns non-zero, which underset -o errexitkills the entire script before reaching the test execution block|| trueto the hypershift endpoint pipeline soMC_NAMEis set to empty for Classic STS, allowing the script to proceed to testsTest plan
Jira: https://redhat.atlassian.net/browse/SREP-4870
Fixed rosa-e2e-test script crash on Classic STS clusters
The rosa-e2e-test CI step script now gracefully handles Classic STS clusters that don't support the hypershift management cluster API endpoint.
The Problem: The script uses
set -o errexitto exit on any command failure. When testing Classic STS clusters, theocm get .../hypershiftAPI call returns a non-zero exit status, causing the entire script to crash before reaching the test execution block.The Fix: Added
|| trueto the management cluster discovery pipeline (line 50 ofrosa-e2e-test-commands.sh). This allows the command to fail gracefully—when the hypershift endpoint is unavailable,MC_NAMEis set to an empty value and the script continues to the "no management cluster found" path rather than crashing.The change is minimal and surgical: it tolerates the expected failure on Classic STS clusters while preserving the correct detection and use of management cluster access for HCP (Hosted Control Plane) nightly jobs, which do support the hypershift endpoint.