Upgrade AWS SDK v1 to v2#7372
Merged
Bukhtawar merged 91 commits intoopensearch-project:mainfrom Jun 2, 2023
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
6 tasks
Contributor
|
Code scan for dependencies, looks like we have just the two plugins consuming AWS SDK |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: dblock <dblock@amazon.com>
….ec2MetadataServiceEndpoint per https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration-client-changes.html. Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
… as a host. Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: dblock <dblock@amazon.com>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: dblock <dblock@amazon.com>
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com>
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Bukhtawar
approved these changes
Jun 2, 2023
Contributor
|
@Bukhtawar I've captured all follow up items here: #7885 |
Contributor
|
@dblock we are bringing it to |
Member
Author
Yes, we should. However we do have some seemingly breaking changes (see description). WDYT? I'll start a backport anyway. |
Contributor
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-7372-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b15ffc9caaec0303b91ecaff1ab39bb9e860ba48
# Push it to GitHub
git push --set-upstream origin backport/backport-7372-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.xThen, create a pull request where the |
Contributor
|
We do, but this is a plugin (and those are long due changes), thanks @dblock ! |
Member
Author
|
Backport failed above, will need to do a manual one. I can do it next week, @raghuvanshraj lmk if you want to beat me to it. |
dblock
added a commit
to dblock/OpenSearch
that referenced
this pull request
Jun 6, 2023
* AWS SDK v2. * Migrating com.amazonaws.sdk.ec2MetadataServiceEndpointOverride to aws.ec2MetadataServiceEndpoint per https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration-client-changes.html. * Fetch host address for EC2 metadata service from SdkSettings. * Deprecations of running with partial keys were removed in AWS SDK v2. * Underscore is not a valid host name, thus URI.create doesn't treat it as a host. * Added missing JARs, all tests pass. * Setup a default AWS profile under config, don't read ~/.aws. * Re-enable availability zone node attribute implementation. * Cleaning up privileged calls using SocketAccess * Consistently setup and teardown AWS settings in repository-s3. * Using SdkException instead of RuntimeException in S3BlobContainer * Removing AwsSessionCredentials object from S3BasicSesstionCredentials * Removing S3BasicCredentials and S3BasicSessionCredentials Signed-off-by: dblock <dblock@amazon.com> Co-authored-by: Raghuvansh Raj <raghraaj@amazon.com> (cherry picked from commit b15ffc9)
6 tasks
dblock
added a commit
that referenced
this pull request
Jun 6, 2023
* AWS SDK v2. * Migrating com.amazonaws.sdk.ec2MetadataServiceEndpointOverride to aws.ec2MetadataServiceEndpoint per https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration-client-changes.html. * Fetch host address for EC2 metadata service from SdkSettings. * Deprecations of running with partial keys were removed in AWS SDK v2. * Underscore is not a valid host name, thus URI.create doesn't treat it as a host. * Added missing JARs, all tests pass. * Setup a default AWS profile under config, don't read ~/.aws. * Re-enable availability zone node attribute implementation. * Cleaning up privileged calls using SocketAccess * Consistently setup and teardown AWS settings in repository-s3. * Using SdkException instead of RuntimeException in S3BlobContainer * Removing AwsSessionCredentials object from S3BasicSesstionCredentials * Removing S3BasicCredentials and S3BasicSessionCredentials Signed-off-by: dblock <dblock@amazon.com> Co-authored-by: Raghuvansh Raj <raghraaj@amazon.com> (cherry picked from commit b15ffc9)
This was referenced Jun 6, 2023
gaiksaya
pushed a commit
to gaiksaya/OpenSearch
that referenced
this pull request
Jun 26, 2023
…t#7926) * AWS SDK v2. * Migrating com.amazonaws.sdk.ec2MetadataServiceEndpointOverride to aws.ec2MetadataServiceEndpoint per https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration-client-changes.html. * Fetch host address for EC2 metadata service from SdkSettings. * Deprecations of running with partial keys were removed in AWS SDK v2. * Underscore is not a valid host name, thus URI.create doesn't treat it as a host. * Added missing JARs, all tests pass. * Setup a default AWS profile under config, don't read ~/.aws. * Re-enable availability zone node attribute implementation. * Cleaning up privileged calls using SocketAccess * Consistently setup and teardown AWS settings in repository-s3. * Using SdkException instead of RuntimeException in S3BlobContainer * Removing AwsSessionCredentials object from S3BasicSesstionCredentials * Removing S3BasicCredentials and S3BasicSessionCredentials Signed-off-by: dblock <dblock@amazon.com> Co-authored-by: Raghuvansh Raj <raghraaj@amazon.com> (cherry picked from commit b15ffc9)
shiv0408
pushed a commit
to Gaurav614/OpenSearch
that referenced
this pull request
Apr 25, 2024
* AWS SDK v2. * Migrating com.amazonaws.sdk.ec2MetadataServiceEndpointOverride to aws.ec2MetadataServiceEndpoint per https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration-client-changes.html. * Fetch host address for EC2 metadata service from SdkSettings. * Deprecations of running with partial keys were removed in AWS SDK v2. * Underscore is not a valid host name, thus URI.create doesn't treat it as a host. * Added missing JARs, all tests pass. * Setup a default AWS profile under config, don't read ~/.aws. * Re-enable availability zone node attribute implementation. * Cleaning up privileged calls using SocketAccess * Consistently setup and teardown AWS settings in repository-s3. * Using SdkException instead of RuntimeException in S3BlobContainer * Removing AwsSessionCredentials object from S3BasicSesstionCredentials * Removing S3BasicCredentials and S3BasicSessionCredentials Signed-off-by: dblock <dblock@amazon.com> Co-authored-by: Raghuvansh Raj <raghraaj@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Upgrading AWS SDK v1 to v2 in discovery-ec2 and repository-s3.
This PR contains the following potentially breaking changes for end-users.
aws.ec2MetadataServiceEndpointinstead ofcom.amazonaws.sdk.ec2MetadataServiceEndpointOverride. If a user set the IMDS endpoint before that will no longer work without a change. Similarly we've renamedcom.amazonaws.sdk.stsEndpointOverridetoaws.stsEndpoint. What are the use-cases where anyone would actually do this, or was it done for testing only?The AWS SDK has other changes, see https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration-client-changes.html and https://github.com/aws/aws-sdk-java-v2/blob/master/docs/LaunchChangelog.md for all changes between AWS SDK v1 and v2.
Related Issues
Resolves #7312.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.