Skip to content

fix: avoid implicit bundle target for non-bundle auth resolution#4504

Open
jmahotiedu wants to merge 1 commit intodatabricks:mainfrom
jmahotiedu:fix/non-bundle-ignore-bundle-auth-4502
Open

fix: avoid implicit bundle target for non-bundle auth resolution#4504
jmahotiedu wants to merge 1 commit intodatabricks:mainfrom
jmahotiedu:fix/non-bundle-ignore-bundle-auth-4502

Conversation

@jmahotiedu
Copy link

@jmahotiedu jmahotiedu commented Feb 12, 2026

## Summary

  • Stop loading bundle auth configuration implicitly in MustWorkspaceClient unless --target / --environment is explicitly set.

  • Keep explicit target behavior unchanged so bundle context remains opt-in.

  • Add regression tests covering:

    • Non-bundle command inside bundle directory respects DATABRICKS_HOST.
    • Explicit --target still uses bundle target host.

## Problem
Fixes #4502. Non-bundle commands such as databricks current-user me were resolving authentication from the bundle’s default target when run inside a bundle directory, potentially overriding DATABRICKS_HOST.

## Testing

  • go test ./cmd/root

@github-actions
Copy link

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 4504
  • Commit SHA: db5cb1821e7e05c06d87783b389b90a59f630f67

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DATABRICKS_HOST env variable is ignored when using CLI inside DAB directory

1 participant