-
Notifications
You must be signed in to change notification settings - Fork 188
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
Disallow append on non-express buckets #1297
base: main
Are you sure you want to change the base?
Conversation
5bc24f7
to
d630215
Compare
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.
just some minor things.
I think the logging is important, in case there's ever any changes to the way customers access S3 Express One Zone. That will provide a pointer that the logic has updated, and prompt to check for an update to Mountpoint.
One thing making me a little uncomfortable is that we don't have any tests for the S3Personality
type. I wonder if its worth writing some quick ones that check for a basic endpoint config and bucket name, do we get the expected personality? i.e. here's a directory bucket name, yes it maps correct. here's a bucket name and an outposts endpoint, yes it maps correctly.
mountpoint-s3/src/cli.rs
Outdated
if args.incremental_upload && !matches!(s3_personality, S3Personality::ExpressOneZone) { | ||
return Err(anyhow!( | ||
"--incremental-upload is only supported for S3 Express One Zone buckets" | ||
)); | ||
} |
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.
This should be below the log on line 887 that describes the detected bucket type
mountpoint-s3/CHANGELOG.md
Outdated
@@ -1,5 +1,9 @@ | |||
## Unreleased | |||
|
|||
### Breaking changes | |||
|
|||
* Disallow the usage of `--incremental-upload` command-line argument on non S3 Express buckets ([#1297](https://github.com/awslabs/mountpoint-s3/pull/1297)). |
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.
very nitpick: the period should be before the PR link to be consistent with prev changelog.
(only putting this since we need to make the other change)
mountpoint-s3/src/cli.rs
Outdated
if args.incremental_upload && !matches!(s3_personality, S3Personality::ExpressOneZone) { | ||
return Err(anyhow!( | ||
"--incremental-upload is only supported for S3 Express One Zone buckets" | ||
)); | ||
} |
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 think the personality check should live in the impl of S3Personality
to match things like is_list_ordered
, etc..
i.e. is_append_supported(&self)
mountpoint-s3/src/cli.rs
Outdated
@@ -877,6 +877,12 @@ where | |||
|
|||
let (client, runtime, s3_personality) = client_builder(&args)?; | |||
|
|||
if args.incremental_upload && !matches!(s3_personality, S3Personality::ExpressOneZone) { | |||
return Err(anyhow!( | |||
"--incremental-upload is only supported for S3 Express One Zone buckets" |
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.
This is what we use in docs:
"--incremental-upload is only supported for S3 Express One Zone buckets" | |
"--incremental-upload is only supported on directory buckets in S3 Express One Zone" |
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 should also mention the limitation in the help for --incremental-upload
.
Signed-off-by: Vlad Volodkin <[email protected]>
Signed-off-by: Vlad Volodkin <[email protected]>
Signed-off-by: Vlad Volodkin <[email protected]>
d630215
to
b5362e6
Compare
Signed-off-by: Vlad Volodkin <[email protected]>
Fail early (on mount) with a descriptive error message, when
--incremental-upload
flag is used with standard buckets. We've seen in #1268 when an error reported on flush can be ignored by certain workloads.Decision is made based on endpoint resolution infer_s3_personality. This may erroneously assume that the bucket is S3 Standard if either endpoint resolution failed or
auth_scheme
can not be parsed. In case of an error user may bypass it by specifying--bucket-type=directory
flag.As an alternative, we can infer if the bucket is a directory bucket from the name: docs. Then we can assume that all directory buckets support
--incremental-upload
.Does this change impact existing behavior?
Yes,
mount-s3 s3-standard-bucket <folder> --incremental-upload
will start failing on mount.Does this change need a changelog entry? Does it require a version change?
Yes, added.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).