Add caching for AWS metadata#1427
Merged
Merged
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1427 +/- ##
==========================================
- Coverage 81.37% 81.36% -0.02%
==========================================
Files 208 208
Lines 23543 23554 +11
Branches 3715 3716 +1
==========================================
+ Hits 19158 19164 +6
- Misses 3127 3130 +3
- Partials 1258 1260 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
What's the reasoning behind using environment variable to store this? Why not store it on the |
TimPansino
previously approved these changes
Jul 21, 2025
TimPansino
previously approved these changes
Jul 23, 2025
TimPansino
approved these changes
Jul 23, 2025
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.

This PR adds the AWS metadata to the utilization class. This is for the specific case of when the agent is left continuously running and it is utilizing Kubernetes and AWS EC2 (but not EKS).
The utilization data is pulled the first time, but after this, the authentication token is unable to be refreshed. The utilization data will remain the same as long as the same agent instance, so if the EC2 instance fails, the agent will restart (and not just reconnect) and the utilization data will be fetched for the new EC2 instance.