-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Fix packages of exceptions catched by gateway manager #5055
Fix packages of exceptions catched by gateway manager #5055
Conversation
958e702
to
ee28120
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shuichiro-makigaki - thank you for these changes! I wonder if something was introduced that prevents restarts or new starts following culling because this should have been seen before. I've confirmed these changes - thanks again!
@shuichiro-makigaki - would you mind submitting essentially this same PR against jupyter_server? |
`gateway_request` in `gateway.manager` raises `tornado.web.HTTPError` exceptions, but the callers, such as `GatewayKernelManager.get_kernel`, catch `tornado.httpclient.HTTPError`, instead of `tornado.web.HTTPError`. Therefore, the callers can not handle exceptions during gateway interactions. This causes that, for example, when Jupyter Enterprise Gateway culled a kernel by idle timeout, the gateway manager can not handle the kernel's absent appropriately. As a result, notebook users see ambiguous "Kernel Error" and can not restart the kernel or start a new kernel.
ee28120
to
aa73eb4
Compare
I added some fixes to tests also.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
gateway_request
ingateway.manager
raisestornado.web.HTTPError
exceptions, but the callers, such asGatewayKernelManager.get_kernel
, catchtornado.httpclient.HTTPError
, instead oftornado.web.HTTPError
. Therefore, the callers can not handle exceptions during gateway interactions.This causes that, for example, when Jupyter Enterprise Gateway culled a kernel by idle timeout, the gateway manager can not handle the kernel's absent appropriately. As a result, notebook users see ambiguous "Kernel Error" and can not restart the kernel or start a new kernel.