Skip to content
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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vladem
Copy link
Contributor

@vladem vladem commented Mar 3, 2025

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).

@vladem vladem requested a deployment to PR integration tests March 3, 2025 14:49 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 3, 2025 14:49 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 3, 2025 14:49 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 3, 2025 14:49 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 3, 2025 14:49 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 3, 2025 14:49 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 3, 2025 14:49 — with GitHub Actions Waiting
@vladem vladem force-pushed the disallow-append-on-non-express branch from 5bc24f7 to d630215 Compare March 3, 2025 14:50
@vladem vladem temporarily deployed to PR integration tests March 3, 2025 14:50 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 3, 2025 14:50 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 3, 2025 14:50 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 3, 2025 14:50 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 3, 2025 14:50 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 3, 2025 14:50 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 3, 2025 14:50 — with GitHub Actions Inactive
Copy link
Contributor

@dannycjones dannycjones left a 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.

Comment on lines 880 to 887
if args.incremental_upload && !matches!(s3_personality, S3Personality::ExpressOneZone) {
return Err(anyhow!(
"--incremental-upload is only supported for S3 Express One Zone buckets"
));
}
Copy link
Contributor

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

@@ -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)).
Copy link
Contributor

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)

Comment on lines 880 to 887
if args.incremental_upload && !matches!(s3_personality, S3Personality::ExpressOneZone) {
return Err(anyhow!(
"--incremental-upload is only supported for S3 Express One Zone buckets"
));
}
Copy link
Contributor

@dannycjones dannycjones Mar 4, 2025

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)

@@ -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"
Copy link
Contributor

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:

Suggested change
"--incremental-upload is only supported for S3 Express One Zone buckets"
"--incremental-upload is only supported on directory buckets in S3 Express One Zone"

Copy link
Contributor

@passaro passaro left a 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.

Vlad Volodkin added 3 commits March 7, 2025 15:37
Signed-off-by: Vlad Volodkin <[email protected]>
Signed-off-by: Vlad Volodkin <[email protected]>
@vladem vladem force-pushed the disallow-append-on-non-express branch from d630215 to b5362e6 Compare March 7, 2025 16:03
@vladem vladem requested a deployment to PR integration tests March 7, 2025 16:03 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 7, 2025 16:03 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 7, 2025 16:03 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 7, 2025 16:03 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 7, 2025 16:03 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 7, 2025 16:03 — with GitHub Actions Waiting
@vladem vladem requested a deployment to PR integration tests March 7, 2025 16:03 — with GitHub Actions Waiting
@vladem vladem temporarily deployed to PR integration tests March 7, 2025 17:15 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 7, 2025 17:15 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 7, 2025 17:15 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 7, 2025 17:15 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 7, 2025 17:15 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 7, 2025 17:15 — with GitHub Actions Inactive
@vladem vladem temporarily deployed to PR integration tests March 7, 2025 17:15 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants