-
Notifications
You must be signed in to change notification settings - Fork 54
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
mmpu commit
could make zero-byte commits more obvious to users
#338
Comments
There are a couple ways I have thought about doing this:
The upside of this approach is that it would likely prevent all users from ever making the mistake above. The downside is that we would be converting the CLI from non-interactive to interactive, which I am not really a fan of (and may require a version bump).
Something like:
This approach adds some latency to the CLI invocation, as it will need to make additional requests to fetch the upload directory entries. (With an API max of 10000 parts per multipart upload, and 1000 results max per directory listing, this means at worst 10 additional requests for a given commit.) It does not necessarily prevent first-time users from accidentally committing an empty object, but a flag would appear in the flag list in the help message, which would hopefully mean it's more likely to be noticed by a user running With those tradeoffs in mind, I'm inclined to choose option 2. I am open to other ideas as well! |
Is it just as important for the CLI that the user be very explicit about which parts they want? I wonder if we could make your suggested flag the default behavior and only require the full list of parts if the list that's on the server is ambiguous in some way. We could still allow people to specify specific etags. |
@davepacheco: I don't think it's as important in most cases for the CLI. Having the flag on by default would be a breaking change, though. I would also say I think it makes the most sense to have the flag on by default in the case that no etags are given ( |
Yes, I agree that if the user specified etags, we should just use those. Given that, I think the only cases where this would come up are cases where the command would have failed anyway, so I don't think any correct usage would be affected. Right? |
After some discussion offline, we came up with a scheme we think makes sense:
This scheme requires a major version bump because of item (3): Users expecting Committing a zero-byte object after uploading parts to the MPU is a rare case as far as I know. Additionally, this scheme seems like it will improve the usability for the vast majority of new users without breaking the most common uses of |
A frequent mistake new users of
mmpu
make is not specifying part etags when committing the object:The MPU API requires part etags because parts are normal Manta objects and can thus be overwritten. Specifying the etag ensures the client is committing the correct object. To mirror the API, the
mmpu
CLI requires the etags the user wants to commit.Using the CLI is well-documented (in both the
mmpu commit
help message and themmpu
man page). Still, given that so many users expectmmpu commit
to commit parts they've uploaded without the additional etag specification step, it would be good to improve the usability of this command.The text was updated successfully, but these errors were encountered: