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

Reuse installed target dir providers in init #27582

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

pselle
Copy link
Contributor

@pselle pselle commented Jan 23, 2021

In init, we can check to see if the target dir already has the provider we are seeking and skip further querying/installing of that provider.

This will help address concerns users are having where they've previously installed a provider (ex. that is in their .terraform directory after install) and subsequent installs keep re-fetching the package. While we've been telling users this installation is expected behavior, I think we can make a nicer flow by making things faster by re-using that same provider if it's already installed.

Closes #27534

@pselle pselle force-pushed the pselle/reuse_targetdir_providers branch from 08068e0 to 8ceb071 Compare January 25, 2021 15:15
@codecov
Copy link

codecov bot commented Jan 25, 2021

Codecov Report

Merging #27582 (aedca59) into master (bd6b973) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
internal/providercache/installer.go 68.24% <100.00%> (+0.61%) ⬆️
dag/marshal.go 61.90% <0.00%> (-1.59%) ⬇️
internal/providercache/cached_provider.go 73.68% <0.00%> (+5.26%) ⬆️

@pselle pselle force-pushed the pselle/reuse_targetdir_providers branch 2 times, most recently from ae5db28 to cf0fcd7 Compare January 25, 2021 15:49
In init, we can check to see if the target dir already has the
provider we are seeking and skip further querying/installing of
that provider.
@pselle pselle force-pushed the pselle/reuse_targetdir_providers branch from cf0fcd7 to aedca59 Compare January 25, 2021 16:14
@pselle pselle requested a review from a team January 25, 2021 16:30
@pselle pselle added the 0.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jan 25, 2021
Copy link
Contributor

@mildwonkey mildwonkey left a comment

Choose a reason for hiding this comment

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

🎉 this is a great fix!

@pselle pselle merged commit dd7b412 into master Jan 25, 2021
@pselle pselle deleted the pselle/reuse_targetdir_providers branch January 25, 2021 23:28
@ghost
Copy link

ghost commented Feb 25, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform init installing providers on each run
3 participants