-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Upgrade AWS SDK v1 to v2 #7372
Upgrade AWS SDK v1 to v2 #7372
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.
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 <[email protected]>
….ec2MetadataServiceEndpoint per https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration-client-changes.html. Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
… as a host. Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: dblock <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: dblock <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Gradle Check (Jenkins) Run Completed with:
|
plugins/discovery-ec2/src/main/java/org/opensearch/discovery/ec2/Ec2DiscoveryPlugin.java
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Raghuvansh Raj <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
@Bukhtawar I've captured all follow up items here: #7885 |
@dblock we are bringing it to |
Yes, we should. However we do have some seemingly breaking changes (see description). WDYT? I'll start a backport anyway. |
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.x Then, create a pull request where the |
We do, but this is a plugin (and those are long due changes), thanks @dblock ! |
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. |
* 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 <[email protected]> Co-authored-by: Raghuvansh Raj <[email protected]> (cherry picked from commit b15ffc9)
* 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 <[email protected]> Co-authored-by: Raghuvansh Raj <[email protected]> (cherry picked from commit b15ffc9)
…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 <[email protected]> Co-authored-by: Raghuvansh Raj <[email protected]> (cherry picked from commit b15ffc9)
* 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 <[email protected]> Co-authored-by: Raghuvansh Raj <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
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.ec2MetadataServiceEndpoint
instead 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.stsEndpointOverride
toaws.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.