-
Notifications
You must be signed in to change notification settings - Fork 4
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
Set up backend structure and list all available drives #3
Conversation
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 @DenisaCG this looks very promising
# """ | ||
# raise NotImplementedError() | ||
|
||
async def _call_provider( |
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.
We may not be as lucky as the pull requests extension about this. But let's see how it goes in the future.
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[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 @DenisaCG
I have some minor suggestion, but it looks really great.
Co-authored-by: Frédéric Collonval <[email protected]>
Thanks for the review and suggestions @fcollonval! |
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.
@DenisaCG I have some post mortem comment. If you could take them into account in a follow-up PR it will be great
|
||
# When | ||
response = await jp_fetch("jupyter-drives", "drives") |
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.
What is the error code if the credentials are invalid? Do we get an error code like 401 that could in the future be used in the frontend to notify the user credentials are invalid?
Thanks for the additional comments, @fcollonval! All of this has been improved in #9 (the credentials errors are still a work in progress, but will be pushed to the same PR). |
Set up the backend structure.
Created managers as an abstraction layer to enable extensibility, namely for the providers. For this purpose, a base manager class
JupyterDrivesManager
was created, and the corresponding parent classS3Manager
. Theentrypoints
package is also used to list providers for the managers.A base handler class was also instated, as
JupyterDrivesAPIHandler
. All other handlers implement their logic on top of it. To make it as simple and extensible as possible, the handlers and endpoint responses are meant to be provider independent.In
base.py
, we handle the provider selection based onjupyter_notebook_config.py
, through theDrivesConfig
class. The user can set a session token, a secret access token and an access key id to enable access to the desiredS3
drives.