AltimateAI / vscode-dbt-power-user

This extension makes vscode seamlessly work with dbt™: Auto-complete, preview, column lineage, AI docs generation, health checks, cost estimation etc
https://www.altimate.ai
MIT License
441 stars 85 forks source link

Improve the messaging for installing dbt #1281

Open anandgupta42 opened 2 months ago

anandgupta42 commented 2 months ago

Describe the feature

When dbt is unavailable, we offer the user the option to install dbt. Sometimes, the user may have dbt installed but not in the Python environment selected for the extension. It would be helpful to inform the user of the Python path where dbt is located or provide a link to the FAQ page explaining the error in detail.

Screenshot 2024-07-05 at 1 15 33 PM

Describe alternatives you've considered

No response

Who will benefit?

Mostly the users who are setting up the extension for the first time.

Are you willing to submit PR?

OneCyrus commented 2 months ago

please add a setting to disable this message completely. see #854

i see so many people wasting time with this message just because the extension has a timing issue.

anandgupta42 commented 2 months ago

@OneCyrus Can you clarify what do you mean by "the extension has a timing issue." ?

anandgupta42 commented 2 months ago

The issue is that the user does not have dbt installed in the selected Python environment. So, technically the message is right.

OneCyrus commented 2 months ago

but in our case only for a few seconds. so the people try to troubleshoot the environment even though dbt is already installed.

mdesmet commented 2 months ago

Could you elaborate on your environment because it should not give any false alarm on dbt installed. Are you using vscode locally or on codespaces?

Every time the python interpreter is selected, the dbt installation is verified. Are you changing the python interpreter?

OneCyrus commented 1 month ago

@mdesmet we are using devcontainers (codespaces and locally).

the configuration is like below. after the devcontainer is built vscode automatically installs the dbt extension and also installs the dbt python module through the "postCreateCommand" in parallel. basically the dbt extension usually starts before the dbt python module is installed which leads to the missing dbt error. but a few seconds later dbt is then installed but most users already clicked on the dbt install button.

"postCreateCommand": "bash ${containerWorkspaceFolder}/init.sh",
"customizations": {
  "vscode": {
    "extensions": [
      "innoverio.vscode-dbt-power-user",
      ....
    ]
  }
}
OneCyrus commented 3 weeks ago

@mdesmet it should be pretty easy fix to just add an option to hide the "please ensure dbt is installed" dialog as a config setting.

mdesmet commented 2 weeks ago

Why are you not installing dbt in your devcontainer image itself? it will boot up your environment faster that way.