Skip to content

[BUG]: CLI mishandles --log-level= and --debug #2211

@asnare

Description

@asnare

Category of Bug / Issue

Other

Current Behavior

The Databricks CLI has a protocol for handing off its log-level to the Lakebridge CLI. Since #2117 this is largely ignored, with databricks.labs.lakebridge logging only being emitted at INFO-level.

For example, with:

databricks labs lakebridge install-transpile --log-level=warn
databricks labs lakebridge install-transpile --log-level=debug
databricks labs lakebridge install-transpile --debug

...we see:

  • The given log-level1 is used for databricks.*;
  • BUT databricks.labs.lakebridge.* is limited to only INFO (or higher) logging.

(Note that --debug is an alias for --log-level=debug.)

Expected Behavior

All of databricks.* should be set to the same log-level as specified by the --log-level= option.

Steps To Reproduce

Install:

  • Databricks CLI v0.281.0
  • Lakebridge 0.11.3

Install the transpilers:

databricks labs lakebridge install-transpile --log-level=debug

Under databricks.labs.lakebridge there won't any DEBUG logging produced, even though there should be for things like the Java check and metadata lookups.

Relevant log output or Exception details

11:50:36     INFO [d.l.l.transpiler.installers] Databricks databricks-morph-plugin transpiler v0.6.14 already installed             
11:50:36     INFO [d.l.l.transpiler.installers] databricks-bb-plugin v0.1.24 already installed                                      
11:50:36     INFO [d.l.lakebridge.install] Configuring lakebridge `transpile`.

Operating System

macOS

Version

latest via Databricks CLI

Footnotes

  1. A separate bug, [BUG]: CLI ignores --log-level=warn #2167, affects --log-level=warn separately in a different manner.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfeat/cliactions that are visible to the user

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions