Skip to content

app.config block does not generate app.yaml during bundle deploy #4901

Description

@ncf5031

The bundle resources documentation states:

config — App configuration commands and environment variables. When specified, this configuration is written to an app.yaml file in the source code path during deployment. This allows you to define app configuration directly in the bundle YAML instead of maintaining a separate app.yaml file.

However, when using the config block on an app resource, databricks bundle deploy does not generate an app.yaml file — neither locally in the source_code_path nor in the workspace. The app starts with no environment variables set.

Reproduction
CLI version: v0.292.0

Cloud: Azure Databricks

Bundle target mode: development

databricks.yml
bundle:
name: my-app
databricks_cli_version: ">=0.283.0"
variables:
catalog_name:
description: Unity Catalog name
warehouse_id:
description: SQL Warehouse ID
sync:
include:
- backend/static/**
- backend/app.yaml
resources:
apps:
my_app:
name: my-app
source_code_path: ./backend
config:
command: ["uvicorn", "app:app"]
env:
- name: MY_CATALOG
value: ${var.catalog_name}
- name: MY_WAREHOUSE
value: ${var.warehouse_id}
- name: MY_JOB_ID
value: ${resources.jobs.my_job.id}
resources:
- name: my-job
job:
id: ${resources.jobs.my_job.id}
permission: CAN_MANAGE_RUN
- name: sql-warehouse
sql_warehouse:
id: ${var.warehouse_id}
permission: CAN_USE
jobs:
my_job:
name: My Job
tasks:
- task_key: run
spark_python_task:
python_file: backend/jobs/run.py
source: WORKSPACE
environment_key: default
environments:
- environment_key: default
spec:
environment_version: "2"
dependencies:
- databricks-sdk==0.78.0
targets:
dev:
mode: development
default: true
workspace:
host: https://adb-xxxxx.azuredatabricks.net/
variables:
catalog_name:
default: my_catalog
warehouse_id:
default: abc123

No backend/app.yaml file exists, the expectation is that the config block generates it.

Steps

databricks bundle validate -t dev # passes with no errors
databricks bundle deploy -t dev # completes successfully

Expected behavior
After deploy:

  1. backend/app.yaml is generated locally with resolved values
  2. The file is uploaded to the workspace at the app's source code path
  3. The app starts with the configured environment variables

Actual behavior

  • No app.yaml is generated locally
  • No app.yaml exists in the workspace (workspace export returns "Path doesn't exist")
  • The app starts with no environment variables set
  • databricks apps get my-app shows no config or effective_config field
  • bundle validate and bundle deploy produce no errors or warnings about the config block
  • Additional context
  • The config block is silently ignored, no error, no warning
  • bundle validate accepts the config block without complaint

Additional context

  • The config block is silently ignored, no error, no warning
  • bundle validate accepts the config block without complaint
  • This feature was introduced in CLI 0.283.0 per the resources documentation
  • Workaround: maintain a separate app.yaml file manually with valueFrom references

Metadata

Metadata

Assignees

Labels

DABsDABs related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions