Skip to content

[ISSUE] default auth via databricks cli broken for Chocolatey installation #966

Open
@andyvandy

Description

@andyvandy

Description
This check to detect legacy databricks-cli raises a false positive since chocolatey installs a shim which is smaller than 1 MB

if stat.st_size < (1024 * 1024):
err = FileNotFoundError("Databricks CLI version <0.100.0 detected")
continue

When the cli is installed via other methods or when the script is run from the cli directory this error isn't raised.

Reproduction

from databricks.sdk import WorkspaceClient
w = WorkspaceClient(profile='MYPROFILE')

Expected behavior
I would not expect an error to be raised.

Is it a regression?
I don't believe so.

Additional context
Here is a related test case which would need to be updated

def test_databricks_cli_token_source_installed_legacy(config, monkeypatch, tmp_path):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions