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

Add NumOfHosts to WorkerGroupSpec (CRD change only) #1834

Merged
merged 5 commits into from
Jan 17, 2024

Conversation

richardsliu
Copy link
Contributor

Why are these changes needed?

Adds "NumOfHosts" as an int32 field in RayCluster CR's WorkerGroupSpec section. NumOfHosts will be used to denote WorkerGroup replicas consisting of multiple hosts (for example, TPU hosts in a multi-host pod).

Related issue number

ray-project/ray#39781

Checks

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

@@ -56,6 +56,9 @@ type WorkerGroupSpec struct {
// MaxReplicas denotes the maximum number of desired Pods for this worker group, and the default value is maxInt32.
// +kubebuilder:default:=2147483647
MaxReplicas *int32 `json:"maxReplicas"`
// NumOfHosts denotes the number of hosts to create per replica. The default value is 1.
// +kubebuilder:default:=1
NumOfHosts *int32 `json:"numOfHosts"`
Copy link
Member

Choose a reason for hiding this comment

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

  1. Should we add omitempty to make this field optional?
  2. Perhaps we could use int32 instead to avoid some nil checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@kevin85421 kevin85421 self-assigned this Jan 13, 2024
Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

You can run make sync to resolve the CI error operator-consistency-check / helm-chart-verify-crd. See this doc for more details.

@richardsliu
Copy link
Contributor Author

Done, all the tests are passing now.

Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

LGTM. Wait for the e2e tests to pass.

@richardsliu
Copy link
Contributor Author

Seems like I don't have write access. Can you merge?

@kevin85421 kevin85421 merged commit 5adc91a into ray-project:master Jan 17, 2024
24 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

2 participants