From 33b925f652302cc6236a0518628e0029e9208cb3 Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Mon, 16 Nov 2026 15:55:47 +0000 Subject: [PATCH 1/5] acc: record that apps import does not inline app.yml The app's app.yml has a plain env value, a valueFrom reference and an unquoted value that YAML reads as a number. Today databricks.yml gets no config and app.yml is kept as is, although the command means to inline it. Co-authored-by: Isaac --- acceptance/apps/import/app-yml/out.test.toml | 1 + acceptance/apps/import/app-yml/output.txt | 59 ++++++++++++++++++++ acceptance/apps/import/app-yml/script | 23 ++++++++ acceptance/apps/import/app-yml/src/app.yml | 10 ++++ acceptance/apps/import/app-yml/test.toml | 1 + 5 files changed, 94 insertions(+) create mode 100644 acceptance/apps/import/app-yml/out.test.toml create mode 100644 acceptance/apps/import/app-yml/output.txt create mode 100644 acceptance/apps/import/app-yml/script create mode 100644 acceptance/apps/import/app-yml/src/app.yml create mode 100644 acceptance/apps/import/app-yml/test.toml diff --git a/acceptance/apps/import/app-yml/out.test.toml b/acceptance/apps/import/app-yml/out.test.toml new file mode 100644 index 00000000000..18b1a88417e --- /dev/null +++ b/acceptance/apps/import/app-yml/out.test.toml @@ -0,0 +1 @@ +Cloud = false diff --git a/acceptance/apps/import/app-yml/output.txt b/acceptance/apps/import/app-yml/output.txt new file mode 100644 index 00000000000..40b7767a20e --- /dev/null +++ b/acceptance/apps/import/app-yml/output.txt @@ -0,0 +1,59 @@ + +>>> [CLI] apps import --name myapp --output-dir out +Loading app 'myapp' configuration +Creating bundle configuration +File successfully saved to app.yml +Bundle configuration created at databricks.yml +Binding bundle to existing app +Successfully bound to app 'myapp' +Deploying bundle +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/myapp/default/files... +Files: 2 uploaded, 0 deleted +Resources: 0 created, 0 changed, 0 deleted, 1 unchanged +Bundle deployed successfully +Starting app +✓ Getting the status of the app myapp +✓ App is in RUNNING state +✓ App compute is in ACTIVE state +✓ Deployment succeeded +You can access the app at myapp-123.cloud.databricksapps.com +App started successfully + +✔ App 'myapp' imported to [TEST_TMP_DIR]/out + +You can now deploy changes with: databricks bundle deploy + +>>> ls out +app.yml +databricks.yml + +>>> cat out/databricks.yml +bundle: + name: myapp + +workspace: + host: [DATABRICKS_URL] + +resources: + apps: + app: + name: myapp + description: "" + source_code_path: . + +>>> cat out/app.yml +command: + - python + - app.py +env: + - name: GREETING + value: hello + - name: WAREHOUSE_ID + valueFrom: sql-warehouse + - name: PYTHON_VERSION + value: 3.10 + +=== App config the bundle deploys + +>>> [CLI] bundle validate -o json +null diff --git a/acceptance/apps/import/app-yml/script b/acceptance/apps/import/app-yml/script new file mode 100644 index 00000000000..2d086679554 --- /dev/null +++ b/acceptance/apps/import/app-yml/script @@ -0,0 +1,23 @@ +# apps import of an app whose source has an app.yml with a plain env value, a +# valueFrom reference and an unquoted value that YAML reads as a number. +APP_PATH="/Workspace/Users/$CURRENT_USER_NAME/myapp" +$CLI workspace import-dir src "$APP_PATH" > /dev/null +$CLI apps create myapp > /dev/null +$CLI apps deploy myapp --source-code-path "$APP_PATH" > /dev/null + +trace $CLI apps import --name myapp --output-dir out + +trace ls out + +trace cat out/databricks.yml + +if [ -f out/app.yml ]; then + trace cat out/app.yml +fi + +title "App config the bundle deploys" +cd out +trace $CLI bundle validate -o json | jq '.resources.apps.app.config' +cd .. + +rm -rf out diff --git a/acceptance/apps/import/app-yml/src/app.yml b/acceptance/apps/import/app-yml/src/app.yml new file mode 100644 index 00000000000..91084cc1155 --- /dev/null +++ b/acceptance/apps/import/app-yml/src/app.yml @@ -0,0 +1,10 @@ +command: + - python + - app.py +env: + - name: GREETING + value: hello + - name: WAREHOUSE_ID + valueFrom: sql-warehouse + - name: PYTHON_VERSION + value: 3.10 diff --git a/acceptance/apps/import/app-yml/test.toml b/acceptance/apps/import/app-yml/test.toml new file mode 100644 index 00000000000..c405a40c29b --- /dev/null +++ b/acceptance/apps/import/app-yml/test.toml @@ -0,0 +1 @@ +Badness = "app.yml is meant to be inlined into databricks.yml as the app's config and removed (inlineAppConfigFile in cmd/apps/import.go), but the check runs before the source files are downloaded, so it never finds app.yml: databricks.yml gets no config and app.yml stays." From 094c3ec35191f046c376f290c31a0b8535dea408 Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Mon, 16 Nov 2026 16:13:27 +0000 Subject: [PATCH 2/5] acc: keep Git Bash from rewriting the /Workspace path in apps import test On Windows, Git Bash turns a leading-/ argument into a Windows path, so import-dir and apps deploy got C:/Program Files/Git/Workspace/... and failed. Disable the conversion for those two commands. Co-authored-by: Isaac --- acceptance/apps/import/app-yml/output.txt | 2 +- acceptance/apps/import/app-yml/script | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/acceptance/apps/import/app-yml/output.txt b/acceptance/apps/import/app-yml/output.txt index 40b7767a20e..b600b58c013 100644 --- a/acceptance/apps/import/app-yml/output.txt +++ b/acceptance/apps/import/app-yml/output.txt @@ -53,7 +53,7 @@ env: - name: PYTHON_VERSION value: 3.10 -=== App config the bundle deploys +=== App config the bundle deploys (app.yml, if kept, is uploaded with the source) >>> [CLI] bundle validate -o json null diff --git a/acceptance/apps/import/app-yml/script b/acceptance/apps/import/app-yml/script index 2d086679554..27a930b40b8 100644 --- a/acceptance/apps/import/app-yml/script +++ b/acceptance/apps/import/app-yml/script @@ -1,9 +1,10 @@ # apps import of an app whose source has an app.yml with a plain env value, a # valueFrom reference and an unquoted value that YAML reads as a number. +# MSYS_NO_PATHCONV keeps Git Bash on Windows from rewriting the /Workspace path. APP_PATH="/Workspace/Users/$CURRENT_USER_NAME/myapp" -$CLI workspace import-dir src "$APP_PATH" > /dev/null +MSYS_NO_PATHCONV=1 $CLI workspace import-dir src "$APP_PATH" > /dev/null $CLI apps create myapp > /dev/null -$CLI apps deploy myapp --source-code-path "$APP_PATH" > /dev/null +MSYS_NO_PATHCONV=1 $CLI apps deploy myapp --source-code-path "$APP_PATH" > /dev/null trace $CLI apps import --name myapp --output-dir out @@ -15,9 +16,10 @@ if [ -f out/app.yml ]; then trace cat out/app.yml fi -title "App config the bundle deploys" +title "App config the bundle deploys (app.yml, if kept, is uploaded with the source)" cd out trace $CLI bundle validate -o json | jq '.resources.apps.app.config' cd .. + rm -rf out From f30b10b1cfe1a78661bc02a3881d450e26db7b7f Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Mon, 16 Nov 2026 16:37:19 +0000 Subject: [PATCH 3/5] acc: normalize the Windows output path in the apps import test Co-authored-by: Isaac --- acceptance/apps/import/app-yml/test.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/acceptance/apps/import/app-yml/test.toml b/acceptance/apps/import/app-yml/test.toml index c405a40c29b..0491f2c2d40 100644 --- a/acceptance/apps/import/app-yml/test.toml +++ b/acceptance/apps/import/app-yml/test.toml @@ -1 +1,6 @@ Badness = "app.yml is meant to be inlined into databricks.yml as the app's config and removed (inlineAppConfigFile in cmd/apps/import.go), but the check runs before the source files are downloaded, so it never finds app.yml: databricks.yml gets no config and app.yml stays." + +# Fix path with reverse slashes in the output for Windows. +[[Repls]] +Old = 'TEST_TMP_DIR]\\out' +New = 'TEST_TMP_DIR]/out' From bf226f94d14e2e51dfec1ac1c63d784d2bc21c41 Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Tue, 17 Nov 2026 12:22:49 +0000 Subject: [PATCH 4/5] acc: log apps import test setup to LOG.setup and use withdir Co-authored-by: Isaac --- acceptance/apps/import/app-yml/script | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/acceptance/apps/import/app-yml/script b/acceptance/apps/import/app-yml/script index 27a930b40b8..7ff08a0ef38 100644 --- a/acceptance/apps/import/app-yml/script +++ b/acceptance/apps/import/app-yml/script @@ -2,9 +2,9 @@ # valueFrom reference and an unquoted value that YAML reads as a number. # MSYS_NO_PATHCONV keeps Git Bash on Windows from rewriting the /Workspace path. APP_PATH="/Workspace/Users/$CURRENT_USER_NAME/myapp" -MSYS_NO_PATHCONV=1 $CLI workspace import-dir src "$APP_PATH" > /dev/null -$CLI apps create myapp > /dev/null -MSYS_NO_PATHCONV=1 $CLI apps deploy myapp --source-code-path "$APP_PATH" > /dev/null +MSYS_NO_PATHCONV=1 $CLI workspace import-dir src "$APP_PATH" &>> LOG.setup +$CLI apps create myapp &>> LOG.setup +MSYS_NO_PATHCONV=1 $CLI apps deploy myapp --source-code-path "$APP_PATH" &>> LOG.setup trace $CLI apps import --name myapp --output-dir out @@ -17,9 +17,6 @@ if [ -f out/app.yml ]; then fi title "App config the bundle deploys (app.yml, if kept, is uploaded with the source)" -cd out -trace $CLI bundle validate -o json | jq '.resources.apps.app.config' -cd .. - +withdir out trace $CLI bundle validate -o json | jq '.resources.apps.app.config' rm -rf out From 1dda6cd5fc19a73eeedb3bf784542e081db10e9c Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Tue, 17 Nov 2026 12:31:32 +0000 Subject: [PATCH 5/5] acc: use >> ... 2>&1 instead of &>> in the apps import test macOS runners have bash 3.2, which has no &>>. Co-authored-by: Isaac --- acceptance/apps/import/app-yml/script | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acceptance/apps/import/app-yml/script b/acceptance/apps/import/app-yml/script index 7ff08a0ef38..c7446d0ff09 100644 --- a/acceptance/apps/import/app-yml/script +++ b/acceptance/apps/import/app-yml/script @@ -2,9 +2,9 @@ # valueFrom reference and an unquoted value that YAML reads as a number. # MSYS_NO_PATHCONV keeps Git Bash on Windows from rewriting the /Workspace path. APP_PATH="/Workspace/Users/$CURRENT_USER_NAME/myapp" -MSYS_NO_PATHCONV=1 $CLI workspace import-dir src "$APP_PATH" &>> LOG.setup -$CLI apps create myapp &>> LOG.setup -MSYS_NO_PATHCONV=1 $CLI apps deploy myapp --source-code-path "$APP_PATH" &>> LOG.setup +MSYS_NO_PATHCONV=1 $CLI workspace import-dir src "$APP_PATH" >> LOG.setup 2>&1 +$CLI apps create myapp >> LOG.setup 2>&1 +MSYS_NO_PATHCONV=1 $CLI apps deploy myapp --source-code-path "$APP_PATH" >> LOG.setup 2>&1 trace $CLI apps import --name myapp --output-dir out