-
Notifications
You must be signed in to change notification settings - Fork 308
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
Introduce ServerKernelManager class #1101
Introduce ServerKernelManager class #1101
Conversation
Codecov ReportBase: 39.29% // Head: 80.00% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1101 +/- ##
===========================================
+ Coverage 39.29% 80.00% +40.71%
===========================================
Files 68 68
Lines 8006 8019 +13
Branches 1585 1587 +2
===========================================
+ Hits 3146 6416 +3270
+ Misses 4664 1182 -3482
- Partials 196 421 +225
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I know this is merely semantics and probably not worth debating too much, but wouldn't it be more accurate/appropriate to Until |
Great stuff, @kevin-bates! Just one minor comment. Otherwise, this looks good to me! Thank you for working on this PR! |
BTW, the coverage report is a little off here. I don't think we should block the merging of this PR based on coverage. |
I totally agree @Zsailer - good idea. I also removed the implementations for |
Thanks both! I'll cut a new RC now, tentatively our last one |
Per this comment/response, this pull request introduces a
ServerKernelManager
class which is instantiated by default within theAsyncMappingKernelManager
for each managed instance. Currently,ServerKernelManager
derives from jupyter_client'sAsyncIOLoopKernelManager
, thereby preserving existing functionality.Introducing this class allows the Server to use this implementation to provide server-specific functionality like kernel-based events, the potential for highly available kernels, etc., and re-enforces the notion that the
KernelManager
class (and corresponding functionality) is the purview of the application.Applications bringing their own subclass of
AsyncIOLoopKernelManager
should update their implementations to derive fromServerKernelManager
or risk missing functionality that ultimately is associated withServerKernelManager
.With this PR the activity-tracking attributes that were previously patched onto the current instance are formally defined traits. As a result, the
execution_state
's initial value is "initializing", which will be set to "starting" upon the completion of thestart_kernel()
method. If this complicates state management too much, we can have the initial state be "starting", but I felt "initializing" was more correct.Note that this PR does NOT introduce a similarly named class relative to
MappingKernelManager
. This simplifies support and serves as an impetus for applications/server extensions to switch to using the async kernel management.