Skip to content

docs: Calling out update for existing cache locations in v1.0.4 - #6005

Merged
yhakbar merged 1 commit into
mainfrom
docs/updating-changelog-for-xdg-paths
Apr 30, 2026
Merged

docs: Calling out update for existing cache locations in v1.0.4#6005
yhakbar merged 1 commit into
mainfrom
docs/updating-changelog-for-xdg-paths

Conversation

@yhakbar

@yhakbar yhakbar commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds call out that the cache location has moved for caches used in experimental features.

TODOs

Read the Gruntwork contribution guidelines.

  • I authored this code entirely myself
  • I am submitting code based on open source software (e.g. MIT, MPL-2.0, Apache)
  • I am adding or upgrading a dependency or adapted code and confirm it has a compatible open source license
  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide

Summary by CodeRabbit

  • Documentation
    • Updated changelog for v1.0.4 documenting cache directory path changes. Cache paths now follow platform conventions (XDG on Linux, ~/Library/Caches on macOS, %LocalAppData% on Windows). Existing caches won't be automatically migrated; users should manually clean up legacy paths to reclaim disk space.

@vercel

vercel Bot commented Apr 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
terragrunt-docs Ready Ready Preview, Comment Apr 30, 2026 2:58pm

Request Review

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A 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 ~/.cache/terragrunt path, with guidance on handling legacy cache locations.

Changes

Cohort / File(s) Summary
Documentation - Changelog
docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx
Added new changelog entry documenting cache directory layout change to follow platform conventions. Includes OS-specific paths and notes on legacy cache migration behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the main change and follows most of the template structure, but the Release Notes section lacks the required one-line summary and migration guide remains unfilled despite backward-incompatible cache location changes. Complete the Release Notes with a concise summary (e.g., 'Updated cache location to follow platform conventions in v1.0.4') and provide migration guidance for users to clean up legacy cache paths.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding documentation about cache location updates in v1.0.4.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/updating-changelog-for-xdg-paths

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@yhakbar
yhakbar marked this pull request as ready for review April 30, 2026 15:00
@yhakbar
yhakbar requested a review from denis256 as a code owner April 30, 2026 15:00

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx (2)

8-8: ⚡ Quick win

Windows path could be more specific.

The phrase "under %LocalAppData%" is vague. Consider specifying the complete path %LocalAppData%\terragrunt to 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 win

Consider 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_HOME retain ~/.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

📥 Commits

Reviewing files that changed from the base of the PR and between fad0b59 and d952b8d.

📒 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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/terragrunt

As 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.

Suggested change
# 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.

@yhakbar
yhakbar merged commit 45fe7da into main Apr 30, 2026
52 checks passed
@yhakbar
yhakbar deleted the docs/updating-changelog-for-xdg-paths branch April 30, 2026 17:08
Rahul-Kumar-prog pushed a commit to Rahul-Kumar-prog/terragrunt that referenced this pull request May 10, 2026
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