Skip to content

[core] move the RayletClientInterface to its own build target#56101

Merged
edoakes merged 4 commits intoray-project:masterfrom
rueian:raylet-client-interface
Sep 2, 2025
Merged

[core] move the RayletClientInterface to its own build target#56101
edoakes merged 4 commits intoray-project:masterfrom
rueian:raylet-client-interface

Conversation

@rueian
Copy link
Copy Markdown
Contributor

@rueian rueian commented Aug 29, 2025

Why are these changes needed?

  1. A new //src/ray/raylet_client:raylet_client_interface target containing only the RayletClientInterface.
  2. A new //src/ray/raylet_client:raylet_client_pool target moved from the node_manager.
  3. A new //src/ray/raylet_client:node_manager_client target moved from the node_manager.
  4. Remove using statements in the raylet_client.h that allow others to omit ray:: implicitly.

There are no behavioral changes.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@rueian rueian force-pushed the raylet-client-interface branch 2 times, most recently from 04b8f7e to c0debbd Compare August 29, 2025 23:24
@rueian rueian added the go add ONLY when ready to merge, run all tests label Aug 30, 2025
Signed-off-by: Rueian <rueian@anyscale.com>
@rueian rueian force-pushed the raylet-client-interface branch from c0debbd to c96c7df Compare August 30, 2025 05:07
Signed-off-by: Rueian <rueian@anyscale.com>
@rueian rueian force-pushed the raylet-client-interface branch from 4671ebe to 7f2cad1 Compare August 30, 2025 16:06
@rueian rueian marked this pull request as ready for review August 30, 2025 18:21
@rueian rueian requested a review from a team as a code owner August 30, 2025 18:21
@ray-gardener ray-gardener bot added the core Issues that should be addressed in Ray Core label Aug 30, 2025
exports_files([
"raylet_client.h",
])
ray_cc_library(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What’s the visibility on the new targets? De we need all the targets to be public?

Copy link
Copy Markdown
Contributor Author

@rueian rueian Sep 1, 2025

Choose a reason for hiding this comment

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

Most of them are intended to be public indeed, except for the "node_manager_client", which should be :__subpackages__.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please add explicit visibility tags for them (even public ones)

at some point I want to remove our default public visibility from ray.bzl

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not eliminate the RayletClient wrapper as well?

namespace raylet {
class RayletClient;
}
namespace rpc {
/// TODO(dayshah): https://github.com/ray-project/ray/issues/54816 Kill this completely.
/// This class is only used by the RayletClient which is just a wrapper around this. This
/// exists for the legacy reason that all the function definitions in RayletClient have to
/// change if you move the things in here into RayletClient.
class NodeManagerClient {
public:
friend class raylet::RayletClient;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can I do that in a follow-up? It won't be too hard, I guess, but this PR is already quite big...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yesh, agree let's do in a followup.

Signed-off-by: Rueian <rueian@anyscale.com>
Signed-off-by: Rueian <rueian@anyscale.com>
Copy link
Copy Markdown
Collaborator

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

Huge improvement that has been on my TODO list -- thank you!

Comment on lines -126 to -152
ray_cc_library(
name = "node_manager_client",
srcs = ["node_manager/raylet_client_pool.cc"],
hdrs = [
"node_manager/node_manager_client.h",
"node_manager/raylet_client_pool.h",
] + [
# TODO(eoakes): these are needed due to a circular dependency:
# raylet_client_pool.cc -> raylet_client.h -> node_manager_client.h
"//src/ray/raylet_client:raylet_client.h",
],
visibility = ["//visibility:public"],
deps = [
":client_call",
":grpc_client",
"//src/ray/common:id",
"//src/ray/gcs/gcs_client:gcs_client_lib",
"//src/ray/protobuf:node_manager_cc_grpc",
"//src/ray/util:network_util",
] + [
# TODO(eoakes): these three come from raylet_client.h, remove after breaking the circular dependency.
"//src/ray/ipc:client_connection",
"//src/ray/common:ray_object",
"//src/ray/common:task_common",
],
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🚀

exports_files([
"raylet_client.h",
])
ray_cc_library(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please add explicit visibility tags for them (even public ones)

at some point I want to remove our default public visibility from ray.bzl

@edoakes
Copy link
Copy Markdown
Collaborator

edoakes commented Sep 2, 2025

Please add visibility in follow up

@edoakes edoakes merged commit 1d2c95f into ray-project:master Sep 2, 2025
5 checks passed
sampan-s-nayak pushed a commit to sampan-s-nayak/ray that referenced this pull request Sep 8, 2025
…project#56101)

## Why are these changes needed?

1. A new `//src/ray/raylet_client:raylet_client_interface` target
containing only the `RayletClientInterface`.
2. A new `//src/ray/raylet_client:raylet_client_pool` target moved from
the node_manager.
3. A new `//src/ray/raylet_client:node_manager_client` target moved from
the node_manager.
4. Remove `using` statements in the `raylet_client.h` that allow others
to omit `ray::` implicitly.

There are no behavioral changes.

## Related issue number

<!-- For example: "Closes ray-project#1234" -->

## Checks

- [x] I've signed off every commit(by using the -s flag, i.e., `git
commit -s`) in this PR.
- [x] I've run `scripts/format.sh` to lint the changes in this PR.
- [ ] I've included any doc changes needed for
https://docs.ray.io/en/master/.
- [ ] I've added any new APIs to the API Reference. For example, if I
added a
method in Tune, I've added it in `doc/source/tune/api/` under the
           corresponding `.rst` file.
- [ ] I've made sure the tests are passing. Note that there might be a
few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
   - [ ] Unit tests
   - [ ] Release tests
   - [ ] This PR is not tested :(

---------

Signed-off-by: Rueian <rueian@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
jugalshah291 pushed a commit to jugalshah291/ray_fork that referenced this pull request Sep 11, 2025
…project#56101)

## Why are these changes needed?

1. A new `//src/ray/raylet_client:raylet_client_interface` target
containing only the `RayletClientInterface`.
2. A new `//src/ray/raylet_client:raylet_client_pool` target moved from
the node_manager.
3. A new `//src/ray/raylet_client:node_manager_client` target moved from
the node_manager.
4. Remove `using` statements in the `raylet_client.h` that allow others
to omit `ray::` implicitly.

There are no behavioral changes.

## Related issue number

<!-- For example: "Closes ray-project#1234" -->

## Checks

- [x] I've signed off every commit(by using the -s flag, i.e., `git
commit -s`) in this PR.
- [x] I've run `scripts/format.sh` to lint the changes in this PR.
- [ ] I've included any doc changes needed for
https://docs.ray.io/en/master/.
- [ ] I've added any new APIs to the API Reference. For example, if I
added a
method in Tune, I've added it in `doc/source/tune/api/` under the
           corresponding `.rst` file.
- [ ] I've made sure the tests are passing. Note that there might be a
few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
   - [ ] Unit tests
   - [ ] Release tests
   - [ ] This PR is not tested :(

---------

Signed-off-by: Rueian <rueian@anyscale.com>
Signed-off-by: jugalshah291 <shah.jugal291@gmail.com>
wyhong3103 pushed a commit to wyhong3103/ray that referenced this pull request Sep 12, 2025
…project#56101)

## Why are these changes needed?

1. A new `//src/ray/raylet_client:raylet_client_interface` target
containing only the `RayletClientInterface`.
2. A new `//src/ray/raylet_client:raylet_client_pool` target moved from
the node_manager.
3. A new `//src/ray/raylet_client:node_manager_client` target moved from
the node_manager.
4. Remove `using` statements in the `raylet_client.h` that allow others
to omit `ray::` implicitly.

There are no behavioral changes.

## Related issue number

<!-- For example: "Closes ray-project#1234" -->

## Checks

- [x] I've signed off every commit(by using the -s flag, i.e., `git
commit -s`) in this PR.
- [x] I've run `scripts/format.sh` to lint the changes in this PR.
- [ ] I've included any doc changes needed for
https://docs.ray.io/en/master/.
- [ ] I've added any new APIs to the API Reference. For example, if I
added a
method in Tune, I've added it in `doc/source/tune/api/` under the
           corresponding `.rst` file.
- [ ] I've made sure the tests are passing. Note that there might be a
few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
   - [ ] Unit tests
   - [ ] Release tests
   - [ ] This PR is not tested :(

---------

Signed-off-by: Rueian <rueian@anyscale.com>
Signed-off-by: yenhong.wong <yenhong.wong@grabtaxi.com>
dstrodtman pushed a commit that referenced this pull request Oct 6, 2025
## Why are these changes needed?

1. A new `//src/ray/raylet_client:raylet_client_interface` target
containing only the `RayletClientInterface`.
2. A new `//src/ray/raylet_client:raylet_client_pool` target moved from
the node_manager.
3. A new `//src/ray/raylet_client:node_manager_client` target moved from
the node_manager.
4. Remove `using` statements in the `raylet_client.h` that allow others
to omit `ray::` implicitly.

There are no behavioral changes.

## Related issue number

<!-- For example: "Closes #1234" -->

## Checks

- [x] I've signed off every commit(by using the -s flag, i.e., `git
commit -s`) in this PR.
- [x] I've run `scripts/format.sh` to lint the changes in this PR.
- [ ] I've included any doc changes needed for
https://docs.ray.io/en/master/.
- [ ] I've added any new APIs to the API Reference. For example, if I
added a
method in Tune, I've added it in `doc/source/tune/api/` under the
           corresponding `.rst` file.
- [ ] I've made sure the tests are passing. Note that there might be a
few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
   - [ ] Unit tests
   - [ ] Release tests
   - [ ] This PR is not tested :(

---------

Signed-off-by: Rueian <rueian@anyscale.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
…project#56101)

## Why are these changes needed?

1. A new `//src/ray/raylet_client:raylet_client_interface` target
containing only the `RayletClientInterface`.
2. A new `//src/ray/raylet_client:raylet_client_pool` target moved from
the node_manager.
3. A new `//src/ray/raylet_client:node_manager_client` target moved from
the node_manager.
4. Remove `using` statements in the `raylet_client.h` that allow others
to omit `ray::` implicitly.

There are no behavioral changes.

## Related issue number

<!-- For example: "Closes ray-project#1234" -->

## Checks

- [x] I've signed off every commit(by using the -s flag, i.e., `git
commit -s`) in this PR.
- [x] I've run `scripts/format.sh` to lint the changes in this PR.
- [ ] I've included any doc changes needed for
https://docs.ray.io/en/master/.
- [ ] I've added any new APIs to the API Reference. For example, if I
added a
method in Tune, I've added it in `doc/source/tune/api/` under the
           corresponding `.rst` file.
- [ ] I've made sure the tests are passing. Note that there might be a
few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
   - [ ] Unit tests
   - [ ] Release tests
   - [ ] This PR is not tested :(

---------

Signed-off-by: Rueian <rueian@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants