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-state-machine-and-exposing-port #319

Merged
merged 4 commits into from
Jul 2, 2022
Merged

add-state-machine-and-exposing-port #319

merged 4 commits into from
Jul 2, 2022

Conversation

scarlet25151
Copy link
Collaborator

Why are these changes needed?

Expose the state and service endpoints port in status.

Related issue number

Related to #223

Checks

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

@scarlet25151
Copy link
Collaborator Author

@Jeffwan @daikeshi @davidxia PTAL.

Copy link
Contributor

@davidxia davidxia left a comment

Choose a reason for hiding this comment

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

LGTM overall as a user. Just some questions

@@ -152,6 +152,12 @@ message Cluster {

// Output. The time that the cluster deleted.
google.protobuf.Timestamp deleted_at = 8;

// Output. The service endpoint of the cluster
map<string, string> service_endpoint = 9;
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious why make the port a string instead of int32?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sound good, I remember at first we do not have any intend to use string or int32, and if we would like to use it to represent nodeIP:port as a endpoints, I think string would be better. WDYT @Jeffwan

Copy link
Collaborator

@Jeffwan Jeffwan Jun 28, 2022

Choose a reason for hiding this comment

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

This is our internal representation. Honestly, I am not sure whether community like it or not? Any suggestions? Do we need the port or endpoint here? /cc @davidxia

Copy link
Contributor

@daikeshi daikeshi Jun 29, 2022

Choose a reason for hiding this comment

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

It's a little confusing from an outsider's perspective.

Would we also consider exposing other access endpoint? e.g. the head pod ip?

}

// loop container and find the resource
pbCluster.ClusterSpec = &api.ClusterSpec{}
pbCluster.ClusterSpec.HeadGroupSpec = PopulateHeadNodeSpec(cluster.Spec.HeadGroupSpec)
pbCluster.ClusterSpec.WorkerGroupSepc = PopulateWorkerNodeSpec(cluster.Spec.WorkerGroupSpecs)

pbCluster.ServiceEndpoint = map[string]string{}
for name, port := range cluster.Status.Endpoints {
pbCluster.ServiceEndpoint[name] = strconv.Itoa(int(port))
Copy link
Contributor

Choose a reason for hiding this comment

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

just wondering why convert port from string to int back to string?

ray-operator/controllers/ray/raycluster_controller.go Outdated Show resolved Hide resolved
ray-operator/controllers/ray/raycluster_controller.go Outdated Show resolved Hide resolved
ray-operator/controllers/ray/raycluster_controller.go Outdated Show resolved Hide resolved
@Jeffwan
Copy link
Collaborator

Jeffwan commented Jun 28, 2022

#223 just need state. I am trying to understand whether the endpoint is needed? Could it be a separate PR if we have many questions/unresolved comments on the service_endpoints. @scarlet25151

@scarlet25151
Copy link
Collaborator Author

#223 just need state. I am trying to understand whether the endpoint is needed?

Yes, we can put a new PR to add the service endpoints, since as a part in the status, they are also needed by that story as well as the state.

Copy link
Collaborator

@Jeffwan Jeffwan left a comment

Choose a reason for hiding this comment

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

It looks good to me. Please have another check. @davidxia @daikeshi

@Jeffwan
Copy link
Collaborator

Jeffwan commented Jul 2, 2022

Feel free to leave comments and file follow up PRs. Current implementation should be good as the start.

@Jeffwan Jeffwan merged commit d1e0d1a into ray-project:master Jul 2, 2022
@davidxia
Copy link
Contributor

davidxia commented Jul 4, 2022

@scarlet25151 let me know if you need any help on the endpoint code that was removed from this PR. When you have time can you open another PR for that for further discussion? Thanks!

lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
* add-state-machine-and-exposing-port

* remove code conflict

Co-authored-by: chenyu.jiang <chenyu.jiang@bytedance.com>
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

4 participants