Skip to content
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

[RayJob] Rewrite RayJob envtest #1916

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Feb 9, 2024

Why are these changes needed?

The envtest is very messy:

  • The RayJob spec is very different from the real RayJob YAML file.
  • There is no clear goal for the code path that the test wants to verify.
  • Many It tests are irrelevant, yet we include all of them in a single suite with unnecessary dependencies.
    • Example
    • The ClusterSelector test has already been covered by e2e tests.

This PR's tests focus on the most common code path of RayJob, i.e., New -> Initializing -> Running -> Complete.

Related issue number

Checks

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

})

It("test cluster selector", func() {
Copy link
Member Author

@kevin85421 kevin85421 Feb 9, 2024

Choose a reason for hiding this comment

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

This test totally doesn't make sense. ClusterSelector must be set before the RayJob's creation. If users set the ClusterSelector after DashboardURL is set, the RayJob may stuck there. Maybe we should consider whether deprecate the ClusterSelector feature or not. Remove "test cluster selector".

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should consider whether deprecate the ClusterSelector feature or not.

I never really thought the selector made sense because multiple Ray clusterse can share the same label. Instead this field should just be an object reference or just a name field.:

clusterRef:
  name: my-raycluster

OR

clusterName: my-raycluster

Copy link
Member Author

Choose a reason for hiding this comment

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

It makes sense to me, but I prefer to deemphasize this feature by not mentioning it in the documentation and avoiding updates. To submit Ray jobs to an existing RayCluster, users should use ray job submit instead of ClusterSelector. We may consider deprecating it or decide to revisit it when we receive sufficient feedback on its use cases from users.

@kevin85421 kevin85421 marked this pull request as ready for review February 9, 2024 01:15
@kevin85421 kevin85421 requested a review from jjyao February 9, 2024 01:21
@kevin85421
Copy link
Member Author

cc @andrewsykim

@kevin85421 kevin85421 merged commit 34a8d9f into ray-project:master Feb 9, 2024
23 checks passed
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.

None yet

3 participants