[CI] make the Test Python Client operator build retry actually retry #5306
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5306"
general
weight: 0.35
win5923
<!-- Thank you for your contribution! -->
<!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. -->
Why are these changes needed?
In https://github.com/ray-project/kuberay/pull/4873, we added a retry mechanism to handle transient CI failures such as 504 Gateway Time-out.
However, in Build #17141, the build failed with a TLS handshake timeout, but the retry was not triggered:
There are two issues with this:
1.
sourceexecutes the script in the current shell. Since it is used as an if condition,errexit(set -e) is ignored for commands executed by the sourced script, so the script can continue after make docker-image fails.https://stackoverflow.com/a/76866330
2.
sourcereturns the exit status of the last command executed. If a later command succeeds, the earlier build failure is effectively hidden and source returns 0, causing the retry loop to exit successfully.Fix
Use
bashinstead ofsource, this preserves the script's set -e behavior, so a failed command causes the script to exit with a non-zero status and correctly triggers the retry logic.Also verified in https://buildkite.com/ray-project/ray-ecosystem-ci-kuberay-ci/builds/17152/canvas?jid=01a0ad21-033a-45b8-b5d7-446ef8714d45&tab=output that the retry mechanism works as expected and successfully retries after the initial failure.
Running 20 times in https://buildkite.com/ray-project/ray-ecosystem-ci-kuberay-ci/builds/17185/canvas
Related issue number
Closes #5303
Labels
<!-- Please add the appropriate labels to this PR. -->
doc-updates-requiredlabel.breaking-changelabel.Checks
- [x] Unit tests
- [x] Manual tests
- [ ] This PR is not tested :(
<!-- If you selected "Manual tests" above, please fill in the section below. Otherwise you can remove it. -->
Manual test instructions
<!--
Provide step-by-step instructions so reviewers can verify your changes.
Include any relevant screenshots or logs demonstrating the behavior.
-->