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

Shutdown kernels/terminals on api/shutdown #579

Merged
merged 4 commits into from
Sep 9, 2021

Conversation

martinRenou
Copy link
Contributor

Fix #578

@martinRenou martinRenou marked this pull request as draft September 6, 2021 08:33
@martinRenou martinRenou changed the title Shutdown kernels on api/shutdown Shutdown kernels/terminals on api/shutdown Sep 6, 2021
@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2021

Codecov Report

Merging #579 (4c59367) into master (49d5772) will increase coverage by 0.04%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #579      +/-   ##
==========================================
+ Coverage   77.46%   77.51%   +0.04%     
==========================================
  Files         110      110              
  Lines       10184    10188       +4     
  Branches     1100     1100              
==========================================
+ Hits         7889     7897       +8     
+ Misses       1907     1901       -6     
- Partials      388      390       +2     
Impacted Files Coverage Δ
jupyter_server/services/shutdown.py 70.00% <50.00%> (-7.78%) ⬇️
jupyter_server/base/handlers.py 64.30% <66.66%> (+0.01%) ⬆️
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 49d5772...4c59367. Read the comment docs.

@davidbrochart
Copy link
Contributor

Maybe we should do the same as when shutting down the server with Ctrl-C?

async def _cleanup(self):
"""General cleanup of files, extensions and kernels created
by this instance ServerApp.
"""
self.remove_server_info_file()
self.remove_browser_open_files()
await self.cleanup_extensions()
await self.cleanup_kernels()
await self.cleanup_terminals()

martinRenou and others added 2 commits September 6, 2021 10:49
Co-authored-by: David Brochart <david.brochart@gmail.com>
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

Thanks @martinRenou - These changes look good and in fact resolve a regression issue.

@blink1073 blink1073 added the bug label Sep 9, 2021
@blink1073 blink1073 added this to the 1.11 milestone Sep 9, 2021
@blink1073 blink1073 merged commit 836b5ab into jupyter-server:master Sep 9, 2021
@martinRenou martinRenou deleted the shutdown_kernel branch September 9, 2021 09:42
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.

api/shutdown does not shutdown running kernels
5 participants