Skip to content

Deprecate auth env#5049

Merged
simonfaltum merged 1 commit intomainfrom
simonfaltum/deprecate-auth-env
Apr 21, 2026
Merged

Deprecate auth env#5049
simonfaltum merged 1 commit intomainfrom
simonfaltum/deprecate-auth-env

Conversation

@simonfaltum
Copy link
Copy Markdown
Member

Why

auth env has never really fit the rest of the CLI. It has its own custom auth resolution (local --host/--profile flags, manual ini scanning) instead of going through the standard auth chain, and it overlaps with what callers can get from the SDK directly. Rather than invest more in maintaining it, we want to signal that it's on its way out so users stop depending on it.

Changes

Deprecate the command:

  • Hidden: true — no longer shows up under databricks auth --help (still invokable, --help still works).
  • Prints Warning: 'databricks auth env' is deprecated and will be removed in a future release. to stderr on every invocation.
  • Long help and Short mention the deprecation.

Behavior is otherwise unchanged. JSON output shape, flags, and resolution logic all stay identical so anything currently scripting against the command keeps working until the removal PR.

Replaces #4904, which mixed this deprecation with a larger refactor.

Test plan

  • make checks clean
  • go test ./cmd/auth/... passes
  • databricks auth env --help still works and shows the "Deprecated" note
  • databricks auth env no longer appears under databricks auth --help
  • Running the command prints the warning to stderr and the JSON env output to stdout unchanged

Hide the command from help listings and print a deprecation warning to
stderr so users have a chance to migrate. Behavior is otherwise
unchanged; the command will be removed in a future release.

Co-authored-by: Isaac
Comment thread cmd/auth/env.go
Comment thread cmd/auth/env.go
@simonfaltum simonfaltum enabled auto-merge April 21, 2026 11:58
@simonfaltum simonfaltum added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit 5502640 Apr 21, 2026
27 of 28 checks passed
@simonfaltum simonfaltum deleted the simonfaltum/deprecate-auth-env branch April 21, 2026 12:23
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.

2 participants