Skip to content

Conversation

@MaxymVlasov
Copy link
Collaborator

@MaxymVlasov MaxymVlasov commented Jan 23, 2026

Follow-up to #956
Relates to #640

Copilot AI review requested due to automatic review settings January 23, 2026 15:00
@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

Note

Other AI code review bot(s) detected

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

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Clarified that a race-condition affecting the plugin cache was fixed in OpenToFu v1.10+, so parallelism can be used safely again.
    • Minor formatting adjustment to the README for improved readability.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Documentation 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

Cohort / File(s) Summary
Documentation update
README.md
Added clarification in terraform_validate section that the TF_PLUGIN_CACHE_DIR race-condition was fixed in OpenToFu v1.10+, restoring parallelism safety; added an explicit line-break formatting tweak.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • antonbabenko
  • yermulnik
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly indicates a documentation update for terraform_validate regarding parallelism safety with tofu 1.10+, which matches the actual changeset.
Description check ✅ Passed The description provides context by referencing related PR #956 and issue #640, connecting the change to the broader codebase discussions about this feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

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

Copy link

Copilot AI left a 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.
Copy link

Copilot AI Jan 23, 2026

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').

Copilot uses AI. Check for mistakes.
Copy link

@coderabbitai coderabbitai bot left a 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
Comment on lines 972 to 974
> [!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.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 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_DIR gained filesystem-level locking so concurrent OpenTofu runs (e.g., many parallel tofu init in CI) don’t clobber the cache. [2]
  • v1.10.5 (bugfix): fixed an issue where using TF_PLUGIN_CACHE_DIR could cause unexpected lock contention errors (GitHub issue/PR #3090). Release notes also remind users it’s still recommended to have valid .terraform.lock.hcl files when using TF_PLUGIN_CACHE_DIR. [1]

Sources: [1] (newreleases.io) [2] (opentofu.org)

Citations:


🌐 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
yermulnik previously approved these changes Jan 23, 2026
Copy link
Collaborator

@yermulnik yermulnik left a 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>
@MaxymVlasov MaxymVlasov merged commit 4692c17 into master Jan 25, 2026
50 checks passed
@MaxymVlasov MaxymVlasov deleted the docs/tofu branch January 25, 2026 12:59
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.

3 participants