Skip to content

Conversation

@L-Applin
Copy link
Contributor

Finish the IMDS (instance metadata) service client and refactor some of its code.

Motivation and Context

The IMDS client needs to be coded manually.

Modifications

Main changes are improvement to the control flow of DefaultEc2Metadata and EndpointProvider. Some refactoring of test cases was done.

Testing

Unit tests were there and were updated with this PR.

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

@L-Applin L-Applin requested a review from a team as a code owner October 17, 2022 15:29
@L-Applin
Copy link
Contributor Author

SonarCloud Quality Gate failed.    Quality Gate failed

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

65.3% 65.3% Coverage 1.3% 1.3% Duplication

The two security Hotspot should be safe, as the ip adresses are already publicly available: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html

@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 68 Code Smells

64.4% 64.4% Coverage
0.9% 0.9% Duplication

@L-Applin L-Applin enabled auto-merge (squash) October 25, 2022 13:42
@L-Applin L-Applin merged commit 9d40ec1 into feature/master/imds Oct 25, 2022
@L-Applin L-Applin deleted the olapplin/imds-refactor branch October 27, 2022 14:07
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.

2 participants