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

Update gateway support with recent changes #4431

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

kevin-bates
Copy link
Member

Convey notebook working directory to the gateway (nb2kg pr-21)

  • This allows users of containerized kernels to mount home directories on the containers/pods so as to mimic behaviors as if the kernel was local.

Support retrieval of kernelspec resources from the gateway (nb2kg pr-23)

  • This simply enables the three kinds of kernelspec resources (kernel.js, kernel.css, logo-*) to be returned when running against a gateway.
  • Since gateway returns kernelspecs in model form, we now test if the kernel spec info meets the model criteria (rather than add additional (and duplicate) handlers).
  • Requires Jupyter Kernel Gateway version 2.2.0 otherwise no resources are returned (as before the change).

@kevin-bates kevin-bates changed the title Update gateway support with recent changes [WIP] Update gateway support with recent changes Feb 26, 2019
Convey notebook working directory to the gateway (nb2kg pr-21)
Support retrieval of kernelspec resources from the gateway (nb2kg pr-23)
@kevin-bates kevin-bates changed the title [WIP] Update gateway support with recent changes Update gateway support with recent changes Feb 26, 2019
raise
else:
kernel_spec_resource = response.body
raise gen.Return(kernel_spec_resource)
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, since we require Python 3, we can use return kernel_spec_resource

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok - thanks. Since this is one of many gen.Returns, I think it makes sense to change these whenever we "make the sweep" to move to async/await - if that's okay with you.

@@ -91,6 +91,16 @@ def _kernels_endpoint_default(self):
def _kernelspecs_endpoint_default(self):
return os.environ.get(self.kernelspecs_endpoint_env, self.kernelspecs_endpoint_default_value)

kernelspecs_resource_endpoint_default_value = '/kernelspecs'
Copy link
Member

Choose a reason for hiding this comment

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

Does every endpoint need to be separately configurable? It seems to me like a single base path should be everything that's needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe these are configurable (in NB2KG is done via just envs) for cases when the gateway server (JKG or JEG) is behind a reverse proxy. This should be the last of them. (yeah, famous last words, I know. 😄)

Copy link
Member

Choose a reason for hiding this comment

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

ok, let's switch this over to a single configurable prefix before adding any more after this one.

@minrk minrk added this to the 6.0 milestone Mar 6, 2019
@minrk minrk merged commit 88aae11 into jupyter:master Mar 6, 2019
@kevin-bates kevin-bates deleted the apply-nb2kg-updates branch June 26, 2019 22:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants