Skip to content

[BUG] Extension fails to detect targets when include section has ymls from parent folders #1818

@FlavioDiasPs

Description

@FlavioDiasPs

Describe the bug

The Databricks VS Code extension fails to detect bundle targets when the databricks.yml file uses an include path that traverses to multiple parent directories (e.g., ../../dab/databricks-shared.yml). The Databricks CLI correctly validates and deploys the bundle, but the VSCode extension shows no available targets (using cursor).

To Reproduce

Steps to reproduce the behavior:

  1. Create a repository structure with a shared configuration file in a parent directory:
repo-root/
├── dab/
│   └── databricks-shared.yml    # Contains variables and targets
└── folder/
    └── sub-folder/
        └── databricks.yml       # Bundle name and include
  1. In folder/sub-folder/databricks.yml, include the shared config using a relative parent path:
bundle:
  name: my-bundle

include:
  - ../../dab/databricks-shared.yml
  - other includes ...
  1. The databricks-shared.yml contains the targets section with dev and prod targets.

  2. Open the folder/sub-folder/ folder in VS Code with the Databricks extension.

  3. Attempt to select a target in the Databricks extension panel — no targets are available.

  4. Run CLI validation from the same folder — it works:

cd folder/sub-folder
databricks bundle validate -t dev --profile dev
# Output: Validation OK!

Expected behavior

The extension should detect targets defined in included configuration files, regardless of the parenting level added to the include path (../../).

Screenshots

Image

System information:

  1. Paste the output of the Help: About command (CMD-Shift-P):

Version: 2.1.50 (Universal)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z (1 day ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0

  1. Databricks Extension Version: 2.10.3

  2. Databricks CLI Version: 0.279.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions