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

Add .terragrunt-cache to skipDirNames #666

Merged
merged 2 commits into from Oct 11, 2021

Conversation

davemac30
Copy link
Contributor

Adresses #665.

In a large terragrunt live repo with many distinct configurations having
many cross dependencies, there can exist a large number of
`.terragrunt-cache` directories, each of which can contain a large
number of modules. There seems to me no good reason for language server
to walk these directories. In some case I was experiencing several
seconds of `formatOnSave` latency. This change removes that issue for
me.
@hashicorp-cla
Copy link

hashicorp-cla commented Oct 5, 2021

CLA assistant check
All committers have signed the CLA.

@radeksimko
Copy link
Member

@davemac30 Thank you for the contribution, would you mind signing the CLA?

@radeksimko
Copy link
Member

In some case I was experiencing several seconds of formatOnSave latency.

Walking through directories is an independent operation running on the background and it is unlikely to be the root cause behind slow formatting. All background operations are also capped in terms of resource usage, so delay as a result of over-utilization of total available CPU also shouldn't be the cause.

There is however known issue with tfenv tfutils/tfenv#196 delaying all executions (including fmt command). Do you use tfenv to manage Terraform versions by any chance?

@radeksimko radeksimko merged commit 73eb747 into hashicorp:main Oct 11, 2021
@davemac30 davemac30 deleted the skip_terragrunt_cache branch October 18, 2021 12:43
@davemac30
Copy link
Contributor Author

No, I use tfswitch.

I guess this PR doesn't fix my formatOnSave latency issue (although it seems it does). It definitely fixes the excessive CPU/fan activity though.

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants