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

Do not log connection error if the kernel is already shutdown #584

Conversation

martinRenou
Copy link
Contributor

I had the following error locally:

[Voila] Kernel shutdown: c7f832d5-6b46-4f77-9f98-f0b9ca6e7ac8
[Voila] WARNING | Timeout waiting for kernel_info reply from c7f832d5-6b46-4f77-9f98-f0b9ca6e7ac8
[Voila] ERROR | Error opening stream: HTTP 404: Not Found (Kernel does not exist: c7f832d5-6b46-4f77-9f98-f0b9ca6e7ac8)

This was because I closed the Voila application before the client could
finish connecting to the kernel.

With this PR, it should shutdown the kernel properly and be silent after
not being able to connect.

I had the following error locally:

```
[Voila] Kernel shutdown: c7f832d5-6b46-4f77-9f98-f0b9ca6e7ac8
[Voila] WARNING | Timeout waiting for kernel_info reply from c7f832d5-6b46-4f77-9f98-f0b9ca6e7ac8
[Voila] ERROR | Error opening stream: HTTP 404: Not Found (Kernel does not exist: c7f832d5-6b46-4f77-9f98-f0b9ca6e7ac8)
```

This was because I closed the Voila application before the client could
finish connecting to the kernel.

With this PR, it should shutdown the kernel properly and be silent after
not being able to connect.
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2021

Codecov Report

Merging #584 (e2235d7) into master (67cdb6b) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #584   +/-   ##
=======================================
  Coverage   77.39%   77.39%           
=======================================
  Files         110      110           
  Lines       10208    10212    +4     
  Branches     1104     1104           
=======================================
+ Hits         7900     7904    +4     
+ Misses       1918     1915    -3     
- Partials      390      393    +3     
Impacted Files Coverage Δ
jupyter_server/services/kernels/handlers.py 60.92% <0.00%> (-0.64%) ⬇️
jupyter_server/tests/services/kernels/test_api.py 96.93% <0.00%> (-2.05%) ⬇️
jupyter_server/services/kernels/kernelmanager.py 81.84% <0.00%> (+2.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67cdb6b...e2235d7. Read the comment docs.

Copy link
Collaborator

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thanks!

@blink1073 blink1073 added the bug label Sep 17, 2021
@blink1073 blink1073 added this to the 1.10 milestone Sep 17, 2021
@blink1073 blink1073 merged commit ac93dd8 into jupyter-server:master Sep 17, 2021
@martinRenou martinRenou deleted the do_not_log_connection_error_if_kernel_already_shutdown branch September 17, 2021 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants