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

Refactor gateway kernel management to achieve a degree of consistency #483

Merged
merged 9 commits into from
May 4, 2021

Conversation

kevin-bates
Copy link
Member

@kevin-bates kevin-bates commented Apr 20, 2021

Issue #455 correctly points out an inconsistency between the GatewayKernelManager vs the other MappingKernelManager instances within the server in that its get_kernel() method doesn't return a KernelManager instance, but rather a JSON object which corresponds to the model returned from the configured Gateway Server that corresponds the targeted kernel manager.

This pull request introduces both a GatewayKernelManager (renaming the previous GKM to GatewayMappingKernelManager) and a GatewayKernelClient class that essentially proxy all requests (and responses) to (from) the configured Gateway Server instance.

It should be noted that these proxy objects do not support the full functionality of regular KernelManager and KernelClient instances but strive to address a certain degree of usability to accomplish a resemblance of consistency across kernel manager/client instances.

Resolves #455

(Note: the renaming of the gateway mapping kernel manager is not a compatibility issue because subclassing is currently not supported.)

@blink1073 blink1073 added this to the 1.7 milestone Apr 20, 2021
@blink1073
Copy link
Collaborator

cc @declanvk

@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2021

Codecov Report

Merging #483 (f4ba1ce) into master (a0135ca) will decrease coverage by 0.72%.
The diff coverage is 62.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #483      +/-   ##
==========================================
- Coverage   77.78%   77.06%   -0.73%     
==========================================
  Files         106      107       +1     
  Lines        9296     9487     +191     
  Branches     1003     1026      +23     
==========================================
+ Hits         7231     7311      +80     
- Misses       1705     1807     +102     
- Partials      360      369       +9     
Impacted Files Coverage Δ
jupyter_server/gateway/managers.py 60.00% <55.00%> (-16.88%) ⬇️
jupyter_server/gateway/gateway_client.py 74.57% <74.57%> (ø)
jupyter_server/serverapp.py 67.23% <100.00%> (ø)
jupyter_server/tests/test_gateway.py 95.06% <100.00%> (ø)
jupyter_server/services/kernels/kernelmanager.py 80.36% <0.00%> (-0.73%) ⬇️

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 a0135ca...f4ba1ce. Read the comment docs.

@blink1073
Copy link
Collaborator

This one needs a rebase

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 merged commit fa12a2e into jupyter-server:master May 4, 2021
hMED22 pushed a commit to hMED22/jupyter_server that referenced this pull request Jan 23, 2023
…ay-km

Refactor gateway kernel management to achieve a degree of consistency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistency in the KernelManager.get_kernel API implementations
3 participants