Skip to content

Conversation

@rodrimendoza
Copy link

@rodrimendoza rodrimendoza commented May 8, 2025

What does this PR do?

This PR introduces caching mechanisms to the GitHub Action to enhance performance by caching Datadog tracers and dependencies. Key changes include:

  • Added three new parameters: cache, force-cache-refresh and cache-key in action.yml.
  • Introduced a caching step using actions/cache@v3 in the workflow.
  • Updated the README.md to document the caching feature, including an example configuration.

Motivation

The aim is to reduce the time taken for workflow runs by leveraging caching capabilities. This will improve efficiency, especially for workflows that frequently use Datadog tracers and dependencies.

Additional Notes

Documentation has been updated in README.md to include information about the caching feature, its usage, and examples.

Possible Drawbacks / Trade-offs

  • Caching could introduce complexity in scenarios where dependencies or tracers need to be updated but are mistakenly served from the cache.
  • The cache key configuration requires careful consideration to avoid conflicts or unintended cache misses.

Describe how to test/QA your changes

  • Configure a GitHub Action workflow with the updated action version.
  • Enable caching by setting cache: true and optionally providing a custom cache-key.
  • Run the workflow and verify:
    • The cache is created and restored as expected.
    • The workflow skips downloading dependencies if the cache is available (cache hit).
    • Disabling caching (cache: false) bypasses the cache setup step.
  • Force cache clean by setting force-cache-refresh: true.
  • Run the workflow and verify:
    • There is a cache miss and the workflow has to download the dependencies.

@tonyredondo
Copy link
Member

Superseeded by #43

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