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

Stuck on Running 'HashiCorp Terraform' Formatter #1876

Open
1 task
shinebayar-g opened this issue Nov 12, 2024 · 8 comments
Open
1 task

Stuck on Running 'HashiCorp Terraform' Formatter #1876

shinebayar-g opened this issue Nov 12, 2024 · 8 comments
Labels
bug Something isn't working performance Gotta go fast

Comments

@shinebayar-g
Copy link

shinebayar-g commented Nov 12, 2024

Extension Version

v2.33.0

VS Code Version

Version: 1.95.2 (Universal)
Commit: e8653663e8840adaf45af01eab5c627a5af81807
Date: 2024-11-07T11:07:22.054Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0

Operating System

24.1.0 Darwin Kernel Version 24.1.0

Terraform Version

Terraform v1.9.8 on darwin_arm64

Steps to Reproduce

We have a few thousand resources in our state and the extension just never works reliably. I have "editor.formatOnSave": true, enabled and whenever I save a file it just hang on Running 'HashiCorp Terraform' Formatter

image

image

Expected Behavior

VSCode Extension works reliably

Actual Behavior

It just hangs

Terraform Configuration

No response

Project Structure

No response

Gist

No response

Anything Else?

Zed Terraform extension works fine and doesn't have this problem. I think it's not a language server issue at least.

Workarounds

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@shinebayar-g shinebayar-g added the bug Something isn't working label Nov 12, 2024
@shinebayar-g shinebayar-g changed the title Stuck on saving Stuck on Running 'HashiCorp Terraform' Formatter Nov 12, 2024
@shinebayar-g shinebayar-g changed the title Stuck on Running 'HashiCorp Terraform' Formatter Stuck on Running 'HashiCorp Terraform' Formatter Nov 12, 2024
@mb-lakera
Copy link

Same here. Since recently it just started to hang when saving:

image

@dbanck dbanck added the performance Gotta go fast label Nov 14, 2024
@dbanck
Copy link
Member

dbanck commented Nov 14, 2024

Thank you both for reporting this!

This issue may be related to this one: hashicorp/terraform-ls#1857, so downgrading to the previous extension version may be a workaround for now.

To confirm a theory, are you by any chance using the AWS provider?

@mb-lakera
Copy link

Thank you for your response, I'll give it a try

are you by any chance using the AWS provider?

Yes, I do

@arl-lakera
Copy link

thanks @dbanck ! Same here, I am using the AWS provider.

@shinebayar-g
Copy link
Author

Thank you both for reporting this!

This issue may be related to this one: hashicorp/terraform-ls#1857, so downgrading to the previous extension version may be a workaround for now.

To confirm a theory, are you by any chance using the AWS provider?

Thanks for the suggestion. I have downgraded to version 2.32.3 for now. I'll observe if it helps.

I use GCP provider.

@shinebayar-g
Copy link
Author

shinebayar-g commented Nov 15, 2024

Update: Extension 2.32.3 is noticeably better. It reduced the indefinite loading spinner to around 7~8 seconds (not always?) for me.

@mb-lakera
Copy link

Same here, so far 2.32.3 works fine. It does take sometimes quite a few seconds, but that is not a problem in comparison to the hanging 2.33.0

@shinebayar-g
Copy link
Author

shinebayar-g commented Nov 21, 2024

Update: I tried installing the https://github.com/hashicorp/terraform-ls/ by myself and set the "terraform.languageServer.path": "/opt/homebrew/bin/terraform-ls" in the vscode extension settings. It's performing much better.

Nah it's still hit and miss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance Gotta go fast
Projects
None yet
Development

No branches or pull requests

4 participants