jupyter-server / enterprise_gateway

A lightweight, multi-tenant, scalable and secure gateway that enables Jupyter Notebooks to share resources across distributed clusters such as Apache Spark, Kubernetes and others.
https://jupyter-enterprise-gateway.readthedocs.io/en/latest/
Other
615 stars 221 forks source link

A few small changes to gateway client #1257

Closed starskyreverie closed 1 year ago

starskyreverie commented 1 year ago

I made a few small changes to the gateway client locally that I wanted to contribute back. One big issue I dealt with was with my connection to the websocket and http api endpoints failing, so I think it would be really helpful if in the code there was somehow an indication to use secure endpoints. Additionally, we found that we needed to pass a lot of environment variables, so an extra_env dictionary is helpful if you're calling the gateway client and need to pass, for example, queue-specific environment variables. Additionally, in kernel.execute, we should somehow let whatever's calling that function know whether an error was returned or not. As it stands now, kernel.execute will take an error and convert it to text - but what if for example, we're testing some notebook code - to do that, you would need to know if the kernel got an error when executing a cell or not.

I'm open to any edits/suggestions, these are just changes we had to make locally and think could be helpful for other people testing :)

welcome[bot] commented 1 year ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

starskyreverie commented 1 year ago

sorry, will fix the remaining tests tmrw

starskyreverie commented 1 year ago

i have no clue why the link check is failing lol, seemed to be working fine yesterday

welcome[bot] commented 1 year ago

Congrats on your first merged pull request in this project! :tada: congrats Thank you for contributing, we are very proud of you! :heart: