Skip to content

Convert cluster compute config in release test to Kuberay compute config#53681

Merged
aslonnie merged 3 commits intomasterfrom
khluu/convert_compute_config_kuberay
Jun 10, 2025
Merged

Convert cluster compute config in release test to Kuberay compute config#53681
aslonnie merged 3 commits intomasterfrom
khluu/convert_compute_config_kuberay

Conversation

@khluu
Copy link
Copy Markdown
Contributor

@khluu khluu commented Jun 9, 2025

The schema of compute config that Kuberay service takes in is currently a bit different from the schema of cluster compute in release tests. This is a helper function built to convert the cluster compute into Kuberay compute config that eventually gets sent into Kuberay service

p
Signed-off-by: kevin <kevin@anyscale.com>
@khluu khluu requested review from aslonnie and Copilot June 9, 2025 23:12
@khluu khluu requested a review from a team as a code owner June 9, 2025 23:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a helper function to convert the cluster compute config into the Kuberay compute config format used by the Kuberay service. Key changes include:

  • Addition of convert_cluster_compute_to_kuberay_compute_config in util.py.
  • A corresponding unit test in test_util.py to validate the conversion logic.
  • Inclusion of the new test in the Bazel BUILD file to execute the unit test.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
release/ray_release/util.py Added helper function for compute config conversion.
release/ray_release/tests/test_util.py Added unit test validating the conversion function.
release/BUILD.bazel Updated Bazel target to include the new unit test.

Comment on lines +228 to +229
if worker_node_type.get("resources", {}):
worker_node_config["resources"] = worker_node_type.get("resources", {})
Copy link

Copilot AI Jun 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider storing the result of worker_node_type.get('resources', {}) in a local variable before the if-statement to avoid duplicate lookups and improve code readability.

Suggested change
if worker_node_type.get("resources", {}):
worker_node_config["resources"] = worker_node_type.get("resources", {})
worker_node_resources = worker_node_type.get("resources", {})
if worker_node_resources:
worker_node_config["resources"] = worker_node_resources

Copilot uses AI. Check for mistakes.
p
Signed-off-by: kevin <kevin@anyscale.com>
@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Jun 10, 2025
Copy link
Copy Markdown
Collaborator

@aslonnie aslonnie left a comment

Choose a reason for hiding this comment

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

lints are failing?

p
Signed-off-by: kevin <kevin@anyscale.com>
@khluu
Copy link
Copy Markdown
Contributor Author

khluu commented Jun 10, 2025

lints are failing?

should be fixed now

@aslonnie aslonnie merged commit 1c8af6c into master Jun 10, 2025
5 checks passed
@aslonnie aslonnie deleted the khluu/convert_compute_config_kuberay branch June 10, 2025 09:43
elliot-barn pushed a commit that referenced this pull request Jun 18, 2025
…fig (#53681)

The schema of compute config that Kuberay service takes in is currently
a bit different from the schema of cluster compute in release tests.
This is a helper function built to convert the cluster compute into
Kuberay compute config that eventually gets sent into Kuberay service

---------

Signed-off-by: kevin <kevin@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
elliot-barn pushed a commit that referenced this pull request Jul 2, 2025
…fig (#53681)

The schema of compute config that Kuberay service takes in is currently
a bit different from the schema of cluster compute in release tests.
This is a helper function built to convert the cluster compute into
Kuberay compute config that eventually gets sent into Kuberay service

---------

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

Labels

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