-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
AWS S3 and Alternative S3 destination connector feature #4038
AWS S3 and Alternative S3 destination connector feature #4038
Conversation
@davinchia This is the new one, hope it fine. Feel free to suggest any change. |
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.
Looks great! Thank you for the PR.
One suggestion is that s3_endpoint
can just be an optional. What about defaulting to AWS when this field is empty? The rationales are: 1) asking people to type "aws" seems unnecessary, and 2) in this way, existing users of this connector does not need to migrate their config.
airbyte-integrations/connectors/destination-s3/src/main/resources/spec.json
Outdated
Show resolved
Hide resolved
Thank you @tuliren |
/test connector=connectors/destination-s3
|
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.
Thank you.
There is one NPE issue when s3_endpoint
does not exist in the config (for existing S3 users). Look good and ready to merge otherwise.
...estination-jdbc/src/main/java/io/airbyte/integrations/destination/jdbc/copy/s3/S3Config.java
Outdated
Show resolved
Hide resolved
...destination-s3/src/main/java/io/airbyte/integrations/destination/s3/S3DestinationConfig.java
Outdated
Show resolved
Hide resolved
…/io/airbyte/integrations/destination/jdbc/copy/s3/S3Config.java Co-authored-by: LiRen Tu <[email protected]>
…o/airbyte/integrations/destination/s3/S3DestinationConfig.java Co-authored-by: LiRen Tu <[email protected]>
@@ -74,7 +74,7 @@ public static S3Config getS3Config(JsonNode config) { | |||
partSize = config.get("part_size").asInt(); | |||
} | |||
return new S3Config( | |||
config.get("s3_endpoint").asText(), | |||
config.get("s3_endpoint") == null ? "" : config.get("s3_endpoint").asText() |
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.
@tuliren did you forget ","
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.
Yes, you are right.
@@ -55,7 +55,7 @@ public S3DestinationConfig( | |||
|
|||
public static S3DestinationConfig getS3DestinationConfig(JsonNode config) { | |||
return new S3DestinationConfig( | |||
config.get("s3_endpoint").asText(), | |||
config.get("s3_endpoint") == null ? "" : config.get("s3_endpoint").asText() |
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 same here, "," missing
What
Allow S3 Destination Connector have the option to connect to both standard AWS S3 and Minio S3(Alternative S3).

This PR answering to this issue #3900
Integration test result:

How
Because Minio S3 also supports AWS SDK, just use
AwsClientBuilder.EndpointConfiguration
to enable the custom endpoint.Also check the condition, if the user enters 'aws' in the endpoint field. It will use the default AWS endpoint, else it connects to entered custom endpoint URL
Recommended reading order
spec.json
S3Consumer.java
S3StreamCopier.java
S3Config.java
s3.md
Pre-merge Checklist
Expand the checklist which is relevant for this PR.
Connector checklist
airbyte_secret
in output spec./gradlew :airbyte-integrations:connectors:<name>:integrationTest
./test connector=connectors/<name>
command as documented here is passing.docs/integrations/
directory./publish
command described hereConnector Generator checklist
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changes