Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b86a994
bundle deploy/destroy: report per-resource actions and a summary
denik Jun 25, 2026
5001cd5
Fix NotSelected placement after rebase onto FilterToSelected refactor
denik Jul 23, 2026
e30baf9
Regenerate acceptance goldens for deploy/destroy summary after rebase
denik Jul 23, 2026
9434457
Update mlops-stacks cloud golden for deploy/destroy summary format
denik Jul 23, 2026
ee9914a
Fix mlops-stacks golden: 8 created (resources + permission sub-nodes)
denik Jul 23, 2026
bbe190e
Add changelog entry for deploy/destroy summary
denik Jul 23, 2026
9c4ca5a
Mention --select "N not selected" in changelog entry
denik Jul 23, 2026
ad07c30
Address review: fix deploy summary timing and --plan not-selected suffix
denik Jul 24, 2026
a3044f6
Add regression tests for the two review fixes
denik Jul 24, 2026
da49c17
Regenerate goldens for tests added on main during rebase
denik Jul 29, 2026
f749348
Fix WAL tests' Windows kill normalization after dropping "Deploying r…
denik Jul 29, 2026
be49a18
acc: regenerate goldens for deploy-output tests added on main
denik Aug 6, 2026
2f22f9a
Address review: print deploy summary last, after the postdeploy script
denik Aug 6, 2026
97799c9
acc: regenerate goldens after rebase; keep grants/remove_all engine-s…
denik Aug 9, 2026
c1a5885
acc: regenerate model_serving_endpoints drift golden added on main
denik Aug 9, 2026
eaffa88
acc: regenerate goldens for tests added on main during rebase
denik Aug 11, 2026
265a145
Address review: drop blank line, add Files: line, rename to Resources…
denik Aug 12, 2026
f031391
acc: stop two tests from syncing a variant-dependent file set
denik Aug 12, 2026
c04f330
acc: regenerate goldens for tests added on main during rebase
denik Aug 12, 2026
11b851a
acc: update the Windows-only shell/cmd golden by hand
denik Aug 12, 2026
0c3c179
Add -qq to reduce bundle output to warnings and errors
denik Aug 13, 2026
e63e3e1
acc: replace 'deploy -q | grep -v' with 'deploy -qq'
denik Aug 13, 2026
6b22165
Always print the deploy summary lines
denik Aug 13, 2026
21790e5
acc: regenerate goldens for tests added on main during rebase
denik Aug 13, 2026
6843453
destroy: make -qq silent, and cover every quiet level in tests
denik Aug 13, 2026
5d91b35
acc: move quiet-levels up and make the levels comparable
denik Aug 13, 2026
f9f0dbe
acc: regenerate goldens for migrate tests added on main during rebase
denik Aug 13, 2026
3fce466
Report the file counts even when the deploy fails afterwards
denik Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .nextchanges/notable-changes/deploy-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `bundle deploy` now reports the per-resource actions it took, how many files it synced, and a summary of created/changed/deleted/unchanged resources; `bundle destroy` reports how many resources it deleted. `-q` prints only the summaries, `-qq` only warnings and errors. ([#5720](https://github.com/databricks/cli/pull/5720))
9 changes: 4 additions & 5 deletions acceptance/apps/deploy/bundle-no-args-with-flags/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
>>> [CLI] apps deploy --skip-validation --auto-approve --force-lock --fail-on-active-runs
Deploying project...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created apps.myapp
Files: 6 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
✓ Getting the status of the app myapp
✓ App is in UNAVAILABLE state
✓ App compute is in STOPPED state
Expand All @@ -21,5 +21,4 @@ The following resources will be deleted:

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default

Deleting files...
Destroy complete!
Destroy: 1 deleted
9 changes: 4 additions & 5 deletions acceptance/apps/deploy/bundle-no-args/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
>>> [CLI] apps deploy --skip-validation
Deploying project...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created apps.myapp
Files: 6 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
✓ Getting the status of the app myapp
✓ App is in UNAVAILABLE state
✓ App compute is in STOPPED state
Expand All @@ -21,5 +21,4 @@ The following resources will be deleted:

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default

Deleting files...
Destroy complete!
Destroy: 1 deleted
15 changes: 7 additions & 8 deletions acceptance/bundle/ai_runtime_task/local_code_source/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/ai-runtime-test/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created jobs.train
Files: 14 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged

=== each task's tarball holds only synced files (both under the repo root .air_snapshots)

Expand Down Expand Up @@ -110,9 +110,9 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/ai-runtime-test/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Updated jobs.train
Files: 4 uploaded, 1 deleted
Resources: 0 created, 1 changed, 0 deleted, 0 unchanged

>>> print_requests.py --sort --del-field raw_body //.air_snapshots/
{
Expand All @@ -131,5 +131,4 @@ The following resources will be deleted:

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/ai-runtime-test/default

Deleting files...
Destroy complete!
Destroy: 1 deleted
9 changes: 4 additions & 5 deletions acceptance/bundle/apps/app_yaml/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created apps.myapp
Files: 7 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged

>>> jq select(.path | test("app.yml")) out.requests.txt

Expand All @@ -27,8 +27,7 @@ The following resources will be deleted:

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default

Deleting files...
Destroy complete!
Destroy: 1 deleted

>>> print_requests.py //apps
{
Expand Down
6 changes: 3 additions & 3 deletions acceptance/bundle/apps/compute_size/out.update.direct.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

>>> errcode [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/app-compute-size-[UNIQUE_NAME]/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Updated apps.my_app
Files: 4 uploaded, 0 deleted
Resources: 0 created, 1 changed, 0 deleted, 0 unchanged

>>> [CLI] apps get app-[UNIQUE_NAME]
{
Expand Down
3 changes: 1 addition & 2 deletions acceptance/bundle/apps/compute_size/out.update.terraform.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

>>> errcode [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/app-compute-size-[UNIQUE_NAME]/files...
Deploying resources...
Error: terraform apply: exit status 1

Error: failed to update app
Expand All @@ -14,7 +13,7 @@ Compute size updates are not supported in this update API. Please use the new
update API instead.


Updating deployment state...
Files: 4 uploaded, 0 deleted

Exit code: 1

Expand Down
9 changes: 4 additions & 5 deletions acceptance/bundle/apps/compute_size/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
=== Deploy bundle
>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/app-compute-size-[UNIQUE_NAME]/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created apps.my_app
Files: 8 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged

=== Update compute size and redeploy
>>> [CLI] bundle destroy --auto-approve
Expand All @@ -13,5 +13,4 @@ The following resources will be deleted:

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/app-compute-size-[UNIQUE_NAME]

Deleting files...
Destroy complete!
Destroy: 1 deleted
14 changes: 6 additions & 8 deletions acceptance/bundle/apps/git_source/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged
=== Deploy bundle
>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/app-git-source-[UNIQUE_NAME]/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created apps.my_app
Files: 8 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged

>>> [CLI] bundle run my_app
✓ Getting the status of the app [APP_NAME]
Expand Down Expand Up @@ -61,9 +61,8 @@ You can access the app at [APP_NAME]-123.cloud.databricksapps.com
=== Update git_source branch and redeploy
>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/app-git-source-[UNIQUE_NAME]/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Files: 5 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 1 unchanged

=== Verify config update was applied
>>> [CLI] apps get [APP_NAME] --output json
Expand All @@ -78,5 +77,4 @@ The following resources will be deleted:

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/app-git-source-[UNIQUE_NAME]

Deleting files...
Destroy complete!
Destroy: 1 deleted
9 changes: 9 additions & 0 deletions acceptance/bundle/apps/job_permissions/databricks.yml.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
bundle:
name: test-bundle-$UNIQUE_NAME

# This test deploys several times and reports how many files each deploy uploaded, so
# nothing written between the deploys may end up in the synced tree: the script's own
# out.after_first_deploy.*, and the test runner's output.txt / ACC_REPLS, which it keeps
# appending to while the deploy runs.
sync:
exclude:
- out*
- ACC_REPLS

permissions:
- level: CAN_MANAGE
user_name: ${workspace.current_user.userName}
Expand Down
25 changes: 6 additions & 19 deletions acceptance/bundle/apps/job_permissions/output.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

>>> [CLI] bundle deploy
>>> [CLI] bundle deploy -qq
Warning: app "my_app" references jobs "my_job" which has permissions set. To prevent permission override after deploying the app, please add the app service principal to the jobs permissions
at resources.apps.my_app
in databricks.yml:24:7
in databricks.yml:33:7

Add the following section to the jobs permissions:

Expand All @@ -14,19 +14,15 @@ Add the following section to the jobs permissions:
service_principal_name: ${resources.apps.my_app.service_principal_client_id}


Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!

=== After first deploy
>>> has_manage_run

=== After second deploy
>>> [CLI] bundle deploy
>>> [CLI] bundle deploy -qq
Warning: app "my_app" references jobs "my_job" which has permissions set. To prevent permission override after deploying the app, please add the app service principal to the jobs permissions
at resources.apps.my_app
in databricks.yml:24:7
in databricks.yml:33:7

Add the following section to the jobs permissions:

Expand All @@ -38,20 +34,12 @@ Add the following section to the jobs permissions:
service_principal_name: ${resources.apps.my_app.service_principal_client_id}


Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!

>>> has_manage_run
false

=== Apply fix and redeploy
>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
>>> [CLI] bundle deploy -qq

>>> has_manage_run
true
Expand All @@ -63,5 +51,4 @@ The following resources will be deleted:

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default

Deleting files...
Destroy complete!
Destroy: 2 deleted
6 changes: 3 additions & 3 deletions acceptance/bundle/apps/job_permissions/script
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Issue: https://github.com/databricks/cli/issues/4309

envsubst < databricks.yml.tmpl > databricks.yml
trace $CLI bundle deploy
trace $CLI bundle deploy -qq

job_id=$(read_id.py my_job)

Expand All @@ -27,12 +27,12 @@ trace has_manage_run > out.after_first_deploy.$DATABRICKS_BUNDLE_ENGINE.txt
rm -f out.after_first_deploy.direct.txt

title "After second deploy"
trace $CLI bundle deploy
trace $CLI bundle deploy -qq
trace has_manage_run

title "Apply fix and redeploy"
patch -s --no-backup-if-mismatch databricks.yml < fix.patch
trace $CLI bundle deploy
trace $CLI bundle deploy -qq
trace has_manage_run

trace $CLI bundle destroy --auto-approve
6 changes: 3 additions & 3 deletions acceptance/bundle/artifacts/ai_runtime_code_source/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Building code_source...
Uploading code.tgz...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created jobs.job
Files: 7 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged

=== Expecting code_source_path rewritten to the uploaded artifact remote path
>>> jq -s .[] | select(.path=="/api/2.2/jobs/create") | .body.tasks[].ai_runtime_task out.requests.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
>>> [CLI] bundle deploy
Uploading whl/source.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created jobs.job
Files: 7 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged

=== Expecting 2 wheels in libraries section in /jobs/create
>>> jq -s .[] | select(.path=="/api/2.2/jobs/create") | .body.tasks out.requests.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
>>> [CLI] bundle deploy
Uploading whl/source.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created jobs.job
Files: 7 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged

=== Expecting 2 wheels in libraries section in /jobs/create
>>> jq -s .[] | select(.path=="/api/2.2/jobs/create") | .body.tasks out.requests.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
>>> [CLI] bundle deploy
Uploading whl/source.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Deployment complete!
Files: 7 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 0 unchanged

=== Expecting wheel to be uploaded
>>> jq .path
Expand Down
4 changes: 2 additions & 2 deletions acceptance/bundle/artifacts/build_and_files_whl/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Validation OK!
Building artifact_with_custom_dist...
Uploading mydist/my_test_code-0.0.1-py3-none-any.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Deployment complete!
Files: 17 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
6 changes: 3 additions & 3 deletions acceptance/bundle/artifacts/glob_exact_whl/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
>>> [CLI] bundle deploy
Uploading prebuilt/other_test_code-0.0.1-py3-none-any.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created jobs.test_job
Files: 6 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
6 changes: 3 additions & 3 deletions acceptance/bundle/artifacts/issue_3109/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Warning: required field "entry_point" is not set
Building wheels...
Uploading dist/my_default_python-0.0.1-py3-none-any.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/dev/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Created jobs.job1
Files: 8 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
4 changes: 2 additions & 2 deletions acceptance/bundle/artifacts/shell/bash/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-bash/default/files...
Deploying resources...
Deployment complete!
Files: 6 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
4 changes: 2 additions & 2 deletions acceptance/bundle/artifacts/shell/basic/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-basic/default/files...
Deploying resources...
Deployment complete!
Files: 5 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
4 changes: 2 additions & 2 deletions acceptance/bundle/artifacts/shell/cmd/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-cmd/default/files...
Deploying resources...
Deployment complete!
Files: 6 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
4 changes: 2 additions & 2 deletions acceptance/bundle/artifacts/shell/default/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-bash/default/files...
Deploying resources...
Deployment complete!
Files: 6 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
4 changes: 2 additions & 2 deletions acceptance/bundle/artifacts/shell/sh/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-sh/default/files...
Deploying resources...
Deployment complete!
Files: 6 uploaded, 0 deleted
Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
Loading
Loading