Skip to content

Expose S3TransferManager property S3ClientConfiguration.endpointOverride #3084

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

Merged
merged 1 commit into from
Mar 17, 2022

Conversation

ron1
Copy link
Contributor

@ron1 ron1 commented Mar 8, 2022

Allow setting endpointOverride for the S3TransferManager

Motivation and Context

#2740
#2945

The S3AsyncClient offers the ability to set the endpointOverride as follows:

S3AsyncClient.builder().endpointOverride(URI("http://minio-s3:9000"))

This change adds the endpointOverride feature to the S3TransferManager.

Modifications

Enhance the S3TransferManager S3ClientConfiguration with the ability to set the endpointOverride(URI). This feature requires the following enhancement provided in aws-crt-java v0.15.20: awslabs/aws-crt-java@f5a7955.

Testing

I executed all s3-transfer-manager unit and integration tests with these changes applied using "isolated" S3 test buckets. I also executed the s3-transfer-manager integration tests against a local Minio server. This required modifying the integration tests to specify endpointOverride(URI.create("http://localhost:9000") and to comment the use of ListObjectVersionsRequest in method S3IntegrationTestBase.deleteBucketAndAllContents which proved problematic for Minio.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@ron1 ron1 requested a review from a team as a code owner March 8, 2022 04:42
Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

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

Thank you for the PR. The code change overall looks good to me, but our stability test job keeps failing, likely caused by CRT version bump. I'll investigate it.

@zoewangg
Copy link
Contributor

zoewangg commented Mar 9, 2022

Hey @ron1, just a quick update, we identified a regression in the latest crt version and we are actively working on it right now. We will let you know once it's fixed.

@ron1
Copy link
Contributor Author

ron1 commented Mar 10, 2022

Hi @zoewangg, thanks for the update. Do you know if an issue has been opened against the crt for this regression that I can use to track its progress?

@zoewangg
Copy link
Contributor

There's no GitHub issue to track this right now. The fix on the C side has been merged awslabs/aws-c-http#366 I'll let you know once the change is available in the Java binding.

ron1 added a commit to ron1/nuxeo that referenced this pull request Mar 12, 2022
aws-sdk-java-v2 version 2.17.144
aws-sdk-java-v2 s3-transfer-manager version 2.17.144-SNAPSHOT-PREVIEW
built from PR aws/aws-sdk-java-v2#3084
aws-crt-java version 0.15.20
@zoewangg
Copy link
Contributor

Hi @ron1 thank you for your patience. CRT has released a new version with the fix in 0.15.22. I created #3093 to bump up crt version. We just need to do a rebase once that's merged.

@ron1
Copy link
Contributor Author

ron1 commented Mar 15, 2022

Hi @zoewangg Will you take care of the rebase or would you prefer I do it?

@zoewangg
Copy link
Contributor

zoewangg commented Mar 15, 2022

Looks like there's a conflict. It might be easier for you to resolve the conflict.

@ron1
Copy link
Contributor Author

ron1 commented Mar 17, 2022

@zoewangg I went ahead and force pushed my branch after re-basing it on master but for some reason github does not seem to be reflecting my re-based branch in this PR at the moment.

@uilton-oliveira
Copy link

@ron1 take a look: https://www.githubstatus.com/
there's a instability on github right now..

@ron1 ron1 force-pushed the s3-xfer-mgr-endpoint-override branch from c14e0b9 to 5061765 Compare March 17, 2022 16:34
@ron1
Copy link
Contributor Author

ron1 commented Mar 17, 2022

@zoewangg I went ahead and force pushed a change to the commit message which seems to have fixed the problem.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

84.2% 84.2% Coverage
8.3% 8.3% Duplication

Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@zoewangg zoewangg merged commit 7121f4f into aws:master Mar 17, 2022
@zoewangg
Copy link
Contributor

Hey @ron1, thanks again for the PR, and it will be included in the next release. We'd love to hear your feedback on the Transfer Manager :). Is there any API you think should be improved? Do you think our documentation is clear?

@zoewangg
Copy link
Contributor

@all-contributors please add @ron1 for code

@allcontributors
Copy link
Contributor

@zoewangg

I've put up a pull request to add @ron1! 🎉

@BlingBunny
Copy link

hi,why does the 2.17.292 version still have this problem~

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.

4 participants