-
Notifications
You must be signed in to change notification settings - Fork 159
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
feat: Accept multiple paths in the vfolder mkdir API #1803
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.
Good!
I left some comments
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.
some more comments!
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.
good!
I checked the functionality and it works well.
I left a few comment about typing
- Introduce `common.types.{ItemResult,ResultSet}` for consistent typing and structuring of future multi-result APIs
- Also limit the maximum number of paths to create concurrently (50). - Expose non-5xx storage-proxy responses without wrapping them as "InvalidAPIParameters" which may be misleading for semantic failures.
Totally different api from what I first wrote! amazing! |
This PR adds an extra feature to specify multiple directories in the vfolder mkdir API to create them via a single API call.
nargs
inclick.option
The feature itself is a relatively small addition, but this PR demonstrates how we are going to design and implement multi-result (or batch) APIs.
common.types.{ItemResult,ResultSet}
to distinguish success/failed results, with optional error messages attached to each item.print_result_set()
API.Examples
Partial success (console output):
Partial success (JSON output):
All failed (JSON output):