Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: implement storage management commands #1587
feat: implement storage management commands #1587
Changes from 13 commits
036bc28
765bb67
d44445c
925cc1a
51c742b
4286d53
9b14b1f
c1932a7
e2f9cb6
3e7a8fc
f91b745
a7e473a
86d691b
7d25ae5
61d6c06
dfdd02a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm not sure if moving directory shouldn require a recursive call tbh, as this is not the behavior people are used to. Doing
mv foo bar
iffoo
is a directory will work in any unix environment. Onlycp
andrm
require this flag.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.
Agree on the difference. I was a bit reluctant to make
mv
recursive by default because it would mean at least 2 network calls to copy a file, ie. first call tries to move as a file and then second call to move as a directory.I find adding a
-r
flag isn't too bad in this case because it's more consistent with other commands. Also we are only supporting moving within the same bucket (no local -> remote) so I hope the expectation doesn't need to be exactly like unix.If it turns out to be a big inconvenience, reverting to unix behaviour would not be a breaking change for those who already use the
-r
flag. So this is probably ok for now.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.
Tying ourselves to the exact error message is not great imo. Can we at least assert on http code instead? It's also available from what I see. Same for 2 different places.
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.
404 could either be thrown from http path not found or bucket doesn't exist. We can add the status code as an additional check but eventually we need a more specific error code to distinguish the two.
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.
I'm not sure if we should always create a bucket without any additional flag, but from UX perspective it sounds ok.