-
Notifications
You must be signed in to change notification settings - Fork 59
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
vdk-jupyter: Pick up REST API URL from the env #2142
Conversation
Currently, users are expected to configure the REST API URL manually, which is a bad practice. After this change, the REST API URL will be picked up from the environment, which means it will be configured when deploying the docker image. Testing done: pipelines Signed-off-by: Gabriel Georgiev <[email protected]>
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 for doing this change.
This would improve security and maintainability vdk-jypyter. Using environment variables to configure deployment-specific details like the REST API URL is a common practice and allows for more flexibility and easier management.
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/vdk_jupyterlab_extension/handlers.py
Outdated
Show resolved
Hide resolved
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/vdk_jupyterlab_extension/handlers.py
Outdated
Show resolved
Hide resolved
Also see jobData.ts, vdkOptions.py, and vdkOptions.ts. Rest api url options should be removed from there, as well. |
Signed-off-by: Gabriel Georgiev <[email protected]>
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/vdk_jupyterlab_extension/handlers.py
Outdated
Show resolved
Hide resolved
…on/gageorgiev/jupyter-rest-url
Signed-off-by: Gabriel Georgiev <[email protected]>
Signed-off-by: Gabriel Georgiev <[email protected]>
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!
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.
LGTM
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/vdk_jupyterlab_extension/handlers.py
Show resolved
Hide resolved
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.
One more thing. Almost never use raise Exception. If you see it in the code, we should fix it.
Currently, users are expected to configure the REST API URL manually, which is a bad practice. After this change, the REST API URL will be picked up from the environment, which means it will be configured when deploying the docker image.
Also, a file with a typo in its name was renamed.
Testing done: pipelines