Commit 0db4b57
authored
[CI] Make build-start-operator.sh fail fast on setup errors (#4893)
* [CI] Make build-start-operator.sh fail fast on setup errors
Closes #4879.
The script previously chained:
IMG=kuberay/operator:nightly make docker-image &&
kind load docker-image kuberay/operator:nightly &&
echo "Deploying operator with test overrides ..."
IMG=kuberay/operator:nightly make deploy-with-override
If `make docker-image` failed (e.g. transient 504 from registry-1.docker.io),
the `&&` chain short-circuited but `make deploy-with-override` still ran as
a separate command. The script returned the exit code of the last command
(0), so downstream `kubectl wait deployment kuberay-operator` then timed
out because the operator image was never built/loaded, hiding the real
cause.
Fix: enable `set -euo pipefail` and remove the `&&` chain so any failing
step aborts the script immediately and propagates a non-zero exit code to
callers. Also use the `:-0` default for IS_FROM_RAY_RELEASE_AUTOMATION so
`set -u` does not error when the variable is unset.
This affects all Buildkite e2e steps that source this script. Behavior is
unchanged on the success path; on failure, the real cause now surfaces
instead of a misleading readiness timeout downstream.
* [CI] Address bot feedback: drop set -u to avoid nounset leaking to callers
Both Codex and Cursor Bugbot flagged that `set -u` propagates from this
sourced script to the calling Buildkite shell. Downstream steps in
`.buildkite/test-e2e.yml` and `.buildkite/test-historyserver-e2e.yml`
reference `${KUBERAY_TEST_RAY_IMAGE}` without a default value, which
would error under nounset when the non-release path leaves the variable
unset.
Drop `-u` while keeping `-e` and `-o pipefail`, which still gives us the
fail-fast behavior needed to fix #4879 without breaking downstream
references. Add an inline comment explaining the constraint so this is
not reintroduced. Revert the unneeded `${IS_FROM_RAY_RELEASE_AUTOMATION:-0}`
default since nounset is no longer in effect.
* ci: retrigger build
The previous run failed in Test Apiserver E2E (nightly operator) on
TestCreateClusterAutoscaler, a known-flaky apiserver e2e test tracked
upstream (kuberay#3293, kuberay#3670). The failure is unrelated to this
PR's changes to build-start-operator.sh; the operator and apiserver both
started successfully in that run.
Retriggering CI via an empty commit to confirm the flake.1 parent a284b82 commit 0db4b57
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
14 | | - | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | | - | |
17 | | - | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
0 commit comments