Skip to content

[release test] remove sdk property in AnyscaleJobManager#60277

Merged
aslonnie merged 1 commit intoray-project:masterfrom
anyscale:lonnie-260118-managersdk
Jan 20, 2026
Merged

[release test] remove sdk property in AnyscaleJobManager#60277
aslonnie merged 1 commit intoray-project:masterfrom
anyscale:lonnie-260118-managersdk

Conversation

@aslonnie
Copy link
Collaborator

just save the sdk as a private member instead

@aslonnie aslonnie requested a review from a team as a code owner January 18, 2026 19:33
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors AnyscaleJobManager to cache the Anyscale SDK instance in a private _sdk member instead of accessing it through a property. This is a good change that simplifies the code and avoids repeated property lookups. My review includes a suggestion to add a type hint for the new _sdk attribute to improve code clarity and maintainability.

self.start_time = None
self.counter = 0
self.cluster_manager = cluster_manager
self._sdk = cluster_manager.sdk
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve code clarity and maintainability, it's a good practice to add a type hint for the new private member _sdk.

For this to work, you'll also need to add the following imports at the top of the file:

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from anyscale.sdk.anyscale_client.sdk import AnyscaleSDK
Suggested change
self._sdk = cluster_manager.sdk
self._sdk: "AnyscaleSDK" = cluster_manager.sdk

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@aslonnie aslonnie force-pushed the lonnie-260118-managersdk branch from 91b0803 to a688c2e Compare January 18, 2026 19:51
@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Jan 18, 2026
@aslonnie aslonnie force-pushed the lonnie-260118-managersdk branch 2 times, most recently from 533c479 to 915f10f Compare January 18, 2026 20:55
just save the sdk as a private member instead

Signed-off-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com>
@aslonnie aslonnie force-pushed the lonnie-260118-managersdk branch from 915f10f to 5ae14d2 Compare January 18, 2026 20:56
@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core release-test release test labels Jan 19, 2026
@aslonnie aslonnie merged commit 9c9a996 into ray-project:master Jan 20, 2026
6 checks passed
jinbum-kim pushed a commit to jinbum-kim/ray that referenced this pull request Jan 29, 2026
…#60277)

just save the sdk as a private member instead

Signed-off-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com>
Signed-off-by: jinbum-kim <jinbum9958@gmail.com>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Feb 1, 2026
…#60277)

just save the sdk as a private member instead

Signed-off-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com>
Signed-off-by: 400Ping <jiekaichang@apache.org>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Feb 3, 2026
…#60277)

just save the sdk as a private member instead

Signed-off-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.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 release-test release test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants