Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
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

Deploy: 1 created, 0 changed, 0 deleted, 0 unchanged.
✓ Getting the status of the app myapp
✓ App is in RUNNING 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

Deploy: 1 created, 0 changed, 0 deleted, 0 unchanged.
✓ Getting the status of the app myapp
✓ App is in RUNNING 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/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

Deploy: 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

Deploy: 0 created, 1 changed, 0 deleted, 0 unchanged.

>>> [CLI] apps get app-[UNIQUE_NAME]
{
Expand Down
2 changes: 0 additions & 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,6 @@ Compute size updates are not supported in this update API. Please use the new
update API instead.


Updating deployment state...

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

Deploy: 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.
13 changes: 5 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

Deploy: 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,7 @@ 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!
Deploy: 0 created, 0 changed, 0 deleted, 1 unchanged.

=== Verify config update was applied
>>> [CLI] apps get [APP_NAME] --output json
Expand All @@ -78,5 +76,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.
18 changes: 4 additions & 14 deletions acceptance/bundle/apps/job_permissions/output.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

>>> [CLI] bundle deploy
>>> [CLI] bundle deploy -q
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
Expand All @@ -15,15 +15,12 @@ Add the following section to the jobs permissions:


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 -q
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
Expand All @@ -39,19 +36,13 @@ Add the following section to the jobs permissions:


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
>>> [CLI] bundle deploy -q
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!

>>> has_manage_run
true
Expand All @@ -63,5 +54,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 -q 2>&1 | grep -v '^Deploy:'

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 -q 2>&1 | grep -v '^Deploy:'
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 -q 2>&1 | grep -v '^Deploy:'
trace has_manage_run

trace $CLI bundle destroy --auto-approve
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

Deploy: 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

Deploy: 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,7 @@
>>> [CLI] bundle deploy
Uploading whl/source.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Deployment complete!
Deploy: 0 created, 0 changed, 0 deleted, 0 unchanged.

=== Expecting wheel to be uploaded
>>> jq .path
Expand Down
3 changes: 1 addition & 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,4 @@ 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!
Deploy: 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

Deploy: 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

Deploy: 1 created, 0 changed, 0 deleted, 0 unchanged.
3 changes: 1 addition & 2 deletions acceptance/bundle/artifacts/shell/bash/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-bash/default/files...
Deploying resources...
Deployment complete!
Deploy: 0 created, 0 changed, 0 deleted, 0 unchanged.
3 changes: 1 addition & 2 deletions acceptance/bundle/artifacts/shell/basic/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-basic/default/files...
Deploying resources...
Deployment complete!
Deploy: 0 created, 0 changed, 0 deleted, 0 unchanged.
3 changes: 1 addition & 2 deletions acceptance/bundle/artifacts/shell/default/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-bash/default/files...
Deploying resources...
Deployment complete!
Deploy: 0 created, 0 changed, 0 deleted, 0 unchanged.
3 changes: 1 addition & 2 deletions acceptance/bundle/artifacts/shell/sh/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
>>> [CLI] bundle deploy
Building my_artifact...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/shell-sh/default/files...
Deploying resources...
Deployment complete!
Deploy: 0 created, 0 changed, 0 deleted, 0 unchanged.
6 changes: 3 additions & 3 deletions acceptance/bundle/artifacts/unique_name_libraries/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Building whl2...
Uploading whl1/dist/my_package-0.0.1-py3-none-any.whl...
Uploading whl2/dist/my_other_package-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

Deploy: 1 created, 0 changed, 0 deleted, 0 unchanged.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Uploading whl/source2.whl...
Uploading whl/source3.whl...
Uploading whl/source4.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
created jobs.job

Deploy: 1 created, 0 changed, 0 deleted, 0 unchanged.

=== Expecting 5 wheels in libraries section in /jobs/create
>>> jq -s .[] | select(.path=="/api/2.2/jobs/create") | .body.tasks out.requests.txt
Expand Down
18 changes: 9 additions & 9 deletions acceptance/bundle/artifacts/whl_change_version/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Building python_artifact...
Uploading dist/my_test_code-0.1.0-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

Deploy: 1 created, 0 changed, 0 deleted, 0 unchanged.

>>> find.py --expect 1 whl
dist/my_test_code-0.1.0-py3-none-any.whl
Expand Down Expand Up @@ -53,9 +53,9 @@ dist/my_test_code-0.1.0-py3-none-any.whl
Building python_artifact...
Uploading dist/my_test_code-0.2.0-py3-none-any.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
updated jobs.test_job

Deploy: 0 created, 1 changed, 0 deleted, 0 unchanged.

>>> find.py --expect 2 whl
dist/my_test_code-0.1.0-py3-none-any.whl
Expand Down Expand Up @@ -85,9 +85,9 @@ Building python_artifact...
Uploading dist/my_test_code-0.1.0-py3-none-any.whl...
Uploading dist/my_test_code-0.2.0-py3-none-any.whl...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
updated jobs.test_job

Deploy: 0 created, 1 changed, 0 deleted, 0 unchanged.

>>> find.py --expect 2 whl
dist/my_test_code-0.1.0-py3-none-any.whl
Expand Down
6 changes: 3 additions & 3 deletions acceptance/bundle/artifacts/whl_dbfs/output.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
created jobs.test_job

Deploy: 1 created, 0 changed, 0 deleted, 0 unchanged.

=== Expecting to find no wheels
>>> errcode find.py --expect 0 whl
Expand Down
Loading
Loading