Skip to content

[Merged by Bors] - Add pathStyleAccess to S3ConnectionSpec #401

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

Closed
wants to merge 4 commits into from

Conversation

siegfriedweber
Copy link
Member

@siegfriedweber siegfriedweber commented May 10, 2022

Description

pathStyleAccess added to commons::s3::S3ConnectionSpec

Review Checklist

  • Code contains useful comments
  • (Integration-)Test cases added (or not applicable)
  • Documentation added (or not applicable)
  • Changelog updated (or not applicable)
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

@siegfriedweber siegfriedweber self-assigned this May 10, 2022
@siegfriedweber siegfriedweber force-pushed the extend_s3_configuration branch from bd18f4f to cb78e50 Compare May 11, 2022 10:20
@siegfriedweber siegfriedweber force-pushed the extend_s3_configuration branch from cb78e50 to dd2cdb9 Compare May 11, 2022 10:26
@siegfriedweber siegfriedweber requested a review from a team May 11, 2022 10:30
@siegfriedweber siegfriedweber marked this pull request as ready for review May 11, 2022 10:30
@sbernauer
Copy link
Member

I think the main question is: What is the default value? ;)
Pros of default to true:

  • It should work anywhere (vs. lots of users having problems and need to figure out their S3 doesn't support host style access)
    Pros of default to false:
  • Maybe better performance for AWS S3? Or lower costs from AWS S3?

So i guess we should default to true for maximum portability

@sbernauer
Copy link
Member

And i still can't get around that the bool is optional and not just simply defaulting to true (or false).
But i guess that's the way it is :D

@maltesander
Copy link
Member

I think the main question is: What is the default value? ;) Pros of default to true:

  • It should work anywhere (vs. lots of users having problems and need to figure out their S3 doesn't support host style access)
    Pros of default to false:
  • Maybe better performance for AWS S3? Or lower costs from AWS S3?

So i guess we should default to true for maximum portability

I think pathstyle access will be deprecated at some point? Not sure for every provider, at least for AWS. So for now i would default to true, but still use it in every example and set it explicitly.

@sbernauer
Copy link
Member

Sounds good 👍
The Option actually is really bad IMHO here as we cannot simply set the default to true but instead every individual operator has to enforce the default by itself. Is there any chance of using a bool and default to true?

@maltesander
Copy link
Member

Sounds good +1 The Option actually is really bad IMHO here as we cannot simply set the default to true but instead every individual operator has to enforce the default by itself. Is there any chance of using a bool and default to true?

I think it makes sense that each operator does it on its own. When setting that you can just have an unwrap_or() with the default best suited for the operator.

@sbernauer
Copy link
Member

We agreeded on:

  • The S3ConnectionSpec handles the default value.
  • The default value is false because we then align with other tools out there like Trino or hive MS

@sbernauer
Copy link
Member

We agreed (second time) on

#[serde(default, skip_serializing_if = "Option::is_none")]
pub access_style: Option<S3AccessStyle>,
# [...]

pub enum S3AccessStyle {
    Path,
    VirtualHosted,
}

impl Default for S3AccessStyle {
    fn default() -> Self {
        S3AccessStyle::VirtualHosted
    }
}

Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@maltesander
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented May 11, 2022

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@sbernauer
Copy link
Member

bors retry

@bors
Copy link
Contributor

bors bot commented May 11, 2022

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@sbernauer
Copy link
Member

bors cancel

@maltesander
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented May 11, 2022

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@maltesander
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented May 11, 2022

Stopped waiting for PR status (Github check) without running due to duplicate requests to run. You may check Bors to see that this PR is included in a batch by one of the other requests.

bors bot pushed a commit that referenced this pull request May 11, 2022
## Description

`pathStyleAccess` added to `commons::s3::S3ConnectionSpec`



Co-authored-by: Malte Sander <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 11, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Add pathStyleAccess to S3ConnectionSpec [Merged by Bors] - Add pathStyleAccess to S3ConnectionSpec May 11, 2022
@bors bors bot closed this May 11, 2022
@bors bors bot deleted the extend_s3_configuration branch May 11, 2022 14:07
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