Skip to content

Pass AuthContext to Python Mutator Functions / Create WorkspaceClient without additional config #4131

@mniehoff

Description

@mniehoff

Describe the issue

It would be really nice if one could use the WorkspaceClient in the Python Mutator functions by just creating it with WorkspaceClient, without passing any auth argument again. It should just reuse the AuthContext that is used for the cli (e.g. when calling databricks bundle deploy)

Configuration

Add a mutator function, call WorkspaceClient() in it, without arguments. It will fail with cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. when running databricks bundle deploy

Expected Behavior

WorkspaceClient should be initiated with the Auth of the CLI call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions