-
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
Add Session workflows documentation #808
Add Session workflows documentation #808
Conversation
Codecov Report
@@ Coverage Diff @@
## main #808 +/- ##
=======================================
Coverage 69.96% 69.96%
=======================================
Files 62 62
Lines 7368 7368
Branches 1223 1223
=======================================
Hits 5155 5155
Misses 1841 1841
Partials 372 372 Continue to review full report at Codecov.
|
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.
Another useful diagram - thank you @andreyvelich! Here are some initial comments...
Create Session Workflow | ||
----------------------- | ||
|
||
The create Session workflow can be seen in figure below: |
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.
The create Session workflow can be seen in figure below: | |
The create Session workflow can be seen in the figure below: |
:width: 90% | ||
:align: center | ||
|
||
When a user starts a new Kernel, the following steps process: |
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.
When a user starts a new Kernel, the following steps process: | |
When a user starts a new kernel, the following steps occur: |
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.
I think "Kernel" should be "kernel" except when it's a proper noun (e.g., Mapping Kernel Manager, Kernel Spec Manager, etc.). I believe this was also true in the general architecture section as well. Perhaps a sweep can be made for such instances.
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.
Sounds good, I will change it to "kernel".
- When interrupt mode is ``Signal``, **Kernel Provisioner** kills the Kernel | ||
with ``SIGINT`` operating system signal. |
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.
- When interrupt mode is ``Signal``, **Kernel Provisioner** kills the Kernel | |
with ``SIGINT`` operating system signal. | |
- When the interrupt mode is ``Signal``, the **Kernel Provisioner** interrupts the kernel | |
with the ``SIGINT`` operating system signal (although other provisioner implementations may use a different approach). |
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.
The diagram for the signal-based interrupt should probably replace Kill
with Interrupt
as well.
#. When Kernel is shutdown, **Session Manager** deletes the Session data from | ||
the SQLite3 DataBase and responses 204 Status Code to the Notebook client. |
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.
Should the kernel's shutdown be detailed similar to its interrupt? I know that can be a lot and we might be trying to limit text. Perhaps we could do something like...
When the kernel is shutdown, ...
and point to the code (or documentation produced from the code)?
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.
@kevin-bates I think that makes sense. I added steps after kernel interrupt.
Please let me know, what do you think.
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.
Hi @andreyvelich - thanks for the updates! Just had a couple of minor comments regarding shutdown.
#. **Mapping Kernel Manager** starts the kernel shutdown process by using | ||
**Multi Kernel Manager** and **Kernel Manager**. | ||
|
||
#. **Kernel Manager** receives interrupt mode from **Kernel Spec Manager**. |
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.
#. **Kernel Manager** receives interrupt mode from **Kernel Spec Manager**. | |
#. **Kernel Manager** determines the mode of interrupt from the **Kernel Spec Manager**. |
message on the control channel. | ||
|
||
#. **Kernel Manager** waits for the kernel shutdown. After the timeout, | ||
**Kernel Manager** interrupts the kernel with ``SIGTERM`` operating system signal. |
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.
**Kernel Manager** interrupts the kernel with ``SIGTERM`` operating system signal. | |
**Kernel Manager** terminates the kernel sending a ``SIGTERM`` operating system signal (or provisioner equivalent). If it finds the kernel process has not terminated, the **Kernel Manager** will follow up with a ``SIGKILL`` operating system signal (or provisioner equivalent) to ensure the kernel's termination. |
Control, and Heartbeat ports. | ||
|
||
#. When shutdown is finished, **Session Manager** deletes the Session data from | ||
the SQLite3 DataBase and responses 204 Status Code to the Notebook client. |
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.
the SQLite3 DataBase and responses 204 Status Code to the Notebook client. | |
the SQLite3 database and responses 204 status code to the Notebook client. |
#. After interrupting kernel, Session sends the `"shutdown_request" <https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-shutdown>`_ | ||
message on the control channel. | ||
|
||
#. **Kernel Manager** waits for the kernel shutdown. After the timeout, |
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.
#. **Kernel Manager** waits for the kernel shutdown. After the timeout, | |
#. **Kernel Manager** waits for the kernel shutdown. After the timeout, and if it detects the kernel process is still running, the |
Thank you for the review @kevin-bates! |
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.
Looks good @andreyvelich - thank you!
Co-authored-by: Steven Silvester <[email protected]>
Co-authored-by: Steven Silvester <[email protected]>
Co-authored-by: Steven Silvester <[email protected]>
Thank you for your feedback @blink1073 @kevin-bates ! |
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.
Thanks! Failure is unrelated
I added create and delete Session workflow to architecture diagrams.
Please take a look at the doc changes.
cc @Zsailer @kevin-bates @blink1073