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

Concurrency-safe unpacking of TF providers. #36085

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Nov 23, 2024

  1. Concurrency-safe unpacking of TF providers.

    The original implementation unpacked the downloaded provider .zip files directly in the Terraform plugin cache directory. This made the `terraform init` command prone to race conditions when multiple Terraform modules using the same cache were downloading, checksumming, and validating the provider files at the same time.
    This is a serious problem in CI workflows, as it forces developers to choose between initializing modules serially and using the cache, or initializing modules in parallel, but download the same modules every time, increasing the consumed bandwidth.
    
    This change unpacks the .zip files in a temporary directory with a unique name inside the plugin cache directory, and only then moves the files to the expected location.
    
    This change is inspired by this PR: hashicorp#33479
    pietrodn committed Nov 23, 2024
    Configuration menu
    Copy the full SHA
    6d51f7f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d024465 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2024

  1. Configuration menu
    Copy the full SHA
    ec25335 View commit details
    Browse the repository at this point in the history