-
Notifications
You must be signed in to change notification settings - Fork 910
IMDS Release #3723
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
IMDS Release #3723
Conversation
) Co-authored-by: Sai Chandupatla <[email protected]>
* Created the Configuration class for Ec2Metadata * Added CR comments in EndpointMode.java Co-authored-by: Sai Chandupatla <[email protected]>
* Implemented Happy Path client functionality along with Request Marshaller Class * Changed expected Exception message in Test Case * Incorporated PR feedback * Fixed SonarCloud Issues Co-authored-by: Sai Chandupatla <[email protected]>
) Co-authored-by: Sai Chandupatla <[email protected]>
* Implemented Response Handling and Parsing Methods for output * Added Javadoc info * Implemented PR comments * Changed dependency scope Co-authored-by: Sai Chandupatla <[email protected]>
* Implemented Retries functionality * Incorporated Code Review comments * Implemented PR Changes-2 * Adding CR review files * Implemented CR comments -4 * nit comment fixed Co-authored-by: Sai Chandupatla <[email protected]>
* Placed EndpointMode.java outside internal folder. Increased Test Coverage * Removed aws-json-protocol dependency * Added test cases for DocumentUnMarshaller Co-authored-by: Sai Chandupatla <[email protected]>
* Added Apache Client tests * Removed extra space in imds pom file * Removed duplicated cases as per PR comments * Removed duplicated cases as per PR comments Co-authored-by: Sai Chandupatla <[email protected]>
* IMDS Ec2 Metada refactoring * IMDS Ec2 Metada refactoring * IMDS Ec2 Metada refactoring * IMDS Ec2 Metada refactoring * IMDS Ec2 Metada refactoring * IMDS Ec2 Metada refactoring * IMDS Ec2 Metada refactoring * fix checkstyle error * Increase IMDS test code coverage
* IMDS Async client * Fix test classes * JavaDoc * PR comments and added IMDS to test-coverage-reporting - Create a common builder Ec2MetadataClientBuilder - Create a common test class BaseEc2MetadataClientTest - Refactor common initialization logic for both sync and async client in BaseEc2MetadataClient class - Use netty async client in unit tests - fix Async error logic * Improve JavaDoc and rename some variables - fix one failing unit test
* IMDS Async * IMDS Async client * Token caching in sync and async client and sync client unit test * Async token caching with retry * Temporarily remove AsyncClient token cache implementation - Pr comments * internal Api for token cache strategies
Async token cache implementation
* Surface area review - removed getters on client builder public interface - rename MetadataResponse to Ec2MetadataResponse - add builder-consumer for retry policy - add DefaultSdkAsyncHttpClientBuilder and DefaultSdkHttpClientBuilder to client builders - remove duplication in BaseEc2MetadataClient constructors - TokenResponseHandler cleanup - Updated ttl header logic if not found in response headers - use SdkHttpClient.Builder in IMDS Client Builder interface - Javadoc - Async Http Request Handlers refactor - add test for mutual exclusion of http client and http client builder in IMDS client builders - dont retry on bad response format from server
* feature changelog
<url>https://aws.amazon.com/sdkforjava</url> | ||
|
||
<dependencies> | ||
<dependency> |
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.
Minor: can we organize the dependencies a bit by separating compile and test dependencies ? Non-test dependencies should be put to the top.
<version>${awsjavasdk.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> |
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.
Does this module only have JUnit5 tests only? If so, let's remove JUnit4 dependencies to avoid the chances of mixing JUnit4 and JUnit5 annotations. See https://github.com/aws/aws-sdk-java-v2/blob/master/services-custom/s3-transfer-manager/pom.xml#L121-L130
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.
Good point, will do that to prevent any junit4 dependency in the classpath
import software.amazon.awssdk.utils.SdkAutoCloseable; | ||
|
||
/** | ||
* Interface to represent the Ec2Metadata Client Class. Used to access instance metadata from a running instance. |
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.
Let's add some code snippets using {@snippet}
/** | ||
* Gets the specified instance metadata value by the given path. For more information about instance metadata, check the | ||
* <a href=https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html>Instance metadata documentation</a>. | ||
* |
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.
Let's add a code sample here as well. Same as sync client.
Implementation of the Ec2 Instance Metadata Client
Release moved to #3725
Motivation and Context
Part of the V2.x parity effort.
Modifications
Creates a new module for the Client with
Testing
Added unit test for clients using Wiremock
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License