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] catch errors caused by bad deployment configurations #20617

Merged

Conversation

iasoon
Copy link
Member

@iasoon iasoon commented Nov 21, 2021

Why are these changes needed?

When a deployment is faulty due to bad user configuration (such as in #19771, #20396) the serve controller code will error forever. This PR catches deployment errors and reports them back to the deploy caller.

Related issue number

Closes #20396

Checks

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

@iasoon iasoon mentioned this pull request Nov 21, 2021
2 tasks
@iasoon iasoon force-pushed the 20396/serve-catch-deployment-errors branch from 015f97a to 6763dc4 Compare November 21, 2021 17:16
@iasoon iasoon changed the title catch errors caused by bad deployment configurations [serve] catch errors caused by bad deployment configurations Nov 21, 2021
@edoakes
Copy link
Contributor

edoakes commented Nov 24, 2021

@iasoon looks like there's a merge conflict. Also, I don't think we can rely on tblib here as it's a third-party dependency and we want to avoid dependencies to keep ray as slim as possible (unless they're really needed). You can see the ones currently depended on here:
https://github.com/ray-project/ray/blob/master/python/setup.py

@edoakes
Copy link
Contributor

edoakes commented Nov 24, 2021

I believe we are currently passing the traceback as a string -- the relevant code is here:
https://github.com/ray-project/ray/blob/master/python/ray/exceptions.py#L66

We should be able to do the same thing here?

@edoakes
Copy link
Contributor

edoakes commented Nov 24, 2021

Aside from tblib part, the changes looks reasonable to me

@iasoon iasoon force-pushed the 20396/serve-catch-deployment-errors branch from 56b0679 to 1652e5d Compare November 29, 2021 19:10
@iasoon iasoon force-pushed the 20396/serve-catch-deployment-errors branch from df087a2 to 0ebf135 Compare November 29, 2021 22:43
@iasoon
Copy link
Member Author

iasoon commented Nov 30, 2021

@edoakes I switched the implementation to use RayTaskError, similar to errors that happen when calling a deployment. Does that look okay to you?

@jiaodong
Copy link
Member

jiaodong commented Dec 1, 2021

Looks good to me as well, thanks for helping to improve this !

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.

RayTaskError might not be ideal but I can't think of a better alternative for now. Thanks for the contribution :)

@edoakes edoakes merged commit 7546ea4 into ray-project:master Dec 2, 2021
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.

[Serve][Bug] invalid runtime env cause Serve controller to error forever
3 participants