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

[Bug] dbt power user extension in VScode behaves unstable #11371

Closed
2 tasks done
ddvlamin opened this issue Mar 7, 2025 · 0 comments
Closed
2 tasks done

[Bug] dbt power user extension in VScode behaves unstable #11371

ddvlamin opened this issue Mar 7, 2025 · 0 comments
Labels
bug Something isn't working triage

Comments

@ddvlamin
Copy link

ddvlamin commented Mar 7, 2025

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I know this is a vague problem and also hard to reproduce, but I have the following problem. I am in a team that is using the power user tool for dbt extension in a VSCode dev container. However I'm the only one on Windows. It seems like the extensions takes a long time to load. If it loads after using it for a while the lineage says it needs a valid dbt model file (while having a correct one open) and stops working. Then I need to reload the container or reopen vscode. I'm not sure how to debug this problem?

A valid dbt file (model, seed etc.) needs to be open and active in the editor area above to view lineage

Expected Behavior

I would hope the extension is more stable and it does not display the above problem every day.

Steps To Reproduce

It seems that each time I add a new dbt model file I get this error "A valid dbt file needs to be open..." when I open the lineage or documentation editor.

Relevant log output

I'm not sure how to debug this problem.

Environment

- OS: Windows 11 pro
- Python: 3.9.20
- dbt: 1.9.1

Dev container:
{
    "name": "dbt",
    "dockerComposeFile": "../docker-compose.yml",
    "service": "dbt",
    "workspaceFolder": "/dbt",
    "customizations": {
        "vscode": {
            "settings": {
                "terminal.integrated.defaultProfile.linux": "bash",
                "python.pythonPath": "/usr/local/bin/python",
                "python.languageServer": "Pylance",
                "files.associations": {
                    "*.sql": "jinja-sql"
                },
                "sql.linter.executablePath": "sqlfluff",
                "sql.format.enable": false,
                "sqlfluff.linter.run": "onSave",
                "sqlfluff.experimental.format.executeInTerminal": true,
                "editor.formatOnSave": false,
                "sqlfluff.linter.diagnosticSeverity": "error",
                "sqlfluff.config": "${workspaceFolder}/.sqlfluff"
            },
            "extensions": [
                "bastienboutonnet.vscode-dbt",
                "dorzey.vscode-sqlfluff",
                "editorconfig.editorconfig",
                "innoverio.vscode-dbt-power-user",
                "ms-azuretools.vscode-docker",
                "ms-python.vscode-pylance",
                "visualstudioexptteam.vscodeintellicode",
                "eamodio.gitlens",
                "redhat.vscode-yaml",
                "samuelcolvin.jinjahtml",
                "codeium.codeium",
                "nemesv.copy-file-name"
            ]
        }
    },
    "initializeCommand": "git submodule update --init",
    "remoteUser": "vscode",
    "containerEnv": {
        "DBT_DEV_PROJECT": "${localEnv:DBT_DEV_PROJECT}",
        "ADMIN_SESSION_ID": "${localEnv:ADMIN_SESSION_ID}"
    },
    "postCreateCommand": "echo \"git config --global --add safe.directory /dbt \ngit config --global user.email 'xxxxxxxxx' \ngit config --global user.name 'xxxxxxxxx'\" >> ~/.bashrc"
}

Dockerfile

FROM mcr.microsoft.com/vscode/devcontainers/python:3.9

ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Download and install Google Cloud SDK
RUN curl -sSL https://sdk.cloud.google.com > install.sh \
    && bash install.sh --disable-prompts --install-dir=/usr/local \
    && rm install.sh

# Add gcloud to the PATH
ENV PATH="/usr/local/google-cloud-sdk/bin:${PATH}"


# Adjust user permissions
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
      groupmod --gid $USER_GID vscode && usermod --uid $USER_UID --gid $USER_GID vscode; \
    fi

# Install Python dependencies
COPY requirements.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --use-deprecated=legacy-resolver --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
    && rm -rf /tmp/pip-tmp

# Set DBT profiles directory
ENV DBT_PROFILES_DIR=/dbt

Which database adapter are you using with dbt?

bigquery

Additional Context

No response

@ddvlamin ddvlamin added bug Something isn't working triage labels Mar 7, 2025
@ddvlamin ddvlamin closed this as completed Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant