docs: Calling out update for existing cache locations in v1.0.4 - #6005
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughA new changelog document for v1.0.4 is added, documenting that Terragrunt's global cache directory now follows platform-specific conventions (XDG-based on Linux, macOS Library/Caches, Windows LocalAppData) rather than using a hardcoded Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx (2)
8-8: ⚡ Quick winWindows path could be more specific.
The phrase "under
%LocalAppData%" is vague. Consider specifying the complete path%LocalAppData%\terragruntto match the specificity provided for Linux and macOS paths.📝 Suggested improvement for clarity
-Terragrunt's global cache directory now resolves to the platform's user cache location instead of a hard-coded `~/.cache/terragrunt`. On Linux this honors `XDG_CACHE_HOME` (still `~/.cache/terragrunt` by default), on macOS it resolves to `~/Library/Caches/terragrunt`, and on Windows it resolves under `%LocalAppData%`. The CAS content store, the auto provider cache, and the IaC engine plugin directory all move with it. +Terragrunt's global cache directory now resolves to the platform's user cache location instead of a hard-coded `~/.cache/terragrunt`. On Linux this honors `XDG_CACHE_HOME` (still `~/.cache/terragrunt` by default), on macOS it resolves to `~/Library/Caches/terragrunt`, and on Windows it resolves to `%LocalAppData%\terragrunt`. The CAS content store, the auto provider cache, and the IaC engine plugin directory all move with it.As per coding guidelines: Review documentation for clarity and ensure it's easy to understand and follow.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx` at line 8, Update the Windows path sentence to be specific: replace "under %LocalAppData%" with the full path "%LocalAppData%\terragrunt" so the sentence matches the explicit examples for Linux and macOS; locate and edit the sentence in the xdg-cache-paths.mdx content where the Windows resolution is described.
12-12: ⚡ Quick winConsider clarifying when cleanup is actually necessary.
The current phrasing lists OS conditions, but the core issue is whether the cache path changed. Linux users with the default
XDG_CACHE_HOMEretain~/.cache/terragrunt, so they don't need cleanup. Consider rephrasing to emphasize that cleanup is only needed when the new platform-specific path differs from the old one.📝 Alternative phrasing for improved clarity
-Consider deleting the old paths to reclaim that space if you are on macOS or Windows, or have configured a custom `XDG_CACHE_HOME`: +Consider deleting the legacy `~/.cache/terragrunt` directory to reclaim disk space if your platform-specific cache location differs (macOS, Windows, or Linux with a custom `XDG_CACHE_HOME`):As per coding guidelines: Ensure documentation is easy to understand and follow.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx` at line 12, The sentence currently suggests deleting old cache paths based on OS, but should clarify that cleanup is only necessary when the cache location actually changed; update the line in the XDG_CACHE_HOME guidance so it states that users should delete old cache directories only if their cache path moved (e.g., when switching OSes or after setting a custom XDG_CACHE_HOME) and that Linux users who still have the same default (~/.cache/terragrunt) don’t need to clean up; adjust the phrasing in the xd-g cache paths paragraph to emphasize “when the new platform-specific path differs from the old one” rather than listing OSs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx`:
- Line 15: Update the heading/comment to include the provider cache alongside
the CAS store and engine plugins (e.g., mention "CAS store, engine plugins, and
provider cache") so it accurately reflects that the provider cache is also
stored under the legacy ~/.cache/terragrunt (specifically
~/.cache/terragrunt/providers); reference the provider cache path construction
using EnsureCacheDir() which builds cacheDir/providers to ensure consistency
with the rest of the doc.
---
Nitpick comments:
In `@docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx`:
- Line 8: Update the Windows path sentence to be specific: replace "under
%LocalAppData%" with the full path "%LocalAppData%\terragrunt" so the sentence
matches the explicit examples for Linux and macOS; locate and edit the sentence
in the xdg-cache-paths.mdx content where the Windows resolution is described.
- Line 12: The sentence currently suggests deleting old cache paths based on OS,
but should clarify that cleanup is only necessary when the cache location
actually changed; update the line in the XDG_CACHE_HOME guidance so it states
that users should delete old cache directories only if their cache path moved
(e.g., when switching OSes or after setting a custom XDG_CACHE_HOME) and that
Linux users who still have the same default (~/.cache/terragrunt) don’t need to
clean up; adjust the phrasing in the xd-g cache paths paragraph to emphasize
“when the new platform-specific path differs from the old one” rather than
listing OSs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 49220964-aec0-45f2-84a1-40f621f824b6
📒 Files selected for processing (1)
docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx
| Consider deleting the old paths to reclaim that space if you are on macOS or Windows, or have configured a custom `XDG_CACHE_HOME`: | ||
|
|
||
| ```bash | ||
| # CAS store and engine plugins under the legacy ~/.cache layout |
There was a problem hiding this comment.
Comment should mention the provider cache.
The comment lists "CAS store and engine plugins" but omits the auto provider cache, which is also stored at the legacy ~/.cache/terragrunt location (at ~/.cache/terragrunt/providers). This is inconsistent with line 8, which correctly mentions all three components.
🔧 Proposed fix to include all affected components
-# CAS store and engine plugins under the legacy ~/.cache layout
+# CAS store, provider cache, and engine plugins under the legacy ~/.cache layout
rm -rf ~/.cache/terragruntAs per coding guidelines: Ensure documentation is accurate and complete. Based on context snippet 3, the provider cache uses EnsureCacheDir() to construct its path at cacheDir/providers.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # CAS store and engine plugins under the legacy ~/.cache layout | |
| # CAS store, provider cache, and engine plugins under the legacy ~/.cache layout |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx` at line 15, Update the
heading/comment to include the provider cache alongside the CAS store and engine
plugins (e.g., mention "CAS store, engine plugins, and provider cache") so it
accurately reflects that the provider cache is also stored under the legacy
~/.cache/terragrunt (specifically ~/.cache/terragrunt/providers); reference the
provider cache path construction using EnsureCacheDir() which builds
cacheDir/providers to ensure consistency with the rest of the doc.
Description
Adds call out that the cache location has moved for caches used in experimental features.
TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Added / Removed / Updated [X].
Migration Guide
Summary by CodeRabbit