-
Notifications
You must be signed in to change notification settings - Fork 687
[E2E] [RayCronJob] add e2e test for suspend behavior #4349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
307dd63
5e8dc71
05defb2
e40bf8c
8b8667d
54cca7c
9cc2e90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,3 +160,23 @@ | |
| - echo "KUBERAY_TEST_OUTPUT_DIR=$$KUBERAY_TEST_OUTPUT_DIR" | ||
| - KUBERAY_TEST_TIMEOUT_SHORT=1m KUBERAY_TEST_TIMEOUT_MEDIUM=5m KUBERAY_TEST_TIMEOUT_LONG=10m go test -timeout 30m -v ./test/e2erayjobsubmitter 2>&1 | awk -f ../.buildkite/format.awk | tee $$KUBERAY_TEST_OUTPUT_DIR/gotest.log || (kubectl logs --tail -1 -l app.kubernetes.io/name=kuberay | tee $$KUBERAY_TEST_OUTPUT_DIR/kuberay-operator.log && cd $$KUBERAY_TEST_OUTPUT_DIR && find . -name "*.log" | tar -cf /artifact-mount/e2e-log.tar -T - && exit 1) | ||
| - echo "--- END:RayJob Light Weight Submitter E2E (nightly operator) tests finished" | ||
|
|
||
| - label: 'Test RayCronJob E2E (nightly operator)' | ||
| instance_size: large | ||
| image: golang:1.25-bookworm | ||
| commands: | ||
| - source .buildkite/setup-env.sh | ||
| - kind create cluster --wait 900s --config ./ci/kind-config-buildkite.yml | ||
| - kubectl config set clusters.kind-kind.server https://docker:6443 | ||
| # Build nightly KubeRay operator image | ||
| - pushd ray-operator | ||
| - bash ../.buildkite/build-start-operator.sh | ||
| - kubectl wait --timeout=90s --for=condition=Available=true deployment kuberay-operator | ||
| # Run e2e tests and print KubeRay operator logs if tests fail | ||
| - echo "--- START:Running e2e (nightly operator) RayCronJob tests" | ||
| - if [ -n "${KUBERAY_TEST_RAY_IMAGE}"]; then echo "Using Ray Image ${KUBERAY_TEST_RAY_IMAGE}"; fi | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shell syntax error with missing space before bracketHigh Severity The shell command on line 177 has a bash syntax error: missing space before |
||
| - set -o pipefail | ||
| - mkdir -p "$(pwd)/tmp" && export KUBERAY_TEST_OUTPUT_DIR=$(pwd)/tmp | ||
| - echo "KUBERAY_TEST_OUTPUT_DIR=$$KUBERAY_TEST_OUTPUT_DIR" | ||
| - KUBERAY_TEST_TIMEOUT_SHORT=1m KUBERAY_TEST_TIMEOUT_MEDIUM=5m KUBERAY_TEST_TIMEOUT_LONG=10m go test -timeout 40m -v ./test/e2eraycronjob 2>&1 | awk -f ../.buildkite/format.awk | tee $$KUBERAY_TEST_OUTPUT_DIR/gotest.log || (kubectl logs --tail -1 -l app.kubernetes.io/name=kuberay | tee $$KUBERAY_TEST_OUTPUT_DIR/kuberay-operator.log && cd $$KUBERAY_TEST_OUTPUT_DIR && find . -name "*.log" | tar -cf /artifact-mount/e2e-raycronjob-log.tar -T - && exit 1) | ||
| - echo "--- END:RayCronJob E2E (nightly operator) tests finished" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,3 +18,5 @@ featureGates: | |
| enabled: true | ||
| - name: RayMultiHostIndexing | ||
| enabled: true | ||
| - name: RayCronJob | ||
| enabled: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,10 @@ type RayCronJobStatus struct { | |
| //+kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp",priority=0 | ||
| //+kubebuilder:printcolumn:name="suspend",type=boolean,JSONPath=".spec.suspend",priority=0 | ||
|
|
||
| // +genclient | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch!
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ref: Cool!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for the suggestion~ |
||
| // +kubebuilder:resource:categories=all | ||
| // +kubebuilder:storageversion | ||
| // | ||
| //nolint:govet // RayCronJob is the Schema for the raycronjobs API | ||
| type RayCronJob struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
bashinstead ofsourceloses exported variablesMedium Severity
Line 173 uses
bash ../.buildkite/build-start-operator.shwhile all other tests in this file consistently usesource ../.buildkite/build-start-operator.sh. Thebuild-start-operator.shscript exportsKUBERAY_TEST_RAY_IMAGEwhenIS_FROM_RAY_RELEASE_AUTOMATION=1. Usingbashinstead ofsourceruns the script in a subshell, causing the exported variable to be unavailable to subsequent commands. This breaks the Ray release automation flow.