Skip to content

[RayJob] add Failing RayJob in HTTPMode e2e test for rayjob with retry #2242

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

Merged
merged 4 commits into from
Jul 14, 2024

Conversation

tinaxfwu
Copy link
Contributor

Why are these changes needed?

Add the "The RayJob in HTTPMode fails and retries" test.

// test.T().Run("Failing RayJob in HTTPMode", func(_ *testing.T) {
// TODO: The RayJob in HTTPMode fails and retries. This test is similar to the
// "Failing RayJob without cluster shutdown after finished" test in rayjob_lightweight_test.go.
// The difference is that here we set RayJob.BackoffLimit.
// })

Related issue number

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

Testing was conducted on my Apply M2 Mac, with the RayImage changed to rayproject/ray:2.9.0-aarch64 in the ray-operator/test/support/defaults.go file.

Below are the commands I used for the test and the resulting test logs.

$ cd ray-operator
$ kind create cluster --image=kindest/node:v1.24.0
$ IMG=kuberay/operator:nightly make docker-build
$ kind load docker-image kuberay/operator:nightly
$ helm install kuberay-operator --set image.repository=kuberay/operator --set image.tag=nightly ../helm-chart/kuberay-operator
$ go test -timeout 30m -v ./test/e2e/rayjob_retry_test.go ./test/e2e/support.go 
--- PASS: TestRayJobRetry (283.95s)
    --- PASS: TestRayJobRetry/Failing_RayJob_without_cluster_shutdown_after_finished (134.35s)
    --- PASS: TestRayJobRetry/Failing_submitter_K8s_Job (76.77s)
    --- PASS: TestRayJobRetry/Failing_RayJob_in_HTTPMode (72.70s)
PASS
ok  	command-line-arguments	284.457s

Copy link
Member

@andrewsykim andrewsykim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@kevin85421 kevin85421 self-assigned this Jul 12, 2024
Should(WithTransform(RayJobFailed, Equal(int32(3)))) // 2 retries + 1 initial attempt = 3 failures
test.Expect(GetRayJob(test, rayJob.Namespace, rayJob.Name)).
Should(WithTransform(RayJobSucceeded, Equal(int32(0))))
test.Expect(GetRayJob(test, rayJob.Namespace, rayJob.Name)).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be redundant. L161 has already checked the reason.

@kevin85421
Copy link
Member

@tinaxfwu can you fix the lint error? It's helpful to install pre-commit https://github.com/ray-project/kuberay/blob/master/ray-operator/DEVELOPMENT.md#pre-commit-hooks.

@tinaxfwu
Copy link
Contributor Author

@kevin85421 I fixed the lint error, but the buildkite/ray-ecosystem-ci-kuberay-ci/test-raycluster-sample-yamls-latest-release check. I'm not quite sure I understand this issue or how to fix it.

@kevin85421
Copy link
Member

@tinaxfwu the failure is not relevant. It is just a flaky test.

@kevin85421 kevin85421 merged commit 7f15e13 into ray-project:master Jul 14, 2024
25 checks passed
@tinaxfwu tinaxfwu deleted the add-httpmode-test branch July 14, 2024 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants