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] Minor fix to replica shutdown #27778

Merged
merged 2 commits into from
Aug 12, 2022

Conversation

simon-mo
Copy link
Contributor

Signed-off-by: simon-mo [email protected]

Why are these changes needed?

Otherwise it throws

(ServeReplica:MyFastAPIDeployment pid=63096)   File "/Users/xmo/Desktop/ray/ray/python/ray/serve/_private/replica.py", line 529, in prepare_for_shutdown
(ServeReplica:MyFastAPIDeployment pid=63096)     del self.callable.__del__
(ServeReplica:MyFastAPIDeployment pid=63096) AttributeError: __del__

in the background. This is only caught because Ray Core was logging uncaught exception. This doesn't impact the normal teardown process, it only happens during FastAPI integration stack because that's the class that has the del attribute.

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

@edoakes
Copy link
Contributor

edoakes commented Aug 11, 2022

@simon-mo this does not need to be cherry-picked because the relevant Ray core change is not cherry-picked, right?

@simon-mo
Copy link
Contributor Author

Yup. We just need this in master.

@simon-mo simon-mo merged commit bf9f062 into ray-project:master Aug 12, 2022
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
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

3 participants