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

[Serve] Patching ActorProxyWrapper to properly handle is_drained RPC #41744

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

alexeykudinkin
Copy link
Contributor

This is a minified version of https://github.com/ray-project/ray/pull/41722/files, specifically put to be cherry-picked into 2.9

Addresses #41726

Addresses following gaps:

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 :(

Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
@alexeykudinkin alexeykudinkin linked an issue Dec 8, 2023 that may be closed by this pull request
@alexeykudinkin alexeykudinkin added ray 2.9 Issues targeting Ray 2.9 release (~Q4 CY2023) release-blocker P0 Issue that blocks the release labels Dec 8, 2023
Copy link
Contributor

@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.

Defer approval to @GeneDer

Comment on lines +829 to +830
# assert proxy_state._actor_proxy_wrapper.get_num_health_checks() == 10
# assert proxy_state._actor_proxy_wrapper.get_num_drain_checks() == 9
Copy link
Contributor

Choose a reason for hiding this comment

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

intentionally commented out?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on those commented out code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, forgot to remove, asserting on these is currently meaningless unfortunately.

I'm planning to supersede this by https://github.com/ray-project/ray/pull/41722/files

if is_drained:
return ProxyWrapperCallStatus.FINISHED_SUCCEED
else:
# NOTE: Even though call returned successfully, we have to
Copy link
Contributor

Choose a reason for hiding this comment

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

please update the docstring above to match this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if there's much value since this is just a temporary cherry-pick and it's gonna be replaced by https://github.com/ray-project/ray/pull/41722/files anyway

Copy link
Contributor

@GeneDer GeneDer left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this case Alexey! Just make sure to address the points Ed commented

Comment on lines +829 to +830
# assert proxy_state._actor_proxy_wrapper.get_num_health_checks() == 10
# assert proxy_state._actor_proxy_wrapper.get_num_drain_checks() == 9
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on those commented out code

@edoakes edoakes merged commit 567e574 into master Dec 8, 2023
15 of 16 checks passed
@edoakes edoakes deleted the ak/srv-drn-fix-min branch December 8, 2023 22:14
alexeykudinkin added a commit that referenced this pull request Dec 8, 2023
#41744)

This is a minified version of https://github.com/ray-project/ray/pull/41722/files, specifically put to be cherry-picked into 2.9

Addresses #41726

---------

Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
architkulkarni pushed a commit that referenced this pull request Dec 11, 2023
#41744) (#41755)

This is a minified version of https://github.com/ray-project/ray/pull/41722/files, specifically put to be cherry-picked into 2.9

Addresses #41726

Addresses following gaps:

Patches ActorProxyWrapper.is_drained method to handle RPC response properly
Cherry-picks a test from [Serve] Revisiting ProxyState to fix draining sequence #41722 to validate draining sequence is correct
---------

Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ray 2.9 Issues targeting Ray 2.9 release (~Q4 CY2023) release-blocker P0 Issue that blocks the release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Serve] Draining Proxy is shutdown prematurely
3 participants