Skip to content

databricks apps init fails with "no default profile configured" despite valid CLI authentication #139

Description

@mr-mister007

Bug Description

When following the DevHub workflow after installing Databricks CLI v1.12.1 and configuring a DEFAULT profile, the databricks apps init command consistently fails with the following error:

Error: resolve: /home/aravind/.databrickscfg has no default profile configured. Config: profile=default, config_file=~/.databrickscfg, databricks_cli_path=/home/aravind/.hermes/hermes-agent/venv/bin/databricks. Env: DATABRICKS_CONFIG_FILE, DATABRICKS_CLI_PATH

Context & Diagnostic Checks

This issue occurs despite the following checks passing:

  1. Config file presence: ~/.databrickscfg explicitly contains [DEFAULT] and default_profile = DEFAULT.
  2. Profile validation: databricks auth profiles successfully lists the profile as valid:
    Name               Host                                            Valid
    DEFAULT (Default)  https://dbc-xxxxxxxx-ba27.cloud.databricks.com  YES
    
  3. Authentication verification: databricks current-user me returns the active user details correctly using the DEFAULT profile.
  4. Environment variables: Manually exporting DATABRICKS_CONFIG_FILE, DATABRICKS_HOST, and DATABRICKS_TOKEN before running apps init does not bypass or resolve the error.

Steps to Reproduce

  1. Install Databricks CLI v1.12.1 (e.g., inside a Python virtual environment).
  2. Configure a default profile:
    databricks configure --host <workspace_url> --token <pat_token>
  3. Verify authentication status:
    cat ~/.databrickscfg
    databricks auth profiles
    databricks current-user me
  4. Run the app initialization command:
    databricks apps init \
      --name my-app \
      --features lakebase \
      --set "lakebase.postgres.project=<project_path>" \
      --set "lakebase.postgres.branch=<branch_path>" \
      --set "lakebase.postgres.database=<database_path>" \
      --run none \
      --profile default

Expected Behavior

The databricks apps init command should recognize the DEFAULT profile and successfully scaffold the application.


Actual Behavior

The command aborts immediately with:

Error: resolve: /home/aravind/.databrickscfg has no default profile configured.

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