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

fix(aws): Don't build the cache on cold start #879

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

ViBiOh
Copy link
Contributor

@ViBiOh ViBiOh commented Dec 24, 2024

What does this PR do?

Don't load all the existing caches in memory prior to proceed.

Motivation

Reduce CPU and S3 usage for customer with large number of log groups.

Testing Guidelines

Additional Notes

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

@github-actions github-actions bot added the aws label Dec 24, 2024
@@ -67,29 +63,6 @@ def get(self, log_group_arn):
def _should_fetch_tags(self):
return os.environ.get("DD_FETCH_LOG_GROUP_TAGS", "false").lower() == "true"

def _build_tags_cache(self):
Copy link
Member

Choose a reason for hiding this comment

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

nit: you may want to keep this code there and just remove its usage above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not called somewhere else, it will be a dead code. If we want to revert it, it's preferable to revert the commit I think.

Copy link
Contributor

@ge0Aja ge0Aja left a comment

Choose a reason for hiding this comment

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

lgtm

@ViBiOh ViBiOh merged commit 53e92ff into master Dec 30, 2024
12 checks passed
@ViBiOh ViBiOh deleted the vibioh/dont_build_caches branch December 30, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants