-
Notifications
You must be signed in to change notification settings - Fork 1k
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
FastAPI route for remote files #11211
FastAPI route for remote files #11211
Conversation
This is lovely - a very solid refactoring that was on my todo list. |
Co-authored-by: John Chilton <[email protected]>
Many thanks! |
The CircleCI test is broken in dev (working on it) but there is an outside chance that integration selenium test failure might intersect this code so I'm re-running that test. |
I had the same failures (mypy errors in packages + integrated selenium test) on my PR after a green run. Unless this is different, it should be unrelated to the PR. |
Thank you @jmchilton and @ic4f for checking. I managed to run the failing test locally and seems to pass. |
Yeah - hopefully #11217 helps track down those integration selenium failures. |
Ref #10889
Summary
RemoteFilesManager
to encapsulate the controller logic.Additional comments
Enums
to control the possible values as the/api/remote_files
index method docstrings suggested. This provides validation and shows them in the interactive OpenAPI docs as a nice combo. After that, I realized that thetarget
query parameter can be also a URI so ended up leaving it as anstr
.FilesSourcePlugin
pydantic model tries to represent the base of any kind of files source plugin. To allow other types of plugins (e. g. dropbox, etc.) to add their own fields to the serialization, and do not break the validation, a little extra configuration was added to this model.