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

[WIP] Add global caching directory for modules supporting multiple versions #3611

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mericozkayagan
Copy link

@mericozkayagan mericozkayagan commented Dec 1, 2024

Description

Introduce a global caching directory for modules supporting different versions to save space and improve performance.

  • cli/commands/terraform/action.go
    • Add a global cache directory variable.
    • Update the Run function to use the global caching directory.
  • cli/commands/hclfmt/action.go
    • Update the Run function to ignore files in the global caching directory during formatting.
  • cli/provider_cache.go
    • Add logic to check and use the global caching directory if set.
  • docs/_docs/02_features/caching.md
    • Update documentation to reflect the new global caching directory feature.
    • Add a section explaining the benefits of the global caching directory.
  • config/cache_test.go
    • Add tests to verify the global caching directory feature.
    • Ensure tests cover multiple operating systems.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Introduce a global caching directory for modules supporting different versions to save space and improve performance.

Migration Guide

Introduce a global caching directory for modules supporting different versions to save space and improve performance.

* **cli/commands/terraform/action.go**
  - Add a global cache directory variable.
  - Update the `Run` function to use the global caching directory.
* **cli/commands/hclfmt/action.go**
  - Update the `Run` function to ignore files in the global caching directory during formatting.
* **cli/provider_cache.go**
  - Add logic to check and use the global caching directory if set.
* **docs/_docs/02_features/caching.md**
  - Update documentation to reflect the new global caching directory feature.
  - Add a section explaining the benefits of the global caching directory.
* **config/cache_test.go**
  - Add tests to verify the global caching directory feature.
  - Ensure tests cover multiple operating systems.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gruntwork-io/terragrunt?shareId=XXXX-XXXX-XXXX-XXXX).
@mericozkayagan mericozkayagan marked this pull request as draft December 1, 2024 12:18
@mericozkayagan mericozkayagan changed the title Add global caching directory for modules supporting multiple versions [WIP] Add global caching directory for modules supporting multiple versions Dec 1, 2024
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.

1 participant