-
-
Notifications
You must be signed in to change notification settings - Fork 582
docs(terraform_validate): Describe that paralelsim is safe to use with tofu 1.10+
#957
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
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughDocumentation update to README.md clarifying that the TF_PLUGIN_CACHE_DIR race-condition was resolved in OpenToFu v1.10+, making parallelism safe again; also a minor explicit line-break formatting adjustment. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the documentation for the terraform_validate hook to clarify that parallelism is safe to use with OpenTofu v1.10+, which has resolved the race condition issues present in earlier versions when using TF_PLUGIN_CACHE_DIR.
Changes:
- Added documentation noting that OpenTofu v1.10+ has fixed the parallelism race condition issue with the global provider cache
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
README.md
Outdated
| > [!IMPORTANT] | ||
| > If you use [`TF_PLUGIN_CACHE_DIR`](https://developer.hashicorp.com/terraform/cli/config/config-file#provider-plugin-cache), we recommend enabling `--hook-config=--retry-once-with-cleanup=true` or disabling parallelism (`--hook-config=--parallelism-limit=1`) to avoid [race conditions when `terraform init` writes to it](https://github.com/hashicorp/terraform/issues/31964). | ||
| > If you use [`TF_PLUGIN_CACHE_DIR`](https://developer.hashicorp.com/terraform/cli/config/config-file#provider-plugin-cache), we recommend enabling `--hook-config=--retry-once-with-cleanup=true` or disabling parallelism (`--hook-config=--parallelism-limit=1`) to avoid [race conditions when `terraform init` writes to it](https://github.com/hashicorp/terraform/issues/31964). | ||
| > This [issue was fixed in OpenToFu v1.10+](https://opentofu.org/blog/help-us-test-opentofu-1-10-0-alpha2/#global-provider-cache-locking), so it's safe to use parallelism with it. |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "OpenToFu" should be "OpenTofu" (missing the second 'o').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 972-974: Update the [!IMPORTANT] block that currently links to the
OpenTofu alpha2 blog: replace the alpha blog URL with the official OpenTofu
v1.10.0 release notes (and/or the stable beta release notes) URL, change the
wording to reference the official v1.10.0 release notes instead of the alpha
blog, and append a note recommending v1.10.5+ if users still see lock contention
errors when using concurrent cache access; target the markdown block starting
with the [!IMPORTANT] marker and the sentence mentioning "This [issue was fixed
in OpenTofu v1.10+]" to make these edits.
README.md
Outdated
| > [!IMPORTANT] | ||
| > If you use [`TF_PLUGIN_CACHE_DIR`](https://developer.hashicorp.com/terraform/cli/config/config-file#provider-plugin-cache), we recommend enabling `--hook-config=--retry-once-with-cleanup=true` or disabling parallelism (`--hook-config=--parallelism-limit=1`) to avoid [race conditions when `terraform init` writes to it](https://github.com/hashicorp/terraform/issues/31964). | ||
| > If you use [`TF_PLUGIN_CACHE_DIR`](https://developer.hashicorp.com/terraform/cli/config/config-file#provider-plugin-cache), we recommend enabling `--hook-config=--retry-once-with-cleanup=true` or disabling parallelism (`--hook-config=--parallelism-limit=1`) to avoid [race conditions when `terraform init` writes to it](https://github.com/hashicorp/terraform/issues/31964). | ||
| > This [issue was fixed in OpenToFu v1.10+](https://opentofu.org/blog/help-us-test-opentofu-1-10-0-alpha2/#global-provider-cache-locking), so it's safe to use parallelism with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
OpenTofu v1.10 release notes global provider cache locking fix
💡 Result:
In the OpenTofu v1.10.x release line, the “global provider cache locking” change and the later “locking fix” show up as:
- v1.10.0 (prereleases / beta notes): the shared provider cache controlled by
TF_PLUGIN_CACHE_DIRgained filesystem-level locking so concurrent OpenTofu runs (e.g., many paralleltofu initin CI) don’t clobber the cache. [2] - v1.10.5 (bugfix): fixed an issue where using
TF_PLUGIN_CACHE_DIRcould cause unexpected lock contention errors (GitHub issue/PR #3090). Release notes also remind users it’s still recommended to have valid.terraform.lock.hclfiles when usingTF_PLUGIN_CACHE_DIR. [1]
Sources: [1] (newreleases.io) [2] (opentofu.org)
Citations:
- 1: https://newreleases.io/project/github/opentofu/opentofu/release/v1.10.5?utm_source=openai
- 2: https://opentofu.org/blog/help-us-test-opentofu-1-10-0-beta1/?utm_source=openai
🌐 Web query:
OpenTofu v1.10 final release TF_PLUGIN_CACHE_DIR race condition
💡 Result:
OpenTofu v1.10.0 (final) is the release line that addresses the long-standing race condition / unsafeness of sharing TF_PLUGIN_CACHE_DIR across concurrent tofu init runs by adding filesystem-level locking around the shared provider plugin cache (“Global Provider Cache Lock”), making concurrent operations (CI, Terragrunt, parallel pipelines) safe in the intended design. [1], [2], [3]
Notes/caveats from the v1.10 series:
- The underlying problem was tracked as “provider plugin cache is not safe to access concurrently” (race during concurrent installs into the cache). [1]
- The locking work landed during the 1.10.0 prereleases and is described as making the cache safe for concurrent OpenTofu operations. [2], [3]
- There were still follow-on issues in the 1.10 patch line (e.g., “unexpected lock contention errors”) that were later fixed (example: v1.10.5 notes). [4]
Practical takeaway: If you’re asking whether v1.10.0 is the version where TF_PLUGIN_CACHE_DIR becomes concurrency-safe (i.e., the race condition is addressed), yes—that change is part of OpenTofu 1.10; and if you hit locking-related errors, upgrade within the 1.10.x line (at least past fixes like 1.10.5). [2], [4]
Sources: [1] GitHub issue, [2] OpenTofu 1.10.0-beta1 blog, [3] OpenTofu 1.10.0-alpha2 blog, [4] v1.10.5 changelog excerpt.
Link to the official OpenTofu v1.10.0 release notes instead of the alpha blog.
The alpha2 blog post documents the fix, but OpenTofu's official v1.10.0 release notes or the beta blog would be a more stable reference. Additionally, note that v1.10.5+ is recommended if users encounter lock contention errors during concurrent cache access.
🤖 Prompt for AI Agents
In `@README.md` around lines 972 - 974, Update the [!IMPORTANT] block that
currently links to the OpenTofu alpha2 blog: replace the alpha blog URL with the
official OpenTofu v1.10.0 release notes (and/or the stable beta release notes)
URL, change the wording to reference the official v1.10.0 release notes instead
of the alpha blog, and append a note recommending v1.10.5+ if users still see
lock contention errors when using concurrent cache access; target the markdown
block starting with the [!IMPORTANT] marker and the sentence mentioning "This
[issue was fixed in OpenTofu v1.10+]" to make these edits.
yermulnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT apart from OpenTofu naming typo.
Co-authored-by: George Yermulnik (Georgii Iermulnik) <yz@yz.kiev.ua>
Follow-up to #956
Relates to #640