Skip to content
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

Refactor tryDetectRegion Method . Remove aws-json-protocol dependency #3324

Open
wants to merge 3 commits into
base: feature/master/imds
Choose a base branch
from

Conversation

srsaikumarreddy
Copy link
Contributor

Refactor tryDetectRegion Method . Remove aws-json-protocol dependency

Motivation and Context

Refactor tryDetectRegion Method . Remove aws-json-protocol dependency

Modifications

Refactor tryDetectRegion Method . Remove aws-json-protocol dependency

Testing

Ran Existing InstanceProfileRegionProvider Test and is compliant.

Screenshots (if appropriate)

Types of changes

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

Checklist

  • [x ] I have read the CONTRIBUTING document
  • [ x] Local run of mvn install succeeds
  • [ x] 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

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

@srsaikumarreddy srsaikumarreddy requested a review from a team as a code owner July 25, 2022 22:29
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug B 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 18 Code Smells

34.8% 34.8% Coverage
4.2% 4.2% Duplication

@@ -72,7 +72,7 @@ private DefaultEc2Metadata(DefaultEc2Metadata.Ec2MetadataBuilder builder) {
this.tokenTtl = builder.tokenTtl != null ? builder.tokenTtl : Duration.ofSeconds(21600);
this.endpointMode = ENDPOINT_PROVIDER.resolveEndpointMode(builder.endpointMode);
this.httpDebugOutput = builder.httpDebugOutput;
this.httpClient = builder.httpClient != null ? builder.httpClient : UrlConnectionHttpClient.create();
this.httpClient = builder.httpClient != null ? builder.httpClient : ApacheHttpClient.create();
Copy link
Contributor

Choose a reason for hiding this comment

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

This would cause build to fail for applications that only have/use UrlConnectionHttpClient as HTTP dependency.
We should load the http client using the default chain instead of defaulting to an implementation explicitly

private static final SdkHttpServiceProvider<SdkHttpService> DEFAULT_CHAIN = new CachingSdkHttpServiceProvider<>(

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.

3 participants