diff --git a/acceptance/air/convert-to-dabs/output.txt b/acceptance/air/convert-to-dabs/output.txt index 2b60d9e5f69..867afab3d89 100644 --- a/acceptance/air/convert-to-dabs/output.txt +++ b/acceptance/air/convert-to-dabs/output.txt @@ -159,6 +159,7 @@ resources: environment_version: "6" === the current SDK recognizes B300 so bundle validation is clean + >>> [CLI] bundle validate Name: b300-smoke-test Target: dev diff --git a/acceptance/air/image-push/output.txt b/acceptance/air/image-push/output.txt index 2d1a10b3ac7..111022f631c 100644 --- a/acceptance/air/image-push/output.txt +++ b/acceptance/air/image-push/output.txt @@ -14,7 +14,6 @@ Pushed image. Now you can set `environment.unity_catalog_image = my-catalog.my-schema.cuda:13.4.1-cudnn-devel-ubuntu26.04` in your YAML config and create a workload with `databricks air run -f config.yaml`. === inferred region and workspace ID requests - >>> print_requests.py --get //api { "method": "GET", @@ -35,6 +34,7 @@ tag nvidia/cuda:13.4.1 [NUMID].container.us-west-2.localhost/my-catalog.my-schem push [NUMID].container.us-west-2.localhost/my-catalog.my-schema.cuda:13.4.1-cudnn-devel-ubuntu26.04 === missing image is pulled for AIR; destination defaults to source + >>> databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features. Pushing example/image:v1 as main.training.image:v1 using profile docker-test @@ -50,6 +50,7 @@ Pushed image. Now you can set `environment.unity_catalog_image = main.training.image:v1` in your YAML config and create a workload with `databricks air run -f config.yaml`. === forced pull and JSON output + >>> databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --pull -o json Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features. Pushing example/image:v1 as main.training.image:v1 using profile docker-test @@ -73,6 +74,7 @@ Pushed image. } === daemon failure must not pull + >>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features. Pushing example/image:v1 as main.training.image:v1 using profile docker-test @@ -83,6 +85,7 @@ Cannot connect to the Docker daemon Error: check local source image example/image:v1 (ensure Docker is running and accessible): exit status 1 === inspect failure must not pull + >>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features. Pushing example/image:v1 as main.training.image:v1 using profile docker-test @@ -94,6 +97,7 @@ Docker inspect failed Error: inspect source image example/image:v1: exit status 1 === incompatible local image must not be pushed + >>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features. Pushing example/image:v1 as main.training.image:v1 using profile docker-test @@ -115,6 +119,7 @@ Docker pull progress Error: source image example/image:v1 has platform "linux/arm64"; AIR requires linux/amd64: use --pull to fetch a compatible image, or rebuild the source for linux/amd64 === pull failure must not be pushed + >>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --pull Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features. Pushing example/image:v1 as main.training.image:v1 using profile docker-test @@ -126,6 +131,7 @@ Docker pull failed Error: pull source image example/image:v1: exit status 1 === invalid destination and removed flags + >>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --artifact invalid.name Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features. Error: invalid artifact name "invalid.name": use lowercase letters and digits separated by one or two underscores or one or more hyphens @@ -177,6 +183,7 @@ Global Flags: === reject oversized catalog.schema.artifact before Docker operations + >>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --artifact aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features. Error: invalid image repository name: catalog.schema.artifact must be 255 characters or less diff --git a/acceptance/air/image-push/script b/acceptance/air/image-push/script index bd641b65d9e..4863b27b366 100644 --- a/acceptance/air/image-push/script +++ b/acceptance/air/image-push/script @@ -12,10 +12,10 @@ trace databricks air images push \ --schema my-schema \ --artifact cuda:13.4.1-cudnn-devel-ubuntu26.04 -title "inferred region and workspace ID requests\n" +title "inferred region and workspace ID requests" trace print_requests.py --get //api -title "docker commands\n" +title "docker commands" cat "$DOCKER_LOG" title "missing image is pulled for AIR; destination defaults to source" @@ -59,5 +59,5 @@ cp "$DOCKER_LOG" "$HOME/docker.before-length.log" trace musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --artifact "$(cat oversized-artifact.txt)" cmp "$DOCKER_LOG" "$HOME/docker.before-length.log" -title "all docker commands\n" +title "all docker commands" cat "$DOCKER_LOG" diff --git a/acceptance/auth/bundle_default_profile/output.txt b/acceptance/auth/bundle_default_profile/output.txt index f8e8a3c0062..c54f504c24a 100644 --- a/acceptance/auth/bundle_default_profile/output.txt +++ b/acceptance/auth/bundle_default_profile/output.txt @@ -1,6 +1,5 @@ === Bundle without workspace.host: default_profile is honored - >>> [CLI] bundle validate -o json { "host": null, @@ -8,7 +7,6 @@ } === --profile overrides default_profile (negative case) - >>> errcode [CLI] bundle validate -p other -o json Warn: [hostmetadata] failed to fetch host metadata for https://other.test, will skip for 1m0s Error: Get "https://other.test/api/2.0/preview/scim/v2/Me": (redacted) @@ -21,7 +19,6 @@ Exit code: 1 } === Bundle with workspace.host: default_profile is NOT applied - >>> errcode [CLI] bundle validate -o json { "host": "[DATABRICKS_URL]", @@ -29,7 +26,6 @@ Exit code: 1 } === Bundle with workspace.profile: pinned profile wins over default_profile - >>> errcode [CLI] bundle validate -o json Error: Get "https://other.test/api/2.0/preview/scim/v2/Me": (redacted) diff --git a/acceptance/auth/bundle_default_profile/script b/acceptance/auth/bundle_default_profile/script index 2baefcbe139..7f506d44f1b 100644 --- a/acceptance/auth/bundle_default_profile/script +++ b/acceptance/auth/bundle_default_profile/script @@ -10,11 +10,11 @@ unset DATABRICKS_TOKEN unset DATABRICKS_CONFIG_PROFILE cp databricks.yml.no-host.tmpl databricks.yml -title "Bundle without workspace.host: default_profile is honored\n" +title "Bundle without workspace.host: default_profile is honored" trace $CLI bundle validate -o json | jq '{host: .workspace.host, profile: .workspace.profile}' cp databricks.yml.no-host.tmpl databricks.yml -title "--profile overrides default_profile (negative case)\n" +title "--profile overrides default_profile (negative case)" trace errcode $CLI bundle validate -p other -o json | jq '{host: .workspace.host, profile: .workspace.profile}' # Switch to a bundle that pins workspace.host. The default_profile guard in @@ -22,12 +22,12 @@ trace errcode $CLI bundle validate -p other -o json | jq '{host: .workspace.host # silently route the user to a profile pointing at a different host than the # bundle declares. DATABRICKS_HOST="$host_value" envsubst < databricks.yml.with-host.tmpl > databricks.yml -title "Bundle with workspace.host: default_profile is NOT applied\n" +title "Bundle with workspace.host: default_profile is NOT applied" trace errcode $CLI bundle validate -o json | jq '{host: .workspace.host, profile: .workspace.profile}' # Switch to a bundle that pins workspace.profile but no host. The pinned # profile must win over default_profile — configureProfile's guard skips # default_profile when workspace.profile is already set. cp databricks.yml.with-profile.tmpl databricks.yml -title "Bundle with workspace.profile: pinned profile wins over default_profile\n" +title "Bundle with workspace.profile: pinned profile wins over default_profile" trace errcode $CLI bundle validate -o json | jq '{host: .workspace.host, profile: .workspace.profile}' diff --git a/acceptance/auth/host-metadata-cache/script b/acceptance/auth/host-metadata-cache/script index 31f989aba0d..3bde2ffda42 100644 --- a/acceptance/auth/host-metadata-cache/script +++ b/acceptance/auth/host-metadata-cache/script @@ -6,11 +6,11 @@ export DATABRICKS_CACHE_DIR="$TEST_TMP_DIR/cache" # never fetch or populate the cache. envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" -title "First invocation populates the cache\n" +title "First invocation populates the cache" $CLI auth profiles --output json -title "Second invocation should read from the cache\n" +title "Second invocation should read from the cache" $CLI auth profiles --output json -title "Only one /.well-known/databricks-config request recorded\n" +title "Only one /.well-known/databricks-config request recorded" print_requests.py //.well-known/databricks-config --get --sort diff --git a/acceptance/bundle/apps/compute_size/output.txt b/acceptance/bundle/apps/compute_size/output.txt index 9ab604797e6..408e408c06d 100644 --- a/acceptance/bundle/apps/compute_size/output.txt +++ b/acceptance/bundle/apps/compute_size/output.txt @@ -7,6 +7,7 @@ Files: 4 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Update compute size and redeploy + >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: delete resources.apps.my_app diff --git a/acceptance/bundle/apps/delete_deleting/script b/acceptance/bundle/apps/delete_deleting/script index 14267a32af4..a5e9d1454a5 100644 --- a/acceptance/bundle/apps/delete_deleting/script +++ b/acceptance/bundle/apps/delete_deleting/script @@ -15,7 +15,7 @@ cleanup() { } trap cleanup EXIT -title "Deploy the app\n" +title "Deploy the app" trace $CLI bundle deploy &> LOG.deploy cat LOG.deploy | contains.py '!panic' '!internal error' > /dev/null @@ -31,7 +31,7 @@ cat LOG.plan_delete.err | contains.py '!panic' '!internal error' > /dev/null trace $CLI apps delete "app-$UNIQUE_NAME" &> LOG.apps_delete cat LOG.apps_delete | contains.py '!panic' '!internal error' > /dev/null -title "Apply the stale delete plan against the DELETING app\n" +title "Apply the stale delete plan against the DELETING app" trace $CLI bundle deploy --auto-approve --plan plan_delete.json &> LOG.deploy_delete cat LOG.deploy_delete | contains.py '!panic' '!internal error' > /dev/null diff --git a/acceptance/bundle/apps/git_source/output.txt b/acceptance/bundle/apps/git_source/output.txt index 4046ed6e152..da52a4c8796 100644 --- a/acceptance/bundle/apps/git_source/output.txt +++ b/acceptance/bundle/apps/git_source/output.txt @@ -33,6 +33,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged You can access the app at [APP_NAME]-123.cloud.databricksapps.com === Get app details and verify git_source configuration + >>> [CLI] bundle summary --output json >>> [CLI] apps get [APP_NAME] --output json @@ -51,6 +52,7 @@ You can access the app at [APP_NAME]-123.cloud.databricksapps.com Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Run the app to verify it works + >>> cat tmp.app-run ✓ Getting the status of the app [APP_NAME] ✓ App is in RUNNING state @@ -59,6 +61,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged 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... Files: 3 uploaded, 0 deleted diff --git a/acceptance/bundle/apps/job_permissions/output.txt b/acceptance/bundle/apps/job_permissions/output.txt index ec50e4828c6..f268ed18fb7 100644 --- a/acceptance/bundle/apps/job_permissions/output.txt +++ b/acceptance/bundle/apps/job_permissions/output.txt @@ -39,6 +39,7 @@ Add the following section to the jobs permissions: false === Apply fix and redeploy + >>> [CLI] bundle deploy -qq >>> has_manage_run diff --git a/acceptance/bundle/apps/source_code_path_update/output.txt b/acceptance/bundle/apps/source_code_path_update/output.txt index 1998e9489ca..3959cae501a 100644 --- a/acceptance/bundle/apps/source_code_path_update/output.txt +++ b/acceptance/bundle/apps/source_code_path_update/output.txt @@ -7,7 +7,9 @@ Files: 4 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Run app to redeploy (reproduces the issue precondition of having an active deployment) + === Redeploy from saved plan after description change + >>> [CLI] bundle deploy --plan plan.json Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/app-scp-update-[UNIQUE_NAME]/files... Updated apps.my_app diff --git a/acceptance/bundle/artifacts/whl_dynamic/script b/acceptance/bundle/artifacts/whl_dynamic/script index 243fc65c164..62e1c8136ac 100644 --- a/acceptance/bundle/artifacts/whl_dynamic/script +++ b/acceptance/bundle/artifacts/whl_dynamic/script @@ -25,7 +25,7 @@ trace jq .path < "$OUT_REQUESTS" | grep import | grep whl | sort rm "$OUT_REQUESTS" -title "Updating the local wheel and deploying again\n" +title "Updating the local wheel and deploying again" touch my_test_code/src/new_module.py $CLI bundle plan -o json > tmp.plan.json 2>>LOG.plan nostamp < tmp.plan.json > out.plan_update.json diff --git a/acceptance/bundle/config-remote-sync/cli_defaults/output.txt b/acceptance/bundle/config-remote-sync/cli_defaults/output.txt index 90e2b582ce5..d062dba2027 100644 --- a/acceptance/bundle/config-remote-sync/cli_defaults/output.txt +++ b/acceptance/bundle/config-remote-sync/cli_defaults/output.txt @@ -27,7 +27,6 @@ Resource: resources.pipelines.pipeline1 === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/cli_defaults/script b/acceptance/bundle/config-remote-sync/cli_defaults/script index cf626b9dc9c..ec7777acbff 100755 --- a/acceptance/bundle/config-remote-sync/cli_defaults/script +++ b/acceptance/bundle/config-remote-sync/cli_defaults/script @@ -13,7 +13,6 @@ job2_id="$(read_id.py job2)" pipeline1_id="$(read_id.py pipeline1)" title "Modify jobs" -echo echo "Change max_concurrent_runs, name, change default tag" edit_resource.py jobs $job1_id <>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/config_edits/script b/acceptance/bundle/config-remote-sync/config_edits/script index e7defc9b658..49eefb61271 100755 --- a/acceptance/bundle/config-remote-sync/config_edits/script +++ b/acceptance/bundle/config-remote-sync/config_edits/script @@ -12,7 +12,6 @@ $CLI bundle deploy job_id="$(read_id.py my_job)" title "Case 1: Added locally, updated remotely with different value" -echo old=$(cat <<'EOF' email_notifications: on_success: @@ -33,7 +32,6 @@ r["email_notifications"]["on_failure"] = ["remote-failure@example.com"] EOF title "Case 2: Added locally, removed remotely" -echo old=$(cat <<'EOF' max_concurrent_runs: 1 EOF @@ -49,7 +47,6 @@ r.pop("timeout_seconds", None) EOF title "Case 3: Removed locally, removed remotely" -echo old=$(cat <<'EOF' tags: env: dev @@ -69,21 +66,18 @@ r["tags"].pop("version", None) EOF title "Case 4: Updated locally, updated remotely with different value" -echo update_file.py databricks.yml 'max_concurrent_runs: 1' 'max_concurrent_runs: 3' read -r -d '' case4 <<'EOF' || true r["max_concurrent_runs"] = 5 EOF title "Case 5: Updated locally, removed remotely" -echo update_file.py databricks.yml 'env: dev' 'env: config-production' read -r -d '' case5 <<'EOF' || true r["tags"].pop("env", None) EOF title "Case 6: Added locally and remotely with same value (no drift expected)" -echo old=$(cat <<'EOF' my_job: email_notifications: @@ -101,7 +95,6 @@ r["description"] = "A test job" EOF title "Edit job remotely" -echo edit_resource.py jobs $job_id <>> [CLI] bundle config-remote-sync No changes detected. diff --git a/acceptance/bundle/config-remote-sync/dashboard_etag/script b/acceptance/bundle/config-remote-sync/dashboard_etag/script index 990988c5906..a6bfde71e4d 100644 --- a/acceptance/bundle/config-remote-sync/dashboard_etag/script +++ b/acceptance/bundle/config-remote-sync/dashboard_etag/script @@ -11,17 +11,14 @@ $CLI bundle deploy dashboard_id=$(read_id.py my_dashboard) title "Modify the dashboard out of band to bump its remote etag" -echo # Keep only lifecycle_state: the full response carries a nondeterministic etag # and update_time that would churn the snapshot. $CLI lakeview update "$dashboard_id" --json '{"serialized_dashboard": "{}", "warehouse_id": "'$TEST_DEFAULT_WAREHOUSE_ID'"}' | jq '{lifecycle_state}' title "Detect changes: etag drift must not be reported" -echo trace $CLI bundle config-remote-sync title "Save changes: config must not be modified" -echo cp databricks.yml databricks.yml.backup trace $CLI bundle config-remote-sync --save trace diff.py databricks.yml.backup databricks.yml diff --git a/acceptance/bundle/config-remote-sync/flushed_cache/script b/acceptance/bundle/config-remote-sync/flushed_cache/script index 7571c62bbbc..02b58bf942c 100755 --- a/acceptance/bundle/config-remote-sync/flushed_cache/script +++ b/acceptance/bundle/config-remote-sync/flushed_cache/script @@ -8,11 +8,9 @@ cleanup() { trap cleanup EXIT title "Deploy bundle" -echo $CLI bundle deploy title "Get job ID and modify remote resource" -echo job_id="$(read_id.py test_job)" echo "Modify max_concurrent_runs to 5" edit_resource.py jobs $job_id <&1 || echo "Cache directory removed" title "Check for changes after cache flush" -echo $CLI bundle config-remote-sync diff --git a/acceptance/bundle/config-remote-sync/formatting_preserved/output.txt b/acceptance/bundle/config-remote-sync/formatting_preserved/output.txt index 0a63ba22bac..9adb933aa8b 100644 --- a/acceptance/bundle/config-remote-sync/formatting_preserved/output.txt +++ b/acceptance/bundle/config-remote-sync/formatting_preserved/output.txt @@ -4,6 +4,7 @@ Files: 3 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Modify max_concurrent_runs, description, and add timeout + === Detect and save changes Detected changes in 1 resource(s): @@ -15,7 +16,6 @@ Resource: resources.jobs.my_job === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/formatting_preserved/script b/acceptance/bundle/config-remote-sync/formatting_preserved/script index 526ba1f439a..cc67c62b759 100755 --- a/acceptance/bundle/config-remote-sync/formatting_preserved/script +++ b/acceptance/bundle/config-remote-sync/formatting_preserved/script @@ -19,11 +19,9 @@ r["timeout_seconds"] = 3600 EOF title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/job_fields/output.txt b/acceptance/bundle/config-remote-sync/job_fields/output.txt index b932a52aa88..5de1f862fa4 100644 --- a/acceptance/bundle/config-remote-sync/job_fields/output.txt +++ b/acceptance/bundle/config-remote-sync/job_fields/output.txt @@ -26,7 +26,6 @@ Resource: resources.jobs.my_job === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -83,7 +82,6 @@ Resource: resources.jobs.my_job targets: === Telemetry - >>> cat [OUTPUT_DIR]/out.requests.txt { "save": true, diff --git a/acceptance/bundle/config-remote-sync/job_fields/script b/acceptance/bundle/config-remote-sync/job_fields/script index 20653434666..27b7c8a3abc 100755 --- a/acceptance/bundle/config-remote-sync/job_fields/script +++ b/acceptance/bundle/config-remote-sync/job_fields/script @@ -17,7 +17,6 @@ job_id="$(read_id.py my_job)" title "Modify job fields remotely" -echo edit_resource.py jobs $job_id <>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -77,6 +77,7 @@ Resource: resources.jobs.no_tasks_job >>> [CLI] bundle deploy -qq === Rename b_task, replace a_task notebook_path, add synced_task + === Detect task key rename Detected changes in 1 resource(s): @@ -93,7 +94,6 @@ Resource: resources.jobs.rename_task_job === Configuration changes for task key rename - >>> diff.py databricks.yml.backup2 databricks.yml --- databricks.yml.backup2 +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/job_multiple_tasks/script b/acceptance/bundle/config-remote-sync/job_multiple_tasks/script index ff2b7e464ac..fc69b7733b0 100755 --- a/acceptance/bundle/config-remote-sync/job_multiple_tasks/script +++ b/acceptance/bundle/config-remote-sync/job_multiple_tasks/script @@ -52,12 +52,10 @@ r["tasks"].append({ EOF title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup @@ -99,11 +97,9 @@ r["tasks"].append({ EOF title "Detect task key rename" -echo cp databricks.yml databricks.yml.backup2 $CLI bundle config-remote-sync --save title "Configuration changes for task key rename" -echo trace diff.py databricks.yml.backup2 databricks.yml rm databricks.yml.backup2 diff --git a/acceptance/bundle/config-remote-sync/job_params_variables/output.txt b/acceptance/bundle/config-remote-sync/job_params_variables/output.txt index 53434bb9957..b7ad8cb467d 100644 --- a/acceptance/bundle/config-remote-sync/job_params_variables/output.txt +++ b/acceptance/bundle/config-remote-sync/job_params_variables/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Add new parameter remotely + === Detect and save changes Detected changes in 1 resource(s): @@ -13,7 +14,6 @@ Resource: resources.jobs.my_job === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/job_params_variables/script b/acceptance/bundle/config-remote-sync/job_params_variables/script index 8a8acc6d972..0ba81296f02 100644 --- a/acceptance/bundle/config-remote-sync/job_params_variables/script +++ b/acceptance/bundle/config-remote-sync/job_params_variables/script @@ -16,11 +16,9 @@ r["parameters"].append({"name": "region", "default": "us-east-1"}) EOF title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/job_pipeline_task/output.txt b/acceptance/bundle/config-remote-sync/job_pipeline_task/output.txt index e54fec1014a..dfc2b039727 100644 --- a/acceptance/bundle/config-remote-sync/job_pipeline_task/output.txt +++ b/acceptance/bundle/config-remote-sync/job_pipeline_task/output.txt @@ -5,7 +5,9 @@ Files: 3 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Modify pipeline_task full_refresh to True + === Modify pipeline continuous to True + === Detect and save changes Detected changes in 2 resource(s): @@ -18,7 +20,6 @@ Resource: resources.pipelines.my_pipeline === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/job_pipeline_task/script b/acceptance/bundle/config-remote-sync/job_pipeline_task/script index d5587a201e1..24560b85db8 100755 --- a/acceptance/bundle/config-remote-sync/job_pipeline_task/script +++ b/acceptance/bundle/config-remote-sync/job_pipeline_task/script @@ -27,11 +27,9 @@ EOF title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/json_status_missing_state/script b/acceptance/bundle/config-remote-sync/json_status_missing_state/script index 00baec1b20e..4c80d90a7ea 100755 --- a/acceptance/bundle/config-remote-sync/json_status_missing_state/script +++ b/acceptance/bundle/config-remote-sync/json_status_missing_state/script @@ -5,5 +5,4 @@ envsubst < databricks.yml.tmpl > databricks.yml # No deploy, so the terraform state snapshot does not exist: in JSON mode the # sync is reported as skipped with exit 0, not a hard failure. title "Missing tf state is reported as skipped, exit 0" -echo errcode $CLI bundle config-remote-sync -o json diff --git a/acceptance/bundle/config-remote-sync/json_status_selectors/script b/acceptance/bundle/config-remote-sync/json_status_selectors/script index a375fd79213..17730386ea7 100755 --- a/acceptance/bundle/config-remote-sync/json_status_selectors/script +++ b/acceptance/bundle/config-remote-sync/json_status_selectors/script @@ -15,9 +15,7 @@ job_id="$(read_id.py test_job)" # "status" so the workspace caller can tell a benign no-op apart from an error. title "A selector that matches nothing is reported as skipped, exit 0" -echo errcode $CLI bundle config-remote-sync --select-ids "jobs:no-such-id-999" -o json title "A malformed selector is reported as failed, exit 0" -echo errcode $CLI bundle config-remote-sync --select-ids "no-such-id-999" -o json diff --git a/acceptance/bundle/config-remote-sync/multiple_files/output.txt b/acceptance/bundle/config-remote-sync/multiple_files/output.txt index a8d9965bb8c..4b5a02d7d89 100644 --- a/acceptance/bundle/config-remote-sync/multiple_files/output.txt +++ b/acceptance/bundle/config-remote-sync/multiple_files/output.txt @@ -5,9 +5,13 @@ Files: 8 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Modify job_one: max_concurrent_runs, rename c_task + === Add synced_task to job_one (notebook in sync root, resource in subdirectory) + === Modify job_two: max_concurrent_runs, rename first task, add extra_task + === Add extra_task to local config (not in saved state, triggers entity-level replace) + === Detect and save changes Detected changes in 2 resource(s): @@ -29,7 +33,6 @@ Resource: resources.jobs.job_two === Changes in job1.yml - >>> diff.py resources/job1.yml.backup resources/job1.yml --- resources/job1.yml.backup +++ resources/job1.yml @@ -54,7 +57,6 @@ Resource: resources.jobs.job_two + task_key: synced_task === Changes in job2.yml - >>> diff.py resources/job2.yml.backup resources/job2.yml --- resources/job2.yml.backup +++ resources/job2.yml diff --git a/acceptance/bundle/config-remote-sync/multiple_files/script b/acceptance/bundle/config-remote-sync/multiple_files/script index 4316a3f1cc4..47d3ce29e66 100755 --- a/acceptance/bundle/config-remote-sync/multiple_files/script +++ b/acceptance/bundle/config-remote-sync/multiple_files/script @@ -65,16 +65,13 @@ cat >> resources/job2.yml << 'YAML' YAML title "Detect and save changes" -echo cp resources/job1.yml resources/job1.yml.backup cp resources/job2.yml resources/job2.yml.backup $CLI bundle config-remote-sync --save title "Changes in job1.yml" -echo trace diff.py resources/job1.yml.backup resources/job1.yml title "Changes in job2.yml" -echo trace diff.py resources/job2.yml.backup resources/job2.yml rm resources/job1.yml.backup resources/job2.yml.backup diff --git a/acceptance/bundle/config-remote-sync/multiple_resources/output.txt b/acceptance/bundle/config-remote-sync/multiple_resources/output.txt index 4cf758aafc7..5371b10a75e 100644 --- a/acceptance/bundle/config-remote-sync/multiple_resources/output.txt +++ b/acceptance/bundle/config-remote-sync/multiple_resources/output.txt @@ -10,6 +10,7 @@ Files: 3 uploaded, 0 deleted Resources: 7 created, 0 changed, 0 deleted, 0 unchanged === Modify both jobs + === Detect and save changes Detected changes in 2 resource(s): @@ -24,7 +25,6 @@ Resource: resources.jobs.job_two === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/multiple_resources/script b/acceptance/bundle/config-remote-sync/multiple_resources/script index 7a89c168d69..107550bf997 100755 --- a/acceptance/bundle/config-remote-sync/multiple_resources/script +++ b/acceptance/bundle/config-remote-sync/multiple_resources/script @@ -33,11 +33,9 @@ r.setdefault("tags", {})["team"] = "ml" EOF title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/output_json/output.txt b/acceptance/bundle/config-remote-sync/output_json/output.txt index 6cf6c7b6b05..bc4250b673c 100644 --- a/acceptance/bundle/config-remote-sync/output_json/output.txt +++ b/acceptance/bundle/config-remote-sync/output_json/output.txt @@ -3,7 +3,8 @@ Created jobs.test_job Files: 3 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged -=== JSON output format{ +=== JSON output format +{ "status": "success", "files": [ { diff --git a/acceptance/bundle/config-remote-sync/output_no_changes/script b/acceptance/bundle/config-remote-sync/output_no_changes/script index 1bef0ab9c02..e30a871d2ff 100755 --- a/acceptance/bundle/config-remote-sync/output_no_changes/script +++ b/acceptance/bundle/config-remote-sync/output_no_changes/script @@ -11,14 +11,11 @@ touch dummy.whl $CLI bundle deploy title "Check for changes immediately after deployment" -echo $CLI bundle config-remote-sync title "Text output" -echo $CLI bundle config-remote-sync | contains.py "No changes detected" title "JSON output" -echo $CLI bundle config-remote-sync -o json > tmp.json cat tmp.json diff --git a/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt b/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt index 968f42c400b..82ca1721835 100644 --- a/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt +++ b/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt @@ -4,6 +4,7 @@ Files: 3 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Modify pipeline fields remotely + === Detect and save changes Detected changes in 1 resource(s): @@ -20,7 +21,6 @@ Resource: resources.pipelines.my_pipeline === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/pipeline_fields/script b/acceptance/bundle/config-remote-sync/pipeline_fields/script index 1fe0261689b..ec505182dd4 100755 --- a/acceptance/bundle/config-remote-sync/pipeline_fields/script +++ b/acceptance/bundle/config-remote-sync/pipeline_fields/script @@ -42,11 +42,9 @@ EOF # rm permissions.json title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/output.txt b/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/output.txt index 019b581933a..d6c208b0796 100644 --- a/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/output.txt +++ b/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/output.txt @@ -16,7 +16,6 @@ Resource: resources.jobs.job1 === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/script b/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/script index bcc9844b03f..b8fda82d7fb 100644 --- a/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/script +++ b/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/script @@ -11,7 +11,6 @@ $CLI bundle deploy job1_id="$(read_id.py job1)" title "Simulate a cluster policy injecting custom_tags and cluster_log_conf" -echo echo "These fields exist only remotely (the user never set them in config)." echo "A legitimate edit (max_concurrent_runs) is made too, to show real edits still sync." edit_resource.py jobs $job1_id <<'EOF' @@ -34,11 +33,9 @@ for jc in r.get("job_clusters", []): EOF title "Detect and save all changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/resolve_variables/output.txt b/acceptance/bundle/config-remote-sync/resolve_variables/output.txt index 0f6087522e6..5e6be063f11 100644 --- a/acceptance/bundle/config-remote-sync/resolve_variables/output.txt +++ b/acceptance/bundle/config-remote-sync/resolve_variables/output.txt @@ -5,7 +5,9 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Modify pipeline environment dependencies + === Add and replace parameters remotely + === Detect and save changes Detected changes in 2 resource(s): @@ -33,7 +35,6 @@ Resource: resources.pipelines.my_pipeline === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -110,7 +111,6 @@ Resource: resources.pipelines.my_pipeline targets: === Telemetry - >>> cat [OUTPUT_DIR]/out.requests.txt { "save": true, diff --git a/acceptance/bundle/config-remote-sync/resolve_variables/script b/acceptance/bundle/config-remote-sync/resolve_variables/script index a3d0edf7468..ebf76b26cd6 100755 --- a/acceptance/bundle/config-remote-sync/resolve_variables/script +++ b/acceptance/bundle/config-remote-sync/resolve_variables/script @@ -121,17 +121,14 @@ for e in r["environments"]: EOF title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup title "Telemetry" -echo # The engine name is dropped because both EnvMatrix variants share this output; # every other counter is engine-agnostic. This run exercises refs_retargeted # (the env param re-targeted to a different variable) and refs_from_siblings diff --git a/acceptance/bundle/config-remote-sync/select_basic/output.txt b/acceptance/bundle/config-remote-sync/select_basic/output.txt index d4cacb53c24..48121302fad 100644 --- a/acceptance/bundle/config-remote-sync/select_basic/output.txt +++ b/acceptance/bundle/config-remote-sync/select_basic/output.txt @@ -5,6 +5,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Modify both jobs remotely + === Sync only job_one, selected by its type and deployed resource id Detected changes in 1 resource(s): @@ -14,7 +15,6 @@ Resource: resources.jobs.job_one === Only job_one is updated; job_two is left untouched - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -58,14 +58,12 @@ Resource: resources.jobs.job_two - task_key: main === An unknown resource id alone is rejected (no match at all must not silently succeed) - >>> [CLI] bundle config-remote-sync --select-ids jobs:no-such-id-123 Error: no deployed jobs resource with id no-such-id-123; deployed jobs ids in state: [JOB_ID], [JOB_ID] Exit code: 1 === An id that exists under a different type matches nothing and is rejected too - >>> [CLI] bundle config-remote-sync --select-ids pipelines:[JOB_ONE_ID] Error: no deployed pipelines resource with id [JOB_ONE_ID]; the deployment state contains no pipelines resources (deployed resources by type: jobs=2) diff --git a/acceptance/bundle/config-remote-sync/select_basic/script b/acceptance/bundle/config-remote-sync/select_basic/script index a85bb0b46a6..d5265fa045a 100644 --- a/acceptance/bundle/config-remote-sync/select_basic/script +++ b/acceptance/bundle/config-remote-sync/select_basic/script @@ -21,36 +21,29 @@ r["max_concurrent_runs"] = 10 EOF title "Sync only job_one, selected by its type and deployed resource id" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --select-ids "jobs:$job_one_id" --save title "Only job_one is updated; job_two is left untouched" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup title "Selecting job_one again is idempotent" -echo $CLI bundle config-remote-sync --select-ids "jobs:$job_one_id" title "Unfiltered sync still detects the job_two drift (no lost updates)" -echo $CLI bundle config-remote-sync title "A stale selector is skipped, not fatal: job_two still syncs alongside it" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --select-ids "jobs:no-such-id-123,jobs:$job_two_id" --save trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup title "An unknown resource id alone is rejected (no match at all must not silently succeed)" -echo errcode trace $CLI bundle config-remote-sync --select-ids jobs:no-such-id-123 title "An id that exists under a different type matches nothing and is rejected too" -echo errcode trace $CLI bundle config-remote-sync --select-ids "pipelines:$job_one_id" title "A selector without a type is still rejected" diff --git a/acceptance/bundle/config-remote-sync/select_multiple/output.txt b/acceptance/bundle/config-remote-sync/select_multiple/output.txt index eb64a611009..44be51b79ca 100644 --- a/acceptance/bundle/config-remote-sync/select_multiple/output.txt +++ b/acceptance/bundle/config-remote-sync/select_multiple/output.txt @@ -6,6 +6,7 @@ Files: 2 uploaded, 0 deleted Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Modify all three jobs remotely + === Comma-separated selectors preview two of three resources Detected changes in 2 resource(s): @@ -37,7 +38,6 @@ Resource: resources.jobs.job_b === job_a and job_b are updated, job_c is untouched - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/select_multiple/script b/acceptance/bundle/config-remote-sync/select_multiple/script index 8eab7443aff..58b158715b2 100644 --- a/acceptance/bundle/config-remote-sync/select_multiple/script +++ b/acceptance/bundle/config-remote-sync/select_multiple/script @@ -20,23 +20,18 @@ EOF done title "Comma-separated selectors preview two of three resources" -echo $CLI bundle config-remote-sync --select-ids "jobs:$job_a_id,jobs:$job_b_id" title "Repeating the same selector dedupes silently" -echo $CLI bundle config-remote-sync --select-ids "jobs:$job_c_id,jobs:$job_c_id" title "Save with repeated --select-ids flags" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --select-ids "jobs:$job_a_id" --select-ids "jobs:$job_b_id" --save title "job_a and job_b are updated, job_c is untouched" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup title "Unfiltered sync still detects the job_c drift" -echo $CLI bundle config-remote-sync diff --git a/acceptance/bundle/config-remote-sync/skip_deployment/output.txt b/acceptance/bundle/config-remote-sync/skip_deployment/output.txt index 620d12c6d22..2bbd239fb90 100644 --- a/acceptance/bundle/config-remote-sync/skip_deployment/output.txt +++ b/acceptance/bundle/config-remote-sync/skip_deployment/output.txt @@ -18,7 +18,6 @@ Resource: resources.pipelines.my_pipeline === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/skip_deployment/script b/acceptance/bundle/config-remote-sync/skip_deployment/script index 532a889fe76..7fc92ce939c 100755 --- a/acceptance/bundle/config-remote-sync/skip_deployment/script +++ b/acceptance/bundle/config-remote-sync/skip_deployment/script @@ -15,7 +15,6 @@ pipeline_id="$(read_id.py my_pipeline)" title "Modify the CLI-managed deployment metadata and one user field remotely" -echo # deployment.* is rewritten by the CLI on every deploy (metadata.AnnotateJobs / # AnnotatePipelines), so config-remote-sync must never sync it back, even when it # differs from the local value. The description / configuration edits are the @@ -32,11 +31,9 @@ r["configuration"]["key2"] = "value2" EOF title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/skip_permissions/output.txt b/acceptance/bundle/config-remote-sync/skip_permissions/output.txt index dd929a13ca0..8145fad9231 100644 --- a/acceptance/bundle/config-remote-sync/skip_permissions/output.txt +++ b/acceptance/bundle/config-remote-sync/skip_permissions/output.txt @@ -17,7 +17,6 @@ Resource: resources.jobs.my_job === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/skip_permissions/script b/acceptance/bundle/config-remote-sync/skip_permissions/script index 585db4a5535..49b211bf777 100644 --- a/acceptance/bundle/config-remote-sync/skip_permissions/script +++ b/acceptance/bundle/config-remote-sync/skip_permissions/script @@ -11,24 +11,20 @@ $CLI bundle deploy job_id="$(read_id.py my_job)" title "Add a permission remotely (a change on the permissions sub-resource)" -echo # permissions set replaces the whole ACL, so keep the deploy identity as owner # and add a grantee (the built-in "users" group) that is not in config: this # makes the permissions sub-resource show a change on the next sync. $CLI permissions set jobs $job_id --json '{"access_control_list":[{"permission_level":"IS_OWNER","user_name":"'"$CURRENT_USER_NAME"'"},{"permission_level":"CAN_VIEW","group_name":"users"}]}' > /dev/null title "Modify a regular job field remotely" -echo edit_resource.py jobs $job_id <>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/cli_default_split_element/script b/acceptance/bundle/config-remote-sync/split/cli_default_split_element/script index a691d865e98..4c61312b7d1 100644 --- a/acceptance/bundle/config-remote-sync/split/cli_default_split_element/script +++ b/acceptance/bundle/config-remote-sync/split/cli_default_split_element/script @@ -16,11 +16,9 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "The field is added to the block declaring the resource" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "existing_cluster_id: 0101-000000-remote1" databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/split/dotted_target/output.txt b/acceptance/bundle/config-remote-sync/split/dotted_target/output.txt index ca7af9375da..c76bdbf3932 100644 --- a/acceptance/bundle/config-remote-sync/split/dotted_target/output.txt +++ b/acceptance/bundle/config-remote-sync/split/dotted_target/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Edit a field in the override block of a target whose name contains a dot + === Sync Detected changes in 1 resource(s): @@ -13,7 +14,6 @@ Resource: resources.jobs.dotted_job === The override block is updated - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/dotted_target/script b/acceptance/bundle/config-remote-sync/split/dotted_target/script index c3d05534ab2..6ddc898a2ab 100644 --- a/acceptance/bundle/config-remote-sync/split/dotted_target/script +++ b/acceptance/bundle/config-remote-sync/split/dotted_target/script @@ -13,10 +13,8 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev.eu --save title "The override block is updated" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/split/isolation/output.txt b/acceptance/bundle/config-remote-sync/split/isolation/output.txt index f8805d02358..22fe4019a1d 100644 --- a/acceptance/bundle/config-remote-sync/split/isolation/output.txt +++ b/acceptance/bundle/config-remote-sync/split/isolation/output.txt @@ -5,6 +5,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Rename the two-block task on job_a, and edit job_b in the same run + === Sync Detected changes in 2 resource(s): @@ -18,7 +19,6 @@ Resource: resources.jobs.job_b === job_b is updated, and job_a's rename is written in both blocks - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/isolation/script b/acceptance/bundle/config-remote-sync/split/isolation/script index b1320eed712..2e16744f0ca 100644 --- a/acceptance/bundle/config-remote-sync/split/isolation/script +++ b/acceptance/bundle/config-remote-sync/split/isolation/script @@ -27,12 +27,10 @@ r["max_concurrent_runs"] = 6 EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "job_b is updated, and job_a's rename is written in both blocks" -echo trace diff.py databricks.yml.backup databricks.yml trace grep -c "max_concurrent_runs: 6" databricks.yml trace grep -c "task_key: shared_renamed" databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/keyed_edit/output.txt b/acceptance/bundle/config-remote-sync/split/keyed_edit/output.txt index 7dd08e2e21c..e4da6e52701 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_edit/output.txt +++ b/acceptance/bundle/config-remote-sync/split/keyed_edit/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Edit alpha, defined only in the target block + === Sync Detected changes in 1 resource(s): @@ -13,7 +14,6 @@ Resource: resources.jobs.split_job === Only alpha in the target block gains timeout_seconds: 111 - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -23,6 +23,7 @@ Resource: resources.jobs.split_job + timeout_seconds: 111 === Edit mu, a top-level task that is not first after the merge sort + === Sync Detected changes in 1 resource(s): @@ -32,7 +33,6 @@ Resource: resources.jobs.split_job === Only mu in the top-level block gains timeout_seconds: 222 - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/keyed_edit/script b/acceptance/bundle/config-remote-sync/split/keyed_edit/script index dcfc1028455..dde2c705431 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_edit/script +++ b/acceptance/bundle/config-remote-sync/split/keyed_edit/script @@ -22,12 +22,10 @@ for task in r["tasks"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "Only alpha in the target block gains timeout_seconds: 111" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup @@ -43,11 +41,9 @@ for task in r["tasks"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "Only mu in the top-level block gains timeout_seconds: 222" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/split/keyed_remove/output.txt b/acceptance/bundle/config-remote-sync/split/keyed_remove/output.txt index 4a9d9bb6657..073e53f3f1e 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_remove/output.txt +++ b/acceptance/bundle/config-remote-sync/split/keyed_remove/output.txt @@ -5,6 +5,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Remove gamma from the top-level block and alpha from the target block + === Sync Detected changes in 1 resource(s): @@ -15,7 +16,6 @@ Resource: resources.jobs.remove_job === Exactly gamma and alpha are gone; beta survives - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -39,6 +39,7 @@ Resource: resources.jobs.remove_job tasks: === Remove the task defined in BOTH blocks + === Sync Detected changes in 1 resource(s): @@ -48,7 +49,6 @@ Resource: resources.jobs.twoblock_remove_job === 'both' is gone from both blocks; 'keep' survives - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/keyed_remove/script b/acceptance/bundle/config-remote-sync/split/keyed_remove/script index 73998fa670b..19a7b022d38 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_remove/script +++ b/acceptance/bundle/config-remote-sync/split/keyed_remove/script @@ -21,12 +21,10 @@ r["tasks"] = [t for t in r["tasks"] if t["task_key"] not in ("gamma", "alpha")] EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --select-ids "jobs:$remove_job_id" --save title "Exactly gamma and alpha are gone; beta survives" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup @@ -40,12 +38,10 @@ r["tasks"] = [t for t in r["tasks"] if t["task_key"] != "both"] EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --select-ids "jobs:$twoblock_job_id" --save title "'both' is gone from both blocks; 'keep' survives" -echo trace diff.py databricks.yml.backup databricks.yml # grep -c exits non-zero on a count of zero, which would abort the script under # bash -e before the second assertion runs. diff --git a/acceptance/bundle/config-remote-sync/split/keyed_rename/output.txt b/acceptance/bundle/config-remote-sync/split/keyed_rename/output.txt index 80194ffa904..56e98db2a4e 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_rename/output.txt +++ b/acceptance/bundle/config-remote-sync/split/keyed_rename/output.txt @@ -5,6 +5,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Rename a task defined in both blocks and a target-only task + === Sync Detected changes in 1 resource(s): @@ -17,7 +18,6 @@ Resource: resources.jobs.rename_job === Both blocks get the new key; each field keeps its own scope - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -46,6 +46,7 @@ Resource: resources.jobs.rename_job 1 === Remove a task and rename a later one in the same run, single block + === Sync Detected changes in 1 resource(s): @@ -57,7 +58,6 @@ Resource: resources.jobs.shift_job === aaa is gone, mmm became mmm2, zzz keeps its name and its max_retries - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -75,6 +75,7 @@ Resource: resources.jobs.shift_job 1 === Rename the two-block task AND edit one of its fields in the same run + === Sync Detected changes in 1 resource(s): @@ -86,7 +87,6 @@ Resource: resources.jobs.rename_job === Left unapplied: the split is intact and timeout_seconds stays target-scoped - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/keyed_rename/script b/acceptance/bundle/config-remote-sync/split/keyed_rename/script index 88b8106ed55..85969586574 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_rename/script +++ b/acceptance/bundle/config-remote-sync/split/keyed_rename/script @@ -26,12 +26,10 @@ for task in r["tasks"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "Both blocks get the new key; each field keeps its own scope" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "task_key: a_shared" databricks.yml errcode trace grep -c "task_key: z_solo" databricks.yml @@ -50,12 +48,10 @@ for task in r["tasks"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --select-ids "jobs:$shift_job_id" --save title "aaa is gone, mmm became mmm2, zzz keeps its name and its max_retries" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "task_key: zzz" databricks.yml rm databricks.yml.backup @@ -74,12 +70,10 @@ for task in r["tasks"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --select-ids "jobs:$job_id" --save title "Left unapplied: the split is intact and timeout_seconds stays target-scoped" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "task_key: a_shared" databricks.yml errcode trace grep -c "timeout_seconds: 45" databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/keyed_twoblock/output.txt b/acceptance/bundle/config-remote-sync/split/keyed_twoblock/output.txt index 6fde29887a5..355bb4c214c 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_twoblock/output.txt +++ b/acceptance/bundle/config-remote-sync/split/keyed_twoblock/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Edit omega, whose sibling is defined in two blocks + === Sync Detected changes in 1 resource(s): @@ -13,7 +14,6 @@ Resource: resources.jobs.twoblock_job === Only omega changes; shared is untouched in both blocks - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -23,6 +23,7 @@ Resource: resources.jobs.twoblock_job + timeout_seconds: 303 === Edit a field per block, a field defined in both, and add a new field + === Sync Detected changes in 1 resource(s): @@ -34,7 +35,6 @@ Resource: resources.jobs.twoblock_job === Each edit lands on the definition that was deployed - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/keyed_twoblock/script b/acceptance/bundle/config-remote-sync/split/keyed_twoblock/script index 2b7d8cf82ce..f5f93f19a2d 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_twoblock/script +++ b/acceptance/bundle/config-remote-sync/split/keyed_twoblock/script @@ -22,12 +22,10 @@ for task in r["tasks"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "Only omega changes; shared is untouched in both blocks" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup @@ -47,11 +45,9 @@ for task in r["tasks"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "Each edit lands on the definition that was deployed" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/split/multifile/output.txt b/acceptance/bundle/config-remote-sync/split/multifile/output.txt index de38bd589d1..e5ae749be03 100644 --- a/acceptance/bundle/config-remote-sync/split/multifile/output.txt +++ b/acceptance/bundle/config-remote-sync/split/multifile/output.txt @@ -4,6 +4,7 @@ Files: 6 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Edit a task defined in the second included file + === Sync Detected changes in 1 resource(s): @@ -13,15 +14,12 @@ Resource: resources.jobs.multifile_job === databricks.yml is untouched - >>> diff.py databricks.yml.backup databricks.yml === overrides/10-first.yml is untouched - >>> diff.py overrides/10-first.yml.backup overrides/10-first.yml === overrides/20-second.yml gains timeout_seconds: 777 - >>> diff.py overrides/20-second.yml.backup overrides/20-second.yml --- overrides/20-second.yml.backup +++ overrides/20-second.yml @@ -33,6 +31,7 @@ Resource: resources.jobs.multifile_job timeout_seconds: 30 === Edit one field per file on the task declared in both override files + === Sync Detected changes in 1 resource(s): @@ -43,7 +42,6 @@ Resource: resources.jobs.multifile_job === max_retries updates the first file, timeout_seconds the second - >>> diff.py overrides/10-first.yml.backup overrides/10-first.yml --- overrides/10-first.yml.backup +++ overrides/10-first.yml @@ -67,6 +65,7 @@ Resource: resources.jobs.multifile_job max_retries: 2 === Edit a field that both override files define + === Sync Detected changes in 1 resource(s): @@ -76,7 +75,6 @@ Resource: resources.jobs.multifile_job === The winning file is updated; the shadowed copy is left alone - >>> diff.py overrides/10-first.yml.backup overrides/10-first.yml >>> diff.py overrides/20-second.yml.backup overrides/20-second.yml diff --git a/acceptance/bundle/config-remote-sync/split/multifile/script b/acceptance/bundle/config-remote-sync/split/multifile/script index 4f82441d08e..de15de40b16 100644 --- a/acceptance/bundle/config-remote-sync/split/multifile/script +++ b/acceptance/bundle/config-remote-sync/split/multifile/script @@ -24,22 +24,18 @@ for task in r["tasks"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup cp overrides/10-first.yml overrides/10-first.yml.backup cp overrides/20-second.yml overrides/20-second.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "databricks.yml is untouched" -echo trace diff.py databricks.yml.backup databricks.yml title "overrides/10-first.yml is untouched" -echo trace diff.py overrides/10-first.yml.backup overrides/10-first.yml title "overrides/20-second.yml gains timeout_seconds: 777" -echo trace diff.py overrides/20-second.yml.backup overrides/20-second.yml rm databricks.yml.backup overrides/10-first.yml.backup overrides/20-second.yml.backup @@ -58,13 +54,11 @@ for task in r["tasks"]: EOF title "Sync" -echo cp overrides/10-first.yml overrides/10-first.yml.backup cp overrides/20-second.yml overrides/20-second.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "max_retries updates the first file, timeout_seconds the second" -echo trace diff.py overrides/10-first.yml.backup overrides/10-first.yml trace diff.py overrides/20-second.yml.backup overrides/20-second.yml rm overrides/10-first.yml.backup overrides/20-second.yml.backup @@ -80,13 +74,11 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp overrides/10-first.yml overrides/10-first.yml.backup cp overrides/20-second.yml overrides/20-second.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "The winning file is updated; the shadowed copy is left alone" -echo trace diff.py overrides/10-first.yml.backup overrides/10-first.yml trace diff.py overrides/20-second.yml.backup overrides/20-second.yml rm overrides/10-first.yml.backup overrides/20-second.yml.backup diff --git a/acceptance/bundle/config-remote-sync/split/nested_add_split_parent/output.txt b/acceptance/bundle/config-remote-sync/split/nested_add_split_parent/output.txt index 5b5a85fab57..22bacd005ab 100644 --- a/acceptance/bundle/config-remote-sync/split/nested_add_split_parent/output.txt +++ b/acceptance/bundle/config-remote-sync/split/nested_add_split_parent/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Add a task, then depend on it from the split task zzz_shared + === Sync Detected changes in 1 resource(s): @@ -14,7 +15,6 @@ Resource: resources.jobs.nested_add_job === The dependency lands on zzz_shared, in the block that defines it - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/nested_add_split_parent/script b/acceptance/bundle/config-remote-sync/split/nested_add_split_parent/script index cc23a266e2a..450b53fe199 100644 --- a/acceptance/bundle/config-remote-sync/split/nested_add_split_parent/script +++ b/acceptance/bundle/config-remote-sync/split/nested_add_split_parent/script @@ -15,11 +15,9 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "The dependency lands on zzz_shared, in the block that defines it" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "task_key: mid_new" databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/split/nested_sequence/output.txt b/acceptance/bundle/config-remote-sync/split/nested_sequence/output.txt index 0074cfeafce..f64b8f2d1ae 100644 --- a/acceptance/bundle/config-remote-sync/split/nested_sequence/output.txt +++ b/acceptance/bundle/config-remote-sync/split/nested_sequence/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Add a library to a task that is not first after the merge sort + === Sync Detected changes in 1 resource(s): @@ -13,7 +14,6 @@ Resource: resources.jobs.nested_job === The new library lands on the task that received it - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/nested_sequence/script b/acceptance/bundle/config-remote-sync/split/nested_sequence/script index 26d26468995..9946459a9e9 100644 --- a/acceptance/bundle/config-remote-sync/split/nested_sequence/script +++ b/acceptance/bundle/config-remote-sync/split/nested_sequence/script @@ -22,12 +22,10 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "The new library lands on the task that received it" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "pyyaml" databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/split/positional/output.txt b/acceptance/bundle/config-remote-sync/split/positional/output.txt index 9516f90baa0..bfa51509c65 100644 --- a/acceptance/bundle/config-remote-sync/split/positional/output.txt +++ b/acceptance/bundle/config-remote-sync/split/positional/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Edit num_workers on the top-level cluster and on the target cluster + === Sync Detected changes in 1 resource(s): @@ -14,7 +15,6 @@ Resource: resources.pipelines.split_pipeline === default updates top-level, maintenance updates the target block - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -32,6 +32,7 @@ Resource: resources.pipelines.split_pipeline + num_workers: 3 === Remove the target-block cluster (length change) + === Sync Detected changes in 1 resource(s): @@ -42,7 +43,6 @@ Resource: resources.pipelines.split_pipeline === The top-level cluster is untouched; the target entry is left as a remnant - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/positional/script b/acceptance/bundle/config-remote-sync/split/positional/script index fa7b1d54db1..2c7392cf9f2 100644 --- a/acceptance/bundle/config-remote-sync/split/positional/script +++ b/acceptance/bundle/config-remote-sync/split/positional/script @@ -23,12 +23,10 @@ for cluster in r["clusters"]: EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "default updates top-level, maintenance updates the target block" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup @@ -47,12 +45,10 @@ r["clusters"] = [c for c in r["clusters"] if c["label"] != "maintenance"] EOF title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "The top-level cluster is untouched; the target entry is left as a remnant" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "label: default" databricks.yml errcode trace grep -c "label: maintenance" databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/remove_field_both_blocks/output.txt b/acceptance/bundle/config-remote-sync/split/remove_field_both_blocks/output.txt index 83af06feaba..87c1ee28f47 100644 --- a/acceptance/bundle/config-remote-sync/split/remove_field_both_blocks/output.txt +++ b/acceptance/bundle/config-remote-sync/split/remove_field_both_blocks/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Remove max_retries, which both blocks define + === Sync Detected changes in 1 resource(s): @@ -13,7 +14,6 @@ Resource: resources.jobs.shared_field_job === Both copies must be gone, else the next deploy pushes the value back - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/remove_field_both_blocks/script b/acceptance/bundle/config-remote-sync/split/remove_field_both_blocks/script index 876cb123a51..c12803edb91 100644 --- a/acceptance/bundle/config-remote-sync/split/remove_field_both_blocks/script +++ b/acceptance/bundle/config-remote-sync/split/remove_field_both_blocks/script @@ -13,11 +13,9 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "Both copies must be gone, else the next deploy pushes the value back" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "max_retries" databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/split/remove_with_unrelated_add/output.txt b/acceptance/bundle/config-remote-sync/split/remove_with_unrelated_add/output.txt index 0da6b78b7d9..16794e9c1ca 100644 --- a/acceptance/bundle/config-remote-sync/split/remove_with_unrelated_add/output.txt +++ b/acceptance/bundle/config-remote-sync/split/remove_with_unrelated_add/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Remove the two-block task AND add an unrelated new task in one run + === Sync Detected changes in 1 resource(s): @@ -14,7 +15,6 @@ Resource: resources.jobs.unrelated_add_job === brand_new is added even though the removal of shared was held back - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/remove_with_unrelated_add/script b/acceptance/bundle/config-remote-sync/split/remove_with_unrelated_add/script index 26f73be2078..c3e29f130dd 100644 --- a/acceptance/bundle/config-remote-sync/split/remove_with_unrelated_add/script +++ b/acceptance/bundle/config-remote-sync/split/remove_with_unrelated_add/script @@ -15,11 +15,9 @@ r["tasks"].append({"task_key": "brand_new", "max_retries": 9, PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "brand_new is added even though the removal of shared was held back" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "task_key: brand_new" databricks.yml errcode trace grep -c "task_key: keep" databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/rename_ambiguous_pairing/output.txt b/acceptance/bundle/config-remote-sync/split/rename_ambiguous_pairing/output.txt index de185fb52ca..25dd0d53c4f 100644 --- a/acceptance/bundle/config-remote-sync/split/rename_ambiguous_pairing/output.txt +++ b/acceptance/bundle/config-remote-sync/split/rename_ambiguous_pairing/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === alpha (top-level) -> zzz and beta (target block) -> aaa, bodies identical + === Sync Detected changes in 1 resource(s): @@ -16,7 +17,6 @@ Resource: resources.jobs.ambiguous_rename_job === Neither rename is applied, and both blocks keep their own task - >>> diff.py databricks.yml.backup databricks.yml >>> grep -c task_key: alpha databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/rename_ambiguous_pairing/script b/acceptance/bundle/config-remote-sync/split/rename_ambiguous_pairing/script index 4d4d0bc5972..f64fba40450 100644 --- a/acceptance/bundle/config-remote-sync/split/rename_ambiguous_pairing/script +++ b/acceptance/bundle/config-remote-sync/split/rename_ambiguous_pairing/script @@ -17,11 +17,9 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "Neither rename is applied, and both blocks keep their own task" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c "task_key: alpha" databricks.yml errcode trace grep -c "task_key: beta" databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/rename_ambiguous_single_block/output.txt b/acceptance/bundle/config-remote-sync/split/rename_ambiguous_single_block/output.txt index 284fdae5f88..0359dbf6431 100644 --- a/acceptance/bundle/config-remote-sync/split/rename_ambiguous_single_block/output.txt +++ b/acceptance/bundle/config-remote-sync/split/rename_ambiguous_single_block/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Rename alpha -> zzz and beta -> aaa, and point gamma at the new keys + === Sync Detected changes in 1 resource(s): @@ -20,7 +21,6 @@ Resource: resources.jobs.ambiguous_single_block_job === Both renames apply and depends_on follows them - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/rename_ambiguous_single_block/script b/acceptance/bundle/config-remote-sync/split/rename_ambiguous_single_block/script index ffbbfc09eab..f00c30c8d1e 100644 --- a/acceptance/bundle/config-remote-sync/split/rename_ambiguous_single_block/script +++ b/acceptance/bundle/config-remote-sync/split/rename_ambiguous_single_block/script @@ -19,12 +19,10 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync --save title "Both renames apply and depends_on follows them" -echo trace diff.py databricks.yml.backup databricks.yml echo echo "=== Checking for old task keys (should be gone if renames applied):" diff --git a/acceptance/bundle/config-remote-sync/split/rename_two_removes_one_add/output.txt b/acceptance/bundle/config-remote-sync/split/rename_two_removes_one_add/output.txt index 4bec8863fd6..fe793f5d64e 100644 --- a/acceptance/bundle/config-remote-sync/split/rename_two_removes_one_add/output.txt +++ b/acceptance/bundle/config-remote-sync/split/rename_two_removes_one_add/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Two identical tasks, one in each block; DELETE one (remote), RENAME the other + === Sync Detected changes in 1 resource(s): @@ -15,7 +16,6 @@ Resource: resources.jobs.two_removes_job === Neither block is rewritten: the pairing is not forced - >>> diff.py databricks.yml.backup databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/rename_two_removes_one_add/script b/acceptance/bundle/config-remote-sync/split/rename_two_removes_one_add/script index 045fec9922e..fd39ffc836c 100644 --- a/acceptance/bundle/config-remote-sync/split/rename_two_removes_one_add/script +++ b/acceptance/bundle/config-remote-sync/split/rename_two_removes_one_add/script @@ -22,12 +22,10 @@ r["tasks"] = new_tasks PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "Neither block is rewritten: the pairing is not forced" -echo trace diff.py databricks.yml.backup databricks.yml echo title "Both tasks keep their original keys, and no new key was written" diff --git a/acceptance/bundle/config-remote-sync/split/target_variable/output.txt b/acceptance/bundle/config-remote-sync/split/target_variable/output.txt index 0fe0a2d21a8..d6b53d66aff 100644 --- a/acceptance/bundle/config-remote-sync/split/target_variable/output.txt +++ b/acceptance/bundle/config-remote-sync/split/target_variable/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Rename the notebook inside a target-block field that uses a variable + === Sync Detected changes in 1 resource(s): @@ -13,7 +14,6 @@ Resource: resources.jobs.var_job === zzz keeps its own variable, and aaa is untouched - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/target_variable/script b/acceptance/bundle/config-remote-sync/split/target_variable/script index da7ff428244..ed2138e1920 100644 --- a/acceptance/bundle/config-remote-sync/split/target_variable/script +++ b/acceptance/bundle/config-remote-sync/split/target_variable/script @@ -22,12 +22,10 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync -t dev --save title "zzz keeps its own variable, and aaa is untouched" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c 'var.dev_dir' databricks.yml errcode trace grep -c 'var.shared_dir' databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/variable_file_order/output.txt b/acceptance/bundle/config-remote-sync/split/variable_file_order/output.txt index 2850f34c624..026486177b5 100644 --- a/acceptance/bundle/config-remote-sync/split/variable_file_order/output.txt +++ b/acceptance/bundle/config-remote-sync/split/variable_file_order/output.txt @@ -4,6 +4,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Edit aaa, whose file position differs from its merged position + === Sync Detected changes in 1 resource(s): @@ -13,7 +14,6 @@ Resource: resources.jobs.file_order_job === aaa keeps its own variable reference - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/split/variable_file_order/script b/acceptance/bundle/config-remote-sync/split/variable_file_order/script index b2e2b1d236f..f263d89c191 100644 --- a/acceptance/bundle/config-remote-sync/split/variable_file_order/script +++ b/acceptance/bundle/config-remote-sync/split/variable_file_order/script @@ -13,11 +13,9 @@ for task in r["tasks"]: PYEDIT title "Sync" -echo cp databricks.yml databricks.yml.backup errcode $CLI bundle config-remote-sync --save title "aaa keeps its own variable reference" -echo trace diff.py databricks.yml.backup databricks.yml errcode trace grep -c 'var.aaa_dir' databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/target_override/output.txt b/acceptance/bundle/config-remote-sync/target_override/output.txt index 4919594b609..b84f0b5739c 100644 --- a/acceptance/bundle/config-remote-sync/target_override/output.txt +++ b/acceptance/bundle/config-remote-sync/target_override/output.txt @@ -4,6 +4,7 @@ Files: 3 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Modify fields in target override + === Detect and save changes Detected changes in 1 resource(s): @@ -15,7 +16,6 @@ Resource: resources.jobs.my_job === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/target_override/script b/acceptance/bundle/config-remote-sync/target_override/script index 671eb75ed23..85dddc9d19d 100755 --- a/acceptance/bundle/config-remote-sync/target_override/script +++ b/acceptance/bundle/config-remote-sync/target_override/script @@ -20,11 +20,9 @@ r["tags"]["owner"] = "data-team" EOF title "Detect and save changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync -t dev --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/task_rename_revert/script b/acceptance/bundle/config-remote-sync/task_rename_revert/script index a01c1196de6..a7b7c86e0b2 100644 --- a/acceptance/bundle/config-remote-sync/task_rename_revert/script +++ b/acceptance/bundle/config-remote-sync/task_rename_revert/script @@ -11,7 +11,6 @@ $CLI bundle deploy job_id="$(read_id.py sample_job)" title "Rename task to new_task_2 remotely" -echo edit_resource.py jobs $job_id <>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml diff --git a/acceptance/bundle/config-remote-sync/validation_errors/script b/acceptance/bundle/config-remote-sync/validation_errors/script index 828ec206445..e2122145147 100644 --- a/acceptance/bundle/config-remote-sync/validation_errors/script +++ b/acceptance/bundle/config-remote-sync/validation_errors/script @@ -38,11 +38,9 @@ rm -rf pipeline_root src title "Sync with broken local paths" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup diff --git a/acceptance/bundle/config-remote-sync/variable_reference_parent/output.txt b/acceptance/bundle/config-remote-sync/variable_reference_parent/output.txt index a4eac5ef990..6b9bf368ff6 100644 --- a/acceptance/bundle/config-remote-sync/variable_reference_parent/output.txt +++ b/acceptance/bundle/config-remote-sync/variable_reference_parent/output.txt @@ -17,7 +17,6 @@ Resource: resources.jobs.my_job === Configuration changes - >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml @@ -30,7 +29,6 @@ Resource: resources.jobs.my_job - job_cluster_key: shared === Telemetry - >>> cat [OUTPUT_DIR]/out.requests.txt { "save": true, diff --git a/acceptance/bundle/config-remote-sync/variable_reference_parent/script b/acceptance/bundle/config-remote-sync/variable_reference_parent/script index 00347b093f6..c4c34d59b0f 100644 --- a/acceptance/bundle/config-remote-sync/variable_reference_parent/script +++ b/acceptance/bundle/config-remote-sync/variable_reference_parent/script @@ -13,7 +13,6 @@ $CLI bundle deploy job_id="$(read_id.py my_job)" title "Inject a spark_conf key under a field defined as a complex variable" -echo echo "spark_conf is set to a variable reference, so a remotely-added key cannot be" echo "written into that scalar node; the change is skipped while unrelated edits still sync." edit_resource.py jobs $job_id <<'EOF' @@ -24,17 +23,14 @@ for jc in r.get("job_clusters", []): EOF title "Detect and save all changes" -echo cp databricks.yml databricks.yml.backup $CLI bundle config-remote-sync --save title "Configuration changes" -echo trace diff.py databricks.yml.backup databricks.yml rm databricks.yml.backup title "Telemetry" -echo # The engine name is dropped because both EnvMatrix variants share this output. # skipped_changes_count reflects the spark_conf change skipped under a variable reference. trace cat "$OUT_REQUESTS" | jq 'select(has("path") and .path == "/telemetry-ext") | .body.protoLogs[] | fromjson | .entry.databricks_cli_log.bundle_config_remote_sync_event | select(. != null) | del(.engine)' diff --git a/acceptance/bundle/debug/fetch-repository-info/output.txt b/acceptance/bundle/debug/fetch-repository-info/output.txt index 2c4a60db972..967c2ba9f35 100644 --- a/acceptance/bundle/debug/fetch-repository-info/output.txt +++ b/acceptance/bundle/debug/fetch-repository-info/output.txt @@ -1,6 +1,5 @@ === the root of a Git folder under /Repos - >>> [CLI] bundle debug fetch-repository-info --path /Workspace/Repos/[USERNAME]/test-repo-[UNIQUE_NAME] { "worktree_root": "/Workspace/Repos/[USERNAME]/test-repo-[UNIQUE_NAME]", @@ -10,7 +9,6 @@ } === a subdirectory of it, which resolves to the same root - >>> [CLI] bundle debug fetch-repository-info --path /Workspace/Repos/[USERNAME]/test-repo-[UNIQUE_NAME]/subdir { "worktree_root": "/Workspace/Repos/[USERNAME]/test-repo-[UNIQUE_NAME]", @@ -20,7 +18,6 @@ } === the root of a Git folder outside /Repos - >>> [CLI] bundle debug fetch-repository-info --path /Workspace/Users/[USERNAME]/test-folder-[UNIQUE_NAME] { "worktree_root": "/Workspace/Users/[USERNAME]/test-folder-[UNIQUE_NAME]", @@ -30,7 +27,6 @@ } === a path in no Git folder at all - >>> [CLI] bundle debug fetch-repository-info --path /Workspace/Users/[USERNAME] { "worktree_root": "", diff --git a/acceptance/bundle/debug/fetch-repository-info/script b/acceptance/bundle/debug/fetch-repository-info/script index 6f69b821a9b..abe6ff9e072 100644 --- a/acceptance/bundle/debug/fetch-repository-info/script +++ b/acceptance/bundle/debug/fetch-repository-info/script @@ -20,14 +20,14 @@ cleanup() { } trap cleanup EXIT -title "the root of a Git folder under /Repos\n" +title "the root of a Git folder under /Repos" trace $CLI bundle debug fetch-repository-info --path "$repo" -title "a subdirectory of it, which resolves to the same root\n" +title "a subdirectory of it, which resolves to the same root" trace $CLI bundle debug fetch-repository-info --path "$repo/subdir" -title "the root of a Git folder outside /Repos\n" +title "the root of a Git folder outside /Repos" trace $CLI bundle debug fetch-repository-info --path "$folder" -title "a path in no Git folder at all\n" +title "a path in no Git folder at all" trace $CLI bundle debug fetch-repository-info --path "/Workspace/Users/$CURRENT_USER_NAME" diff --git a/acceptance/bundle/deploy/force-lock-config/output.txt b/acceptance/bundle/deploy/force-lock-config/output.txt index 222e4c4dc6c..be70f761c86 100644 --- a/acceptance/bundle/deploy/force-lock-config/output.txt +++ b/acceptance/bundle/deploy/force-lock-config/output.txt @@ -1,5 +1,6 @@ === upload a stale lock file held by another user + >>> [CLI] workspace import /Workspace/Users/[USERNAME]/.bundle/test-bundle-force-lock/default/state/deploy.lock --format AUTO --file ./deploy.lock === bundle.deployment.lock.force is set in databricks.yml, so the stale lock is overridden diff --git a/acceptance/bundle/deploy/immutable-permissions-change/output.txt b/acceptance/bundle/deploy/immutable-permissions-change/output.txt index 7e45089b269..25f7a8f989d 100644 --- a/acceptance/bundle/deploy/immutable-permissions-change/output.txt +++ b/acceptance/bundle/deploy/immutable-permissions-change/output.txt @@ -8,6 +8,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged First snapshot path: /Workspace/Users/[UUID]/.snapshots/[SNAPSHOT_HASH]/[SNAPSHOT_HASH]/files/src/main.py === Add permissions and redeploy + >>> [CLI] bundle deploy Recommendation: permissions section should explicitly include the current deployment identity '[USERNAME]' or one of its groups If it is not included, CAN_MANAGE permissions are only applied if the present identity is used to deploy. @@ -21,9 +22,9 @@ Consider using a adding a top-level permissions section such as the following: See https://docs.databricks.com/dev-tools/bundles/permissions.html to learn more about permission configuration. in databricks.yml:22:3 +Created jobs.my_job.permissions Recreated internal_immutable_snapshots.immutable Updated jobs.my_job -Created jobs.my_job.permissions Files: 0 uploaded, 0 deleted Resources: 2 created, 1 changed, 1 deleted, 0 unchanged Second snapshot path: /Workspace/Users/[UUID]/.snapshots/[SNAPSHOT_HASH]/[SNAPSHOT_HASH]/files/src/main.py diff --git a/acceptance/bundle/deploy/immutable-permissions-change/script b/acceptance/bundle/deploy/immutable-permissions-change/script index 458bfdd2c85..bc7ed87cbbb 100644 --- a/acceptance/bundle/deploy/immutable-permissions-change/script +++ b/acceptance/bundle/deploy/immutable-permissions-change/script @@ -26,7 +26,6 @@ SNAPSHOT_PATH_2=$($CLI jobs get "$JOB_ID" | jq -r '.settings.tasks[0].spark_pyth echo "Second snapshot path: $SNAPSHOT_PATH_2" title "Verify snapshot path changed after permissions change" -echo "" if [ "$SNAPSHOT_PATH_1" = "$SNAPSHOT_PATH_2" ]; then echo "ERROR: snapshot path did not change after permissions were added" exit 1 diff --git a/acceptance/bundle/deploy/immutable/output.txt b/acceptance/bundle/deploy/immutable/output.txt index 56de6c28d57..34c47b6102d 100644 --- a/acceptance/bundle/deploy/immutable/output.txt +++ b/acceptance/bundle/deploy/immutable/output.txt @@ -169,7 +169,8 @@ Updated jobs.my_job Files: 0 uploaded, 0 deleted Resources: 1 created, 1 changed, 1 deleted, 0 unchanged -=== Check that job uses a new snapshot: Snapshot changed as expected +=== Check that job uses a new snapshot: +Snapshot changed as expected >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/deploy/mlops-stacks/script b/acceptance/bundle/deploy/mlops-stacks/script index f69ef7c9fca..d44833c8d5a 100644 --- a/acceptance/bundle/deploy/mlops-stacks/script +++ b/acceptance/bundle/deploy/mlops-stacks/script @@ -46,6 +46,6 @@ trace $CLI bundle deploy --var catalog_name=main trace $CLI bundle summary --var catalog_name=main -o json | jq -r '{experiment_id: .resources.experiments.experiment.id, model_id: .resources.registered_models.model.id, inference_job_id: .resources.jobs.batch_inference_job.id, training_job_id: .resources.jobs.model_training_job.id}' -title "Assert the batch inference job actually exists\n" +title "Assert the batch inference job actually exists" JOB_ID=$($CLI bundle summary --var catalog_name=main -o json | jq -r '.resources.jobs.batch_inference_job.id') $CLI jobs get "${JOB_ID}" | jq '{name: .settings.name}' diff --git a/acceptance/bundle/deploy/readplan/whl-upload/output.txt b/acceptance/bundle/deploy/readplan/whl-upload/output.txt index 48212c57e37..927371a8943 100644 --- a/acceptance/bundle/deploy/readplan/whl-upload/output.txt +++ b/acceptance/bundle/deploy/readplan/whl-upload/output.txt @@ -25,6 +25,7 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 1 deleted === bundle deploy --plan also uploads the wheel + >>> [CLI] bundle deploy --plan tmp.plan.json Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl... Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/whl-upload/default/files... diff --git a/acceptance/bundle/deploy/resource-max-wait-zero/output.txt b/acceptance/bundle/deploy/resource-max-wait-zero/output.txt index 1f379a5692e..9cffd3182fd 100644 --- a/acceptance/bundle/deploy/resource-max-wait-zero/output.txt +++ b/acceptance/bundle/deploy/resource-max-wait-zero/output.txt @@ -1,5 +1,6 @@ === Zero cap: the create wait is skipped entirely + >>> DATABRICKS_BUNDLE_RESOURCE_MAX_WAIT=0 [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Warn: deploying resources.clusters.my_cluster: Not waiting for creation of resources.clusters.my_cluster (DATABRICKS_BUNDLE_RESOURCE_MAX_WAIT=0); it may still be in progress @@ -19,6 +20,7 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 1 deleted === No cap: the deployment polls until the cluster is RUNNING + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Created clusters.my_cluster diff --git a/acceptance/bundle/deploy/snapshot-comparison/output.txt b/acceptance/bundle/deploy/snapshot-comparison/output.txt index 50ed1f70bed..8ebf1a6b7e3 100644 --- a/acceptance/bundle/deploy/snapshot-comparison/output.txt +++ b/acceptance/bundle/deploy/snapshot-comparison/output.txt @@ -1,5 +1,6 @@ === Deploy bundle 1 with terraform + >>> DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/snapshot-test-1-[UNIQUE_NAME]/default/files... Created jobs.test_job @@ -8,6 +9,7 @@ Files: 3 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Run migrate on bundle 1 + >>> [CLI] bundle deployment migrate Success! Migrated 2 resources to direct engine state file: [TEST_TMP_DIR]/bundle1/.databricks/bundle/default/resources.json @@ -19,6 +21,7 @@ To undo the migration, remove [TEST_TMP_DIR]/bundle1/.databricks/bundle/default/ === Deploy bundle 2 with terraform and YamlSync + >>> DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=true DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/snapshot-test-2-[UNIQUE_NAME]/default/files... Created jobs.test_job diff --git a/acceptance/bundle/deploy/wal/crash-after-create/output.txt b/acceptance/bundle/deploy/wal/crash-after-create/output.txt index 56822d5fbc0..44c6f3c02e3 100644 --- a/acceptance/bundle/deploy/wal/crash-after-create/output.txt +++ b/acceptance/bundle/deploy/wal/crash-after-create/output.txt @@ -51,6 +51,7 @@ Exit code: [KILLED] } === Any other command recovers state + >>> assert_exists.py .databricks/bundle/default/resources.json >>> assert_not_exists.py .databricks/bundle/default/resources.json.wal diff --git a/acceptance/bundle/deployment/bind/experiment/output.txt b/acceptance/bundle/deployment/bind/experiment/output.txt index 1273ca405fb..db6f14ebd4c 100644 --- a/acceptance/bundle/deployment/bind/experiment/output.txt +++ b/acceptance/bundle/deployment/bind/experiment/output.txt @@ -28,4 +28,6 @@ Destroy: 0 deleted } === Test cleanup: -=== Delete the pre-defined experiment: 0 + +=== Delete the pre-defined experiment: +0 diff --git a/acceptance/bundle/deployment/bind/job/generate-and-bind/script b/acceptance/bundle/deployment/bind/job/generate-and-bind/script index a1f6e2c34e2..2637324d423 100644 --- a/acceptance/bundle/deployment/bind/job/generate-and-bind/script +++ b/acceptance/bundle/deployment/bind/job/generate-and-bind/script @@ -1,4 +1,4 @@ -title "Create a pre-defined job:\n" +title "Create a pre-defined job:" PYTHON_NOTEBOOK_DIR="/Workspace/Users/${CURRENT_USER_NAME}/python-${UNIQUE_NAME}" PYTHON_NOTEBOOK="${PYTHON_NOTEBOOK_DIR}/test" diff --git a/acceptance/bundle/deployment/bind/job/job-abort-bind/output.txt b/acceptance/bundle/deployment/bind/job/job-abort-bind/output.txt index ee76570eda9..2e0fdd687a2 100644 --- a/acceptance/bundle/deployment/bind/job/job-abort-bind/output.txt +++ b/acceptance/bundle/deployment/bind/job/job-abort-bind/output.txt @@ -33,4 +33,5 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } } -=== Delete the pre-defined job [JOB_ID]:0 +=== Delete the pre-defined job [JOB_ID]: +0 diff --git a/acceptance/bundle/deployment/bind/job/job-abort-bind/script b/acceptance/bundle/deployment/bind/job/job-abort-bind/script index 57a9c5e57d8..63aedd7f285 100644 --- a/acceptance/bundle/deployment/bind/job/job-abort-bind/script +++ b/acceptance/bundle/deployment/bind/job/job-abort-bind/script @@ -1,6 +1,6 @@ cp -r $TESTDIR/../job-spark-python-task/hello_world.py . -title "Create a pre-defined job:\n" +title "Create a pre-defined job:" PYTHON_FILE="/Workspace/Users/${CURRENT_USER_NAME}/initial_hello_world.py" @@ -34,7 +34,7 @@ cleanup() { } trap cleanup EXIT -title "Expect binding to fail without an auto-approve flag:\n" +title "Expect binding to fail without an auto-approve flag:" trace errcode $CLI bundle deployment bind foo $JOB_ID &> out.bind-result.txt sed -n '/^Error:/,$p' out.bind-result.txt rm out.bind-result.txt diff --git a/acceptance/bundle/deployment/bind/job/job-spark-python-task/output.txt b/acceptance/bundle/deployment/bind/job/job-spark-python-task/output.txt index ad9b242ac44..02ede89f82b 100644 --- a/acceptance/bundle/deployment/bind/job/job-spark-python-task/output.txt +++ b/acceptance/bundle/deployment/bind/job/job-spark-python-task/output.txt @@ -63,4 +63,5 @@ Destroy: 0 deleted } } -=== Delete the pre-defined job [NUMID]:0 +=== Delete the pre-defined job [NUMID]: +0 diff --git a/acceptance/bundle/deployment/bind/job/job-spark-python-task/script b/acceptance/bundle/deployment/bind/job/job-spark-python-task/script index c0831899416..5e518955919 100644 --- a/acceptance/bundle/deployment/bind/job/job-spark-python-task/script +++ b/acceptance/bundle/deployment/bind/job/job-spark-python-task/script @@ -1,4 +1,4 @@ -title "Create a pre-defined job:\n" +title "Create a pre-defined job:" PYTHON_FILE="/Workspace/Users/${CURRENT_USER_NAME}/initial_hello_world.py" diff --git a/acceptance/bundle/deployment/bind/job/stale-state/output.txt b/acceptance/bundle/deployment/bind/job/stale-state/output.txt index de95b53685f..6676b5337e8 100644 --- a/acceptance/bundle/deployment/bind/job/stale-state/output.txt +++ b/acceptance/bundle/deployment/bind/job/stale-state/output.txt @@ -7,15 +7,19 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Step 2: Save stale local state (has only job_1, serial=1) + === Step 3: Add job_2 to config and deploy again + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/stale_state_test/default/files... Created jobs.job_2 Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 1 unchanged -=== Step 4: Record deployed job_2 ID from stateDeployed job_2 ID: [JOB_2_ID] +=== Step 4: Record deployed job_2 ID from state +Deployed job_2 ID: [JOB_2_ID] === Step 5: Restore stale local state (only job_1, serial=1) + === Step 6: Create external job and try to bind (should fail: remote state already has job_2) External job ID: [EXTERNAL_JOB_ID] diff --git a/acceptance/bundle/deployment/bind/job/stale-state/script b/acceptance/bundle/deployment/bind/job/stale-state/script index d28179f7ed9..53c61abdbb7 100755 --- a/acceptance/bundle/deployment/bind/job/stale-state/script +++ b/acceptance/bundle/deployment/bind/job/stale-state/script @@ -20,7 +20,7 @@ echo "Deployed job_2 ID: $(read_id.py job_2)" title "Step 5: Restore stale local state (only job_1, serial=1)" cp stale_state.json "$state_file" -title "Step 6: Create external job and try to bind (should fail: remote state already has job_2)\n" +title "Step 6: Create external job and try to bind (should fail: remote state already has job_2)" job_id=$($CLI jobs create --json '{"name": "External Job"}' | jq -r '.job_id') add_repl "$job_id" EXTERNAL_JOB_ID echo "External job ID: $job_id" diff --git a/acceptance/bundle/deployment/bind/schema/output.txt b/acceptance/bundle/deployment/bind/schema/output.txt index 89ab1f23437..a7ec28c5106 100644 --- a/acceptance/bundle/deployment/bind/schema/output.txt +++ b/acceptance/bundle/deployment/bind/schema/output.txt @@ -1,35 +1,46 @@ === Bind schema test: + === Substitute variables in the template: -=== Create a pre-defined schema: { + +=== Create a pre-defined schema: +{ "full_name": "main.test-schema-[UUID]", "catalog_name": "main" } -=== Bind schema: Successfully bound schema with an id 'main.test-schema-[UUID]' +=== Bind schema: +Successfully bound schema with an id 'main.test-schema-[UUID]' Run 'bundle deploy' to deploy changes to your workspace -=== Deploy bundle: Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... +=== Deploy bundle: +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... Updated schemas.schema1 Files: 2 uploaded, 0 deleted Resources: 0 created, 1 changed, 0 deleted, 0 unchanged -=== Read the pre-defined schema: { +=== Read the pre-defined schema: +{ "full_name": "main.test-schema-[UUID]", "catalog_name": "main", "comment": "This schema was created from DABs" } === Unbind the schema: -=== Destroy the bundle: All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +=== Destroy the bundle: +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default Destroy: 0 deleted -=== Read the pre-defined schema again (expecting it still exists): { +=== Read the pre-defined schema again (expecting it still exists): +{ "full_name": "main.test-schema-[UUID]", "catalog_name": "main", "comment": "This schema was created from DABs" } === Test cleanup: -=== Delete the pre-defined schema test-schema-[UUID]: 0 + +=== Delete the pre-defined schema test-schema-[UUID]: +0 diff --git a/acceptance/bundle/deployment/bind/volume/output.txt b/acceptance/bundle/deployment/bind/volume/output.txt index c71865859f3..89509ef00a8 100644 --- a/acceptance/bundle/deployment/bind/volume/output.txt +++ b/acceptance/bundle/deployment/bind/volume/output.txt @@ -6,6 +6,7 @@ } === Create a pre-defined volume: + >>> [CLI] bundle deployment bind volume1 main.test-schema-[UNIQUE_NAME].volume-[UNIQUE_NAME] --auto-approve Successfully bound volume with an id 'main.test-schema-[UNIQUE_NAME].volume-[UNIQUE_NAME]' Run 'bundle deploy' to deploy changes to your workspace diff --git a/acceptance/bundle/destroy/force-lock-node-limit/output.txt b/acceptance/bundle/destroy/force-lock-node-limit/output.txt index 8226b36d367..9f610b9ab58 100644 --- a/acceptance/bundle/destroy/force-lock-node-limit/output.txt +++ b/acceptance/bundle/destroy/force-lock-node-limit/output.txt @@ -7,6 +7,7 @@ Files: 1 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === destroy without --force-lock (lock write hits the node limit: aborts) + >>> errcode [CLI] bundle destroy --auto-approve Error: Failed to acquire deployment lock: access denied: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock Error: Failed to update, encountered possible permission error: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state @@ -20,6 +21,7 @@ Please refer to https://docs.databricks.com/dev-tools/bundles/permissions.html f Exit code: 1 === destroy with --force-lock (tolerates the node limit: proceeds and completes) + >>> [CLI] bundle destroy --force-lock --auto-approve Warn: Proceeding with destroy without a deployment lock: access denied: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock The following resources will be deleted: diff --git a/acceptance/bundle/destroy/jobs-and-pipeline/output.txt b/acceptance/bundle/destroy/jobs-and-pipeline/output.txt index 7946483f010..b4363494180 100644 --- a/acceptance/bundle/destroy/jobs-and-pipeline/output.txt +++ b/acceptance/bundle/destroy/jobs-and-pipeline/output.txt @@ -20,6 +20,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === Assert the pipeline is created + >>> [CLI] pipelines get [UUID] { "spec": { @@ -73,7 +74,6 @@ Error: Job [NUMID] does not exist. Exit code: 1 === Assert destroy leaves the bundle state dir clean: - >>> find .databricks -name terraform -prune -o -print .databricks .databricks/.gitignore diff --git a/acceptance/bundle/destroy/jobs-and-pipeline/script b/acceptance/bundle/destroy/jobs-and-pipeline/script index 95b093e851e..8a6a80cd7c0 100644 --- a/acceptance/bundle/destroy/jobs-and-pipeline/script +++ b/acceptance/bundle/destroy/jobs-and-pipeline/script @@ -11,7 +11,7 @@ cleanup() { title "Assert pipeline is deleted" trace errcode $CLI pipelines get "${PIPELINE_ID}" - title "Assert job is deleted:\n" + title "Assert job is deleted:" errcode $CLI jobs get "${JOB_ID}" 2>&1 # Print the whole state tree so a lingering snapshot file or an empty scaffolding @@ -19,7 +19,7 @@ cleanup() { # pruned: its contents differ by engine and embed the provider version and OS/arch, # which would make the golden fragile. The bundle scaffolding we care about lives # directly under the target dir, so it is still covered. - title "Assert destroy leaves the bundle state dir clean:\n" + title "Assert destroy leaves the bundle state dir clean:" trace find .databricks -name terraform -prune -o -print | sort title "Assert bundle deployment path is deleted" @@ -27,7 +27,7 @@ cleanup() { } trap cleanup EXIT -title "Assert the snapshot file does not exist:\n" +title "Assert the snapshot file does not exist:" if [[ ! -d ".databricks/bundle/default/sync-snapshots" ]]; then echo "Directory does not exist" else @@ -46,6 +46,6 @@ title "Assert the pipeline is created" PIPELINE_ID=$($CLI bundle summary -o json | jq -r '.resources.pipelines.bar.id') trace $CLI pipelines get "${PIPELINE_ID}" | nostamp | jq "{spec}" -title "Assert the job is created:\n" +title "Assert the job is created:" JOB_ID=$($CLI bundle summary -o json | jq -r '.resources.jobs.foo.id') $CLI jobs get "${JOB_ID}" | jq '{name: .settings.name}' diff --git a/acceptance/bundle/destroy/lineage-mismatch-after-redeploy/output.txt b/acceptance/bundle/destroy/lineage-mismatch-after-redeploy/output.txt index 849e97605a2..a9e269de236 100644 --- a/acceptance/bundle/destroy/lineage-mismatch-after-redeploy/output.txt +++ b/acceptance/bundle/destroy/lineage-mismatch-after-redeploy/output.txt @@ -1,6 +1,5 @@ === Machine A: deploy, then destroy - >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lineage-mismatch-after-redeploy/default/files... Created jobs.test_job @@ -16,11 +15,9 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 1 deleted === A clean destroy removes the local state file, so no stale lineage is left behind: - >>> find.py ^.databricks/bundle/default/(resources.json|terraform/terraform.tfstate)$ --expect 0 === and leaves the bundle state dir clean, with no empty scaffolding directories: - >>> find .databricks -name terraform -prune -o -print .databricks .databricks/.gitignore @@ -29,7 +26,6 @@ Destroy: 1 deleted .databricks/bundle/default/deployment.json === Machine B: fresh deploy of the same bundle (mints a new lineage L2 remotely) - >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lineage-mismatch-after-redeploy/default/files... Created jobs.test_job @@ -37,7 +33,6 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Machine A with a lingering local state: any command that pulls remote state now fails - >>> musterr [CLI] bundle plan Error: lineage mismatch in state files diff --git a/acceptance/bundle/destroy/lineage-mismatch-after-redeploy/script b/acceptance/bundle/destroy/lineage-mismatch-after-redeploy/script index f8139fab31e..9e15b16b51a 100644 --- a/acceptance/bundle/destroy/lineage-mismatch-after-redeploy/script +++ b/acceptance/bundle/destroy/lineage-mismatch-after-redeploy/script @@ -8,7 +8,7 @@ # state is deleted), the lingering local lineage no longer matches the new one a fresh # redeploy mints, and every command that pulls remote state fails. Cover both cases. -title "Machine A: deploy, then destroy\n" +title "Machine A: deploy, then destroy" trace $CLI bundle deploy # Snapshot machine A's local state (lineage L1) while it exists, so the lingering-state @@ -19,7 +19,7 @@ cp -r .databricks .databricks.machineA trace $CLI bundle destroy --auto-approve -title "A clean destroy removes the local state file, so no stale lineage is left behind:\n" +title "A clean destroy removes the local state file, so no stale lineage is left behind:" trace find.py '^.databricks/bundle/default/(resources.json|terraform/terraform.tfstate)$' --expect 0 # Print the whole state tree so any empty scaffolding dir or stray file shows up. The @@ -27,13 +27,13 @@ trace find.py '^.databricks/bundle/default/(resources.json|terraform/terraform.t # version and OS/arch, which would make the golden fragile (the state file it holds is # already asserted gone above). The bundle scaffolding we care about lives directly # under the target dir, so it is still covered. -title "and leaves the bundle state dir clean, with no empty scaffolding directories:\n" +title "and leaves the bundle state dir clean, with no empty scaffolding directories:" trace find .databricks -name terraform -prune -o -print | sort # Wipe whatever remains so the next deploy behaves like a fresh machine. rm -rf .databricks -title "Machine B: fresh deploy of the same bundle (mints a new lineage L2 remotely)\n" +title "Machine B: fresh deploy of the same bundle (mints a new lineage L2 remotely)" trace $CLI bundle deploy # Mask machine B's (remote) lineage. @@ -45,7 +45,7 @@ add_repl "$LINEAGE_B" LINEAGE_B rm -rf .databricks mv .databricks.machineA .databricks -title "Machine A with a lingering local state: any command that pulls remote state now fails\n" +title "Machine A with a lingering local state: any command that pulls remote state now fails" trace musterr $CLI bundle plan trace musterr $CLI bundle deploy trace musterr $CLI bundle destroy --auto-approve diff --git a/acceptance/bundle/dms/bind-unbind-unsupported/output.txt b/acceptance/bundle/dms/bind-unbind-unsupported/output.txt index d2d0a366778..42cf49a0b7f 100644 --- a/acceptance/bundle/dms/bind-unbind-unsupported/output.txt +++ b/acceptance/bundle/dms/bind-unbind-unsupported/output.txt @@ -1,5 +1,6 @@ === bind is refused while recording deployment history + >>> musterr [CLI] bundle deployment bind foo [JOB_ID] Error: bind is not supported for a bundle target that records deployment history diff --git a/acceptance/bundle/dms/declined-deploy/output.txt b/acceptance/bundle/dms/declined-deploy/output.txt index 7cea41997aa..967baf4b70a 100644 --- a/acceptance/bundle/dms/declined-deploy/output.txt +++ b/acceptance/bundle/dms/declined-deploy/output.txt @@ -60,6 +60,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === The plan is a no-op now and records the deployment_history feature; the service holds the schema at version 1 + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -104,6 +105,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged } === A destructive change without --auto-approve is declined: this console cannot prompt + >>> update_file.py databricks.yml catalog_name: main catalog_name: dms_other_[UNIQUE_NAME] >>> musterr [CLI] bundle deploy @@ -129,6 +131,7 @@ Files: 2 uploaded, 0 deleted } === The recorded resources are unchanged by the decline: the schema is still at version 1 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { diff --git a/acceptance/bundle/dms/depends-on/output.txt b/acceptance/bundle/dms/depends-on/output.txt index a1c7270e43c..018d5f45760 100644 --- a/acceptance/bundle/dms/depends-on/output.txt +++ b/acceptance/bundle/dms/depends-on/output.txt @@ -1,5 +1,6 @@ === Plan before first deploy: no deployment yet, so serial is still 0 + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -54,6 +55,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === The plan is a no-op now and records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -69,6 +71,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged === The service lists both jobs, each recorded at version 1 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { diff --git a/acceptance/bundle/dms/deployment-metadata-change/output.txt b/acceptance/bundle/dms/deployment-metadata-change/output.txt index 00bcb2d0c12..5469db1edee 100644 --- a/acceptance/bundle/dms/deployment-metadata-change/output.txt +++ b/acceptance/bundle/dms/deployment-metadata-change/output.txt @@ -60,6 +60,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === The plan records the deployment_history feature; the service holds the schema at version 1 + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], diff --git a/acceptance/bundle/dms/empty-grants/output.txt b/acceptance/bundle/dms/empty-grants/output.txt index 25ffb4376e9..4271f67815e 100644 --- a/acceptance/bundle/dms/empty-grants/output.txt +++ b/acceptance/bundle/dms/empty-grants/output.txt @@ -131,6 +131,7 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === The plan is a no-op and records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -146,6 +147,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === The grants node emptied out, so the service no longer lists it - only the schema remains + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { diff --git a/acceptance/bundle/dms/existing-state/output.txt b/acceptance/bundle/dms/existing-state/output.txt index 8dc33d924fe..f8b5eea32e1 100644 --- a/acceptance/bundle/dms/existing-state/output.txt +++ b/acceptance/bundle/dms/existing-state/output.txt @@ -35,6 +35,7 @@ Update experimental.deployment_history to match the existing deployment, or run >>> print_requests.py --dms //api/2.0/bundle --oneline === Wiping the local cache still refuses after pulling the non-DMS state from the workspace + >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle deploy Error: deployment history setting (true) does not match the existing state (false) @@ -42,11 +43,13 @@ Update experimental.deployment_history to match the existing deployment, or run === A leftover local WAL with the wrong lineage is still refused + >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle deploy Error: reading state from [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: WAL recovery failed: WAL lineage ("stale") does not match state lineage ("[UUID]") === Destroy clears the deployment. With nothing recorded remotely the bundle is treated as new, so recording can be enabled once the stale WAL is gone + >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle destroy --auto-approve The following resources will be deleted: delete resources.jobs.one diff --git a/acceptance/bundle/dms/failed-delete/output.txt b/acceptance/bundle/dms/failed-delete/output.txt index ff4c1987517..83c0d5120d6 100644 --- a/acceptance/bundle/dms/failed-delete/output.txt +++ b/acceptance/bundle/dms/failed-delete/output.txt @@ -60,6 +60,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === The plan is a no-op now and records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -75,6 +76,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === After deploy, the service lists the resource at version 1 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { @@ -155,6 +157,7 @@ API message: Fault injected by test. } === After failure, the service shows the operation failed + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { diff --git a/acceptance/bundle/dms/failed-recreate/output.txt b/acceptance/bundle/dms/failed-recreate/output.txt index 59e3e5d9eab..37b0afc40f9 100644 --- a/acceptance/bundle/dms/failed-recreate/output.txt +++ b/acceptance/bundle/dms/failed-recreate/output.txt @@ -60,6 +60,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === The plan is a no-op and records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -75,6 +76,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === After deploy, the service lists the resource at version 1 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { @@ -97,6 +99,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged } === A recreate deletes and then fails to create. The delete went through, so the resource really is gone: the failed operation clears its state (self-contained, not assuming the delete's own write reached the service), rather than describing the resource as it was before the deploy + >>> update_file.py databricks.yml catalog_name: main catalog_name: dms_other_[UNIQUE_NAME] >>> fault.py POST /api/2.1/unity-catalog/schemas 400 0 1 INVALID_PARAMETER_VALUE @@ -167,6 +170,7 @@ Files: 2 uploaded, 0 deleted } === The resource is not listed: state is what projects a resource, and the failed recreate left none + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [] @@ -182,4 +186,4 @@ Files: 2 uploaded, 0 deleted "state": {} } -=== Planning from DMS state alone creates the schema, which is what has to happen: it no longer exists \ No newline at end of file +=== Planning from DMS state alone creates the schema, which is what has to happen: it no longer exists diff --git a/acceptance/bundle/dms/failed-update-permissions/output.txt b/acceptance/bundle/dms/failed-update-permissions/output.txt index 2cf353e1368..3000bbd9c1b 100644 --- a/acceptance/bundle/dms/failed-update-permissions/output.txt +++ b/acceptance/bundle/dms/failed-update-permissions/output.txt @@ -8,6 +8,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === The plan records the deployment_history feature and the job + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -23,6 +24,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged === The service lists the job at version 1 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { @@ -66,6 +68,7 @@ API message: Fault injected by test. Files: 1 uploaded, 0 deleted === The service lists the job with the failure + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { diff --git a/acceptance/bundle/dms/multiple-resources/output.txt b/acceptance/bundle/dms/multiple-resources/output.txt index 40e3648de3e..df548cfd62d 100644 --- a/acceptance/bundle/dms/multiple-resources/output.txt +++ b/acceptance/bundle/dms/multiple-resources/output.txt @@ -18,6 +18,7 @@ Resources: 5 created, 0 changed, 0 deleted, 0 unchanged {"method": "PATCH", "path": "/api/2.0/bundle/deployments/[NUMID]/versions/1/operations/jobs.two", "q": {"update_mask": "state,error_message,resource_id,status"}, "body": {"error_message": "", "resource_id": "[NUMID]", "sequence_id": "0", "status": "OPERATION_STATUS_SUCCEEDED"}} === The plan records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -33,6 +34,7 @@ Resources: 5 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged === The service lists all five resources at version 1 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { @@ -83,6 +85,7 @@ Resources: 0 created, 0 changed, 0 deleted, 5 unchanged >>> print_requests.py --dms //api/2.0/bundle --sort --oneline === The plan records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -98,6 +101,7 @@ Resources: 0 created, 0 changed, 0 deleted, 5 unchanged Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged === The service still lists all five resources, now at version 2 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { diff --git a/acceptance/bundle/dms/no-drift/output.txt b/acceptance/bundle/dms/no-drift/output.txt index 1e1d74d93f1..69b9790c580 100644 --- a/acceptance/bundle/dms/no-drift/output.txt +++ b/acceptance/bundle/dms/no-drift/output.txt @@ -28,6 +28,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === The plan is a no-op now and records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -161,6 +162,7 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged } === The plan shows the updated pipeline at serial 2 with the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], diff --git a/acceptance/bundle/dms/no-resources/output.txt b/acceptance/bundle/dms/no-resources/output.txt index b3d38120851..536d9fd3a76 100644 --- a/acceptance/bundle/dms/no-resources/output.txt +++ b/acceptance/bundle/dms/no-resources/output.txt @@ -30,6 +30,7 @@ deployment_history_enabled true } === The plan records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -44,6 +45,7 @@ deployment_history_enabled true Plan: 0 to add, 0 to change, 0 to delete, 0 unchanged === The service lists no resources for the deployment + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [] @@ -96,6 +98,7 @@ Resources: 0 created, 0 changed, 0 deleted, 0 unchanged } === The plan records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -110,6 +113,7 @@ Resources: 0 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 0 unchanged === The service still lists no resources + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [] diff --git a/acceptance/bundle/dms/operation-upload-fails-once/output.txt b/acceptance/bundle/dms/operation-upload-fails-once/output.txt index adf0a58883c..086e3babc33 100644 --- a/acceptance/bundle/dms/operation-upload-fails-once/output.txt +++ b/acceptance/bundle/dms/operation-upload-fails-once/output.txt @@ -7,6 +7,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === The plan records the deployment_history feature and the schema + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -22,6 +23,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === The service lists the schema at version 1 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { @@ -64,6 +66,7 @@ API message: Fault injected by test. Files: 2 uploaded, 0 deleted === The service lists the schema with the failure + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { diff --git a/acceptance/bundle/dms/plan-without-dms/output.txt b/acceptance/bundle/dms/plan-without-dms/output.txt index ce1135f624d..1ffab5da398 100644 --- a/acceptance/bundle/dms/plan-without-dms/output.txt +++ b/acceptance/bundle/dms/plan-without-dms/output.txt @@ -1,11 +1,13 @@ === Generate and save plan WITHOUT DMS recording + >>> jq {features} { "features": null } === Enable DMS recording and try to deploy the non-DMS plan + >>> musterr [CLI] bundle deploy --plan tmp.plan.json Error: this plan was created for a different set of state features than the target now has; run 'bundle plan' again diff --git a/acceptance/bundle/dms/provenance/output.txt b/acceptance/bundle/dms/provenance/output.txt index 17118bc1317..7c2e807bd29 100644 --- a/acceptance/bundle/dms/provenance/output.txt +++ b/acceptance/bundle/dms/provenance/output.txt @@ -1,5 +1,6 @@ === Deploying from a git repo records where the source came from: the version carries git_info, workspace_info and the target's deployment_mode + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-provenance-[UNIQUE_NAME]/dev/files... Created jobs.foo @@ -52,6 +53,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === The plan is a no-op and records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -67,6 +69,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === The service denormalizes them onto the deployment, so a reader gets the provenance of the latest version + >>> MSYS_NO_PATHCONV=1 [CLI] api get /api/2.0/bundle/deployments/[NUMID] { "target_name": "dev", diff --git a/acceptance/bundle/dms/record-failure/output.txt b/acceptance/bundle/dms/record-failure/output.txt index 758468fefab..8ebf75adb25 100644 --- a/acceptance/bundle/dms/record-failure/output.txt +++ b/acceptance/bundle/dms/record-failure/output.txt @@ -79,6 +79,7 @@ Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged } === The failed resource is not listed at all: state is what projects a resource, and a failed create records none, so a later deploy plans to create it rather than treating it as already deployed + >>> MSYS_NO_PATHCONV=1 [CLI] api get /api/2.0/bundle/deployments/[NUMID]/resources {} @@ -97,6 +98,7 @@ Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged } === Redeploying from DMS state alone still creates the failed resource: it was never applied, so it must not be skipped as unchanged + >>> [CLI] bundle plan create jobs.doomed diff --git a/acceptance/bundle/dms/stale-plan/output.txt b/acceptance/bundle/dms/stale-plan/output.txt index 8c812b8727c..9f21a95935b 100644 --- a/acceptance/bundle/dms/stale-plan/output.txt +++ b/acceptance/bundle/dms/stale-plan/output.txt @@ -1,5 +1,6 @@ === Save a plan, then deploy it: records version 1 + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -58,6 +59,7 @@ Error: plan lineage "" does not match state lineage "[UUID]"; the state may have {"method": "POST", "path": "/api/2.0/bundle/deployments/[NUMID]/versions/1/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}} === Save a plan against the recorded deployment, then move the deployment on + >>> jq {serial} tmp.plan2.json { "serial": 1 diff --git a/acceptance/bundle/dms/state-features/output.txt b/acceptance/bundle/dms/state-features/output.txt index c8fbbff65fd..7389631a278 100644 --- a/acceptance/bundle/dms/state-features/output.txt +++ b/acceptance/bundle/dms/state-features/output.txt @@ -23,6 +23,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged {"method": "GET", "path": "/api/2.0/bundle/deployments/[NUMID]/resources"} === Disabling deployment history is refused by plan and deploy, while destroy keeps using DMS from state + >>> env DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=false [CLI] bundle plan Error: deployment history setting (false) does not match the existing state (true) diff --git a/acceptance/bundle/dms/successful-recreate/output.txt b/acceptance/bundle/dms/successful-recreate/output.txt index 0ca7c7bea3c..9f476e27bb6 100644 --- a/acceptance/bundle/dms/successful-recreate/output.txt +++ b/acceptance/bundle/dms/successful-recreate/output.txt @@ -60,6 +60,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === The plan is a no-op now and records the deployment_history feature + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], @@ -75,6 +76,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === The service lists the schema, recorded at version 1 + >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[NUMID] -o json [ { @@ -97,6 +99,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged } === Recreate writes state twice - the entry is dropped, then the new resource is saved + >>> update_file.py databricks.yml catalog_name: main catalog_name: dms_other_[UNIQUE_NAME] >>> [CLI] bundle deploy --auto-approve @@ -162,6 +165,7 @@ Resources: 1 created, 0 changed, 1 deleted, 0 unchanged } === The recreate is done: nothing left to plan, and the serial moved to 2 + >>> [CLI] bundle plan -o json { "plan_version": [PLAN_VERSION], diff --git a/acceptance/bundle/escaped_refs/script b/acceptance/bundle/escaped_refs/script index 2cce0c25096..6b8430ee926 100644 --- a/acceptance/bundle/escaped_refs/script +++ b/acceptance/bundle/escaped_refs/script @@ -22,7 +22,7 @@ nostamp < .databricks/tmp.plan.json > out.plan.json # Not traced: the READPLAN variant adds "--plan ...", and the point of that variant is # that the payload below is identical either way. -title "Deploy: payload sent to the jobs API\n" +title "Deploy: payload sent to the jobs API" $CLI bundle deploy $(readplanarg .databricks/tmp.plan.json) # --nostamp: under deployment-history recording the job payload carries the DMS deployment # stamp; drop it so the assertion is the same whether or not recording is on. diff --git a/acceptance/bundle/experimental/skip_name_prefix_for_schema/output.txt b/acceptance/bundle/experimental/skip_name_prefix_for_schema/output.txt index 7812e510ea7..cebbaf21733 100644 --- a/acceptance/bundle/experimental/skip_name_prefix_for_schema/output.txt +++ b/acceptance/bundle/experimental/skip_name_prefix_for_schema/output.txt @@ -10,6 +10,7 @@ "my_schema" === experimental.skip_name_prefix_for_schema is true + >>> [CLI] bundle validate -o json -t one "my_schema" diff --git a/acceptance/bundle/generate/auto-bind/script b/acceptance/bundle/generate/auto-bind/script index f6517a8adb6..b07684e3943 100755 --- a/acceptance/bundle/generate/auto-bind/script +++ b/acceptance/bundle/generate/auto-bind/script @@ -1,4 +1,4 @@ -title "Create a pre-defined job:\n" +title "Create a pre-defined job:" PYTHON_NOTEBOOK_DIR="/Workspace/Users/${CURRENT_USER_NAME}/python-${UNIQUE_NAME}" PYTHON_NOTEBOOK="${PYTHON_NOTEBOOK_DIR}/test" diff --git a/acceptance/bundle/generate/pipeline_and_deploy/output.txt b/acceptance/bundle/generate/pipeline_and_deploy/output.txt index c63cfee74d5..b26706f1970 100644 --- a/acceptance/bundle/generate/pipeline_and_deploy/output.txt +++ b/acceptance/bundle/generate/pipeline_and_deploy/output.txt @@ -4,9 +4,11 @@ >>> [CLI] workspace import /Workspace/Users/[USERNAME]/test-[UNIQUE_NAME].py --file test.py --format AUTO --overwrite -=== Create a pipeline that references the filesCreated pipeline +=== Create a pipeline that references the files +Created pipeline -=== Generate bundle config from the pipelineFile successfully saved to src/notebook-[UNIQUE_NAME].py +=== Generate bundle config from the pipeline +File successfully saved to src/notebook-[UNIQUE_NAME].py File successfully saved to src/test-[UNIQUE_NAME].py Pipeline configuration successfully saved to resources/out.pipeline.yml Warning: Generated configuration is not included in the bundle @@ -19,6 +21,7 @@ include: === Verify generated yaml has expected fields + === Deploy the generated bundle >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline_and_deploy-[UNIQUE_NAME]/default/files... diff --git a/acceptance/bundle/generate/python_job_and_deploy/output.txt b/acceptance/bundle/generate/python_job_and_deploy/output.txt index 397d2049b36..444b23223c5 100644 --- a/acceptance/bundle/generate/python_job_and_deploy/output.txt +++ b/acceptance/bundle/generate/python_job_and_deploy/output.txt @@ -2,7 +2,8 @@ === Upload notebook to a workspace path >>> [CLI] workspace import /Workspace/Users/[USERNAME]/test_notebook-[UNIQUE_NAME].py --file test_notebook.py --format AUTO --overwrite -=== Create a job that references the notebookCreated job +=== Create a job that references the notebook +Created job === Generate bundle config from the job >>> [CLI] bundle generate job --existing-job-id [JOB_ID] --key out --config-dir resources --source-dir src --force @@ -18,6 +19,7 @@ include: === Verify generated yaml has expected fields + === Deploy the generated bundle >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/python_job_and_deploy-[UNIQUE_NAME]/default/files... diff --git a/acceptance/bundle/git-metadata/script b/acceptance/bundle/git-metadata/script index b629bc5776a..8999f7133d4 100644 --- a/acceptance/bundle/git-metadata/script +++ b/acceptance/bundle/git-metadata/script @@ -1,4 +1,4 @@ -title "a repository with a remote: branch, commit and origin URL come from .git\n" +title "a repository with a remote: branch, commit and origin URL come from .git" mkdir withremote cd withremote cp ../databricks.yml . @@ -8,7 +8,7 @@ trace $CLI bundle validate -o json | jq .bundle.git cd .. rm -fr withremote -title "a malformed .git: the worktree root is still found, with no metadata\n" +title "a malformed .git: the worktree root is still found, with no metadata" mkdir broken cd broken cp ../databricks.yml . diff --git a/acceptance/bundle/hashing/new-cli-on-old-state/script b/acceptance/bundle/hashing/new-cli-on-old-state/script index 24bd173a560..ab6aa0f9f79 100644 --- a/acceptance/bundle/hashing/new-cli-on-old-state/script +++ b/acceptance/bundle/hashing/new-cli-on-old-state/script @@ -5,7 +5,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { $CLI bundle destroy --auto-approve &> LOG.destroy; } trap cleanup EXIT -title "Old CLI (predates hashing) deploys: state holds the full serialized_dashboard\n" +title "Old CLI (predates hashing) deploys: state holds the full serialized_dashboard" $CLI_1_16_1 bundle deploy &> LOG.deploy_old contains.py '!panic' '!internal error' < LOG.deploy_old > /dev/null print_state.py | gron.py | grep serialized_dashboard diff --git a/acceptance/bundle/hashing/old-cli-on-new-state/output.txt b/acceptance/bundle/hashing/old-cli-on-new-state/output.txt index bc7817f8633..71d79dd4bc9 100644 --- a/acceptance/bundle/hashing/old-cli-on-new-state/output.txt +++ b/acceptance/bundle/hashing/old-cli-on-new-state/output.txt @@ -3,7 +3,8 @@ json.state.resources.dashboards.dashboard1.state.serialized_dashboard = "sha256:[HASH]"; === Old CLI on the hashed state plans a drift update, not a recreate or crash + === The old CLI redeploys and writes full content back, so the drift is self-correcting json.state.resources.dashboards.dashboard1.state.serialized_dashboard = "{\"pages\":[{\"name\":\"main\",\"displayName\":\"Sales Overview\",\"layout\":[{\"widget\":{\"name\":\"counter1\"}}]}]}\n"; -=== A second old-CLI plan is a no-op \ No newline at end of file +=== A second old-CLI plan is a no-op diff --git a/acceptance/bundle/hashing/old-cli-on-new-state/script b/acceptance/bundle/hashing/old-cli-on-new-state/script index a2ffb0a6931..8f7965b46d3 100644 --- a/acceptance/bundle/hashing/old-cli-on-new-state/script +++ b/acceptance/bundle/hashing/old-cli-on-new-state/script @@ -5,7 +5,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { $CLI bundle destroy --auto-approve &> LOG.destroy; } trap cleanup EXIT -title "Current CLI deploys: serialized_dashboard is stored as a content hash\n" +title "Current CLI deploys: serialized_dashboard is stored as a content hash" $CLI bundle deploy &> LOG.deploy_new contains.py '!panic' '!internal error' < LOG.deploy_new > /dev/null print_state.py | gron.py | grep serialized_dashboard @@ -16,7 +16,7 @@ title "Old CLI on the hashed state plans a drift update, not a recreate or crash $CLI_1_16_1 bundle plan &> LOG.plan_old contains.py '!recreate' '!panic' '!internal error' < LOG.plan_old > /dev/null -title "The old CLI redeploys and writes full content back, so the drift is self-correcting\n" +title "The old CLI redeploys and writes full content back, so the drift is self-correcting" $CLI_1_16_1 bundle deploy &> LOG.deploy_old contains.py '!panic' '!internal error' < LOG.deploy_old > /dev/null print_state.py | gron.py | grep serialized_dashboard diff --git a/acceptance/bundle/includes/plan_multifile/script b/acceptance/bundle/includes/plan_multifile/script index 08350775a73..bac97d0af5d 100644 --- a/acceptance/bundle/includes/plan_multifile/script +++ b/acceptance/bundle/includes/plan_multifile/script @@ -5,7 +5,7 @@ # merge this PR introduces for load performance. trace $CLI bundle plan -title "job_a merged max_concurrent_runs from the override file\n" +title "job_a merged max_concurrent_runs from the override file" # The located warning is already asserted by the plan above; drop the duplicate here so # this step only shows the merged value. trace $CLI bundle validate -o json 2>/dev/null | jq '.resources.jobs.job_a.max_concurrent_runs' diff --git a/acceptance/bundle/integration_whl/base/output.txt b/acceptance/bundle/integration_whl/base/output.txt index 0b12df225ae..7601fd5977b 100644 --- a/acceptance/bundle/integration_whl/base/output.txt +++ b/acceptance/bundle/integration_whl/base/output.txt @@ -48,6 +48,7 @@ Got arguments: ['my_test_code', 'one', 'two'] === Make a change to code without version change and run the job again + >>> [CLI] bundle deploy Building python_artifact... Uploading dist/my_test_code-0.0.1-py3-none-any.whl... diff --git a/acceptance/bundle/integration_whl/interactive_cluster/output.txt b/acceptance/bundle/integration_whl/interactive_cluster/output.txt index ef257c455cd..cd17f5752de 100644 --- a/acceptance/bundle/integration_whl/interactive_cluster/output.txt +++ b/acceptance/bundle/integration_whl/interactive_cluster/output.txt @@ -49,6 +49,7 @@ Got arguments: ['my_test_code', 'one', 'two'] === Make a change to code without version change and run the job again + >>> [CLI] bundle deploy Building python_artifact... Uploading dist/my_test_code-0.0.1-py3-none-any.whl... diff --git a/acceptance/bundle/integration_whl/interactive_cluster_declared_libs/output.txt b/acceptance/bundle/integration_whl/interactive_cluster_declared_libs/output.txt index 96612a33430..d043228b822 100644 --- a/acceptance/bundle/integration_whl/interactive_cluster_declared_libs/output.txt +++ b/acceptance/bundle/integration_whl/interactive_cluster_declared_libs/output.txt @@ -1,8 +1,10 @@ === Deploy the cluster (declares requests and urllib3) and the wheel job that targets it + OK: deployed === Run the job: its task installs the wheel and pypi 'six' on the shared cluster, out of band + OK: job ran === Plan: the job's out-of-band 'six' shows as a removal, the declared libraries are unchanged @@ -19,6 +21,7 @@ OK: job ran } === Remove the declared 'urllib3' and redeploy: uninstalls urllib3 and the job's libraries, keeps requests + >>> plan_pypi_libs { "libraries[pypi='six;']": { diff --git a/acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/output.txt b/acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/output.txt index 6d871a6f1a4..73f29ba28e8 100644 --- a/acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/output.txt +++ b/acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/output.txt @@ -18,6 +18,7 @@ Got arguments: ['my_test_code', 'one', 'two'] === Make a change to code without version change and run the job again + >>> [CLI] bundle deploy -qq >>> [CLI] bundle run some_other_job diff --git a/acceptance/bundle/integration_whl/interactive_single_user/output.txt b/acceptance/bundle/integration_whl/interactive_single_user/output.txt index 865f4f8743e..fcc7be6c2a2 100644 --- a/acceptance/bundle/integration_whl/interactive_single_user/output.txt +++ b/acceptance/bundle/integration_whl/interactive_single_user/output.txt @@ -46,6 +46,7 @@ Run URL: [DATABRICKS_URL]/jobs/[SOME_OTHER_JOB_ID]/runs/[NUMID]?o=[NUMID] [TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" TERMINATED SUCCESS === Make a change to code without version change and run the job again + >>> [CLI] bundle deploy -qq >>> [CLI] bundle run some_other_job diff --git a/acceptance/bundle/integration_whl/serverless/output.txt b/acceptance/bundle/integration_whl/serverless/output.txt index f8b4d241499..a631ae8a2b3 100644 --- a/acceptance/bundle/integration_whl/serverless/output.txt +++ b/acceptance/bundle/integration_whl/serverless/output.txt @@ -19,6 +19,7 @@ Got arguments: ['my_test_code'] === Make a change to code without version change and run the job again + >>> [CLI] bundle deploy Building my_test_code... Uploading dist/my_test_code-0.0.1-py3-none-any.whl... diff --git a/acceptance/bundle/integration_whl/serverless_dynamic_version/output.txt b/acceptance/bundle/integration_whl/serverless_dynamic_version/output.txt index de3839bf308..e422f2f81cf 100644 --- a/acceptance/bundle/integration_whl/serverless_dynamic_version/output.txt +++ b/acceptance/bundle/integration_whl/serverless_dynamic_version/output.txt @@ -19,6 +19,7 @@ Got arguments: ['my_test_code'] === Make a change to code without version change and run the job again + >>> [CLI] bundle deploy Building my_test_code... Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl... diff --git a/acceptance/bundle/local_state_staleness/output.txt b/acceptance/bundle/local_state_staleness/output.txt index abcc31c9164..642b8f69212 100644 --- a/acceptance/bundle/local_state_staleness/output.txt +++ b/acceptance/bundle/local_state_staleness/output.txt @@ -1,5 +1,6 @@ === Step 1: Deploy bundle A + >>> [CLI] bundle deploy --force-lock --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/local-state-staleness-test-[UNIQUE_NAME]/files... Created jobs.test_job @@ -7,12 +8,14 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Step 2: Deploy bundle B + >>> [CLI] bundle deploy --force-lock --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/local-state-staleness-test-[UNIQUE_NAME]/files... Files: 2 uploaded, 0 deleted Resources: 0 created, 0 changed, 0 deleted, 1 unchanged === Step 3: Deploy bundle A again (should use remote state) + >>> [CLI] bundle deploy --force-lock --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/local-state-staleness-test-[UNIQUE_NAME]/files... Files: 2 uploaded, 0 deleted @@ -25,7 +28,6 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged } === Cleanup - destroy bundle A (bundle B does not have an active deployment) - >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: delete resources.jobs.test_job diff --git a/acceptance/bundle/local_state_staleness/script b/acceptance/bundle/local_state_staleness/script index 6c434629e2c..d888c10d730 100644 --- a/acceptance/bundle/local_state_staleness/script +++ b/acceptance/bundle/local_state_staleness/script @@ -18,7 +18,7 @@ cp databricks.yml hello_world.py "$BUNDLE_A_DIR/" cp databricks.yml hello_world.py "$BUNDLE_B_DIR/" cleanup() { - title "Cleanup - destroy bundle A (bundle B does not have an active deployment)\n" + title "Cleanup - destroy bundle A (bundle B does not have an active deployment)" cd "$BUNDLE_A_DIR" || exit trace "$CLI" bundle destroy --auto-approve @@ -39,6 +39,6 @@ title "Step 3: Deploy bundle A again (should use remote state)" cd "$BUNDLE_A_DIR" trace "$CLI" bundle deploy --force-lock --auto-approve -title "Step 4: Verify only one job exists\n" +title "Step 4: Verify only one job exists" cd "$BUNDLE_A_DIR" "$CLI" jobs list -o json | jq -r --arg name "test-job-basic-${UNIQUE_NAME}" '.[] | select(.settings.name == $name) | {name: .settings.name, id: .job_id}' diff --git a/acceptance/bundle/migrate/auto/apply-failure/output.txt b/acceptance/bundle/migrate/auto/apply-failure/output.txt index 631211d3000..618733f815a 100644 --- a/acceptance/bundle/migrate/auto/apply-failure/output.txt +++ b/acceptance/bundle/migrate/auto/apply-failure/output.txt @@ -5,6 +5,7 @@ >>> update_file.py databricks.yml Test Auto-Migrate Apply Failure Test Auto-Migrate Apply Failure (updated) === Migrating deploy: migration commits (point of no return), then the job apply fails + >>> DATABRICKS_BUNDLE_ENGINE=direct errcode [CLI] bundle deploy Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... @@ -24,7 +25,6 @@ Exit code: 1 direct_migrated_via_env true === On direct despite the failed apply: resources.json present, terraform state retired - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup @@ -45,7 +45,6 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged >>> print_migration_telemetry === Local state remains direct - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup diff --git a/acceptance/bundle/migrate/auto/apply-failure/script b/acceptance/bundle/migrate/auto/apply-failure/script index 910d871b677..f230cf239dd 100644 --- a/acceptance/bundle/migrate/auto/apply-failure/script +++ b/acceptance/bundle/migrate/auto/apply-failure/script @@ -17,7 +17,7 @@ trace DATABRICKS_BUNDLE_ENGINE=direct errcode $CLI bundle deploy trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "On direct despite the failed apply: resources.json present, terraform state retired\n" +title "On direct despite the failed apply: resources.json present, terraform state retired" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' trace MSYS_NO_PATHCONV=1 $CLI workspace list "/Workspace/Users/${CURRENT_USER_NAME}/.bundle/test-bundle/default/state" @@ -26,6 +26,6 @@ trace DATABRICKS_BUNDLE_ENGINE=direct $CLI bundle deploy trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "Local state remains direct\n" +title "Local state remains direct" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' trace MSYS_NO_PATHCONV=1 $CLI workspace list "/Workspace/Users/${CURRENT_USER_NAME}/.bundle/test-bundle/default/state" diff --git a/acceptance/bundle/migrate/auto/artifacts/output.txt b/acceptance/bundle/migrate/auto/artifacts/output.txt index 1cbab27c9b9..6dd1fca08c4 100644 --- a/acceptance/bundle/migrate/auto/artifacts/output.txt +++ b/acceptance/bundle/migrate/auto/artifacts/output.txt @@ -13,7 +13,6 @@ Files: 2 uploaded, 0 deleted Resources: 0 created, 0 changed, 0 deleted, 1 unchanged === Local state is now direct - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup diff --git a/acceptance/bundle/migrate/auto/artifacts/script b/acceptance/bundle/migrate/auto/artifacts/script index b351121e54a..5ee2f920b8f 100644 --- a/acceptance/bundle/migrate/auto/artifacts/script +++ b/acceptance/bundle/migrate/auto/artifacts/script @@ -6,7 +6,7 @@ trace replay_tfstate.py terraform-requests.json terraform.tfstate title "Redeploy with direct default: auto-migration runs after the build, so library refs are resolved" trace $CLI bundle deploy -title "Local state is now direct\n" +title "Local state is now direct" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' trace MSYS_NO_PATHCONV=1 $CLI workspace list "/Workspace/Users/${CURRENT_USER_NAME}/.bundle/test-bundle/default/state" diff --git a/acceptance/bundle/migrate/auto/clean/output.txt b/acceptance/bundle/migrate/auto/clean/output.txt index e0cb4f41aaa..fd9ed6dc3b3 100644 --- a/acceptance/bundle/migrate/auto/clean/output.txt +++ b/acceptance/bundle/migrate/auto/clean/output.txt @@ -17,13 +17,11 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged direct_migrated_via_config true === Direct-engine state is now in place; terraform state is backed up - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup === Remote state also reflects the migration (force-pull surfaces workspace state) - >>> [CLI] bundle debug states --force-pull resources.json: remote direct state serial=3 lineage="[UUID]" [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=3 lineage="[UUID]" diff --git a/acceptance/bundle/migrate/auto/clean/script b/acceptance/bundle/migrate/auto/clean/script index d655a9cda1a..ac81235f946 100644 --- a/acceptance/bundle/migrate/auto/clean/script +++ b/acceptance/bundle/migrate/auto/clean/script @@ -12,10 +12,10 @@ trace $CLI bundle deploy trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "Direct-engine state is now in place; terraform state is backed up\n" +title "Direct-engine state is now in place; terraform state is backed up" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' -title "Remote state also reflects the migration (force-pull surfaces workspace state)\n" +title "Remote state also reflects the migration (force-pull surfaces workspace state)" trace $CLI bundle debug states --force-pull title "Subsequent plan under direct is a no-op" @@ -31,7 +31,7 @@ trace update_file.py databricks.yml "Test Auto-Migrate Job" "Test Auto-Migrate J trace $CLI bundle plan $CLI bundle plan -o json > out.plan_update.json -title "Deploy picks up the update (with and without --plan)\n" +title "Deploy picks up the update (with and without --plan)" $CLI bundle deploy $(readplanarg out.plan_update.json) trace print_migration_telemetry rm -f "$OUT_REQUESTS" diff --git a/acceptance/bundle/migrate/auto/default/output.txt b/acceptance/bundle/migrate/auto/default/output.txt index e5a10caf919..292836f1ffd 100644 --- a/acceptance/bundle/migrate/auto/default/output.txt +++ b/acceptance/bundle/migrate/auto/default/output.txt @@ -14,13 +14,11 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged direct_migrated_via_default true === Direct-engine state is now in place; terraform state is backed up - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup === Remote state also reflects the migration (force-pull surfaces workspace state) - >>> [CLI] bundle debug states --force-pull resources.json: remote direct state serial=3 lineage="[UUID]" [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=3 lineage="[UUID]" diff --git a/acceptance/bundle/migrate/auto/default/script b/acceptance/bundle/migrate/auto/default/script index 28f598a5dfc..7a15e615839 100644 --- a/acceptance/bundle/migrate/auto/default/script +++ b/acceptance/bundle/migrate/auto/default/script @@ -12,10 +12,10 @@ trace $CLI bundle deploy trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "Direct-engine state is now in place; terraform state is backed up\n" +title "Direct-engine state is now in place; terraform state is backed up" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' -title "Remote state also reflects the migration (force-pull surfaces workspace state)\n" +title "Remote state also reflects the migration (force-pull surfaces workspace state)" trace $CLI bundle debug states --force-pull title "Subsequent deploy is a no-op on direct" diff --git a/acceptance/bundle/migrate/auto/delete-all/output.txt b/acceptance/bundle/migrate/auto/delete-all/output.txt index f03f24ba55e..e17e7f7d5a1 100644 --- a/acceptance/bundle/migrate/auto/delete-all/output.txt +++ b/acceptance/bundle/migrate/auto/delete-all/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Remove all resources, then deploy on direct: migrate and delete + >>> [CLI] bundle deploy Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... diff --git a/acceptance/bundle/migrate/auto/delete/output.txt b/acceptance/bundle/migrate/auto/delete/output.txt index 7d6a7b04dd2..f29f45fdc78 100644 --- a/acceptance/bundle/migrate/auto/delete/output.txt +++ b/acceptance/bundle/migrate/auto/delete/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Drop one job from config, then deploy on direct: migrate two, delete the dropped one + >>> [CLI] bundle deploy Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... diff --git a/acceptance/bundle/migrate/auto/empty-tfstate/output.txt b/acceptance/bundle/migrate/auto/empty-tfstate/output.txt index 54447ea8ecc..5e9a87139fb 100644 --- a/acceptance/bundle/migrate/auto/empty-tfstate/output.txt +++ b/acceptance/bundle/migrate/auto/empty-tfstate/output.txt @@ -8,18 +8,15 @@ Files: 1 uploaded, 0 deleted Resources: 0 created, 0 changed, 0 deleted, 0 unchanged === Empty state migrated: resources.json written, local terraform state backed up - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup === Migration is recorded in telemetry as via-config - >>> print_migration_telemetry direct_migrated_via_config true === The remote had no terraform state, so nothing terraform-related is backed up remotely - >>> print_requests.py //workspace-files/import-file //workspace/delete --sort "POST /api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files/databricks.yml" "POST /api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock" @@ -32,7 +29,6 @@ direct_migrated_via_config true "POST /api/2.0/workspace/delete" === debug states confirms no terraform.tfstate anywhere; only the local .backup remains - >>> [CLI] bundle debug states --force-pull resources.json: remote direct state serial=2 lineage="test-lineage" [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=2 lineage="test-lineage" diff --git a/acceptance/bundle/migrate/auto/empty-tfstate/script b/acceptance/bundle/migrate/auto/empty-tfstate/script index 225092954a3..4d73d5915ad 100644 --- a/acceptance/bundle/migrate/auto/empty-tfstate/script +++ b/acceptance/bundle/migrate/auto/empty-tfstate/script @@ -12,16 +12,16 @@ EOF title "Deploy with bundle.engine: direct and an empty terraform state — migrate (0 resources)" trace $CLI bundle deploy 2>&1 | contains.py 'Migrated 0 resources to direct deployment engine.' -title "Empty state migrated: resources.json written, local terraform state backed up\n" +title "Empty state migrated: resources.json written, local terraform state backed up" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' -title "Migration is recorded in telemetry as via-config\n" +title "Migration is recorded in telemetry as via-config" trace print_migration_telemetry -title "The remote had no terraform state, so nothing terraform-related is backed up remotely\n" +title "The remote had no terraform state, so nothing terraform-related is backed up remotely" trace print_requests.py //workspace-files/import-file //workspace/delete --sort | jq '.method + " " + .path' | contains.py '!terraform.tfstate' -title "debug states confirms no terraform.tfstate anywhere; only the local .backup remains\n" +title "debug states confirms no terraform.tfstate anywhere; only the local .backup remains" trace $CLI bundle debug states --force-pull title "Next deploy uses direct engine by default (no more mismatch warning, no re-migration)" diff --git a/acceptance/bundle/migrate/auto/envvar/output.txt b/acceptance/bundle/migrate/auto/envvar/output.txt index e67cc31e1c9..4cc5e5f701c 100644 --- a/acceptance/bundle/migrate/auto/envvar/output.txt +++ b/acceptance/bundle/migrate/auto/envvar/output.txt @@ -17,13 +17,11 @@ direct_migrated_via_env true engine/direct === Direct-engine state is now in place; terraform state is backed up - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup === Remote state also reflects the migration (force-pull surfaces workspace state) - >>> [CLI] bundle debug states --force-pull resources.json: remote direct state serial=3 lineage="[UUID]" [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=3 lineage="[UUID]" diff --git a/acceptance/bundle/migrate/auto/envvar/script b/acceptance/bundle/migrate/auto/envvar/script index f704b02f97c..77784eed11c 100644 --- a/acceptance/bundle/migrate/auto/envvar/script +++ b/acceptance/bundle/migrate/auto/envvar/script @@ -13,10 +13,10 @@ trace print_migration_telemetry trace print_requests.py | grep -o 'engine/[a-z]*' | sort -u rm -f "$OUT_REQUESTS" -title "Direct-engine state is now in place; terraform state is backed up\n" +title "Direct-engine state is now in place; terraform state is backed up" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' -title "Remote state also reflects the migration (force-pull surfaces workspace state)\n" +title "Remote state also reflects the migration (force-pull surfaces workspace state)" trace $CLI bundle debug states --force-pull rm -f "$OUT_REQUESTS" diff --git a/acceptance/bundle/migrate/auto/pipeline-storage-change/output.txt b/acceptance/bundle/migrate/auto/pipeline-storage-change/output.txt index 962614d258e..13be22a713a 100644 --- a/acceptance/bundle/migrate/auto/pipeline-storage-change/output.txt +++ b/acceptance/bundle/migrate/auto/pipeline-storage-change/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Change immutable storage. Without --auto-approve the recreate is refused + >>> DATABRICKS_BUNDLE_ENGINE=direct errcode [CLI] bundle deploy Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... diff --git a/acceptance/bundle/migrate/auto/plan-failure/output.txt b/acceptance/bundle/migrate/auto/plan-failure/output.txt index 10ddb654639..8959f8e74fc 100644 --- a/acceptance/bundle/migrate/auto/plan-failure/output.txt +++ b/acceptance/bundle/migrate/auto/plan-failure/output.txt @@ -5,6 +5,7 @@ >>> print_migration_telemetry === Inject GET failure so the plan check blocks the migration + >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy Warn: migration to direct: cannot plan resources.jobs.test_job: reading id="[NUMID]": Fault injected by test. (403 INJECTED): Endpoint: GET [DATABRICKS_URL]/api/2.2/jobs/get?job_id=[NUMID] HTTP Status: 403 Forbidden diff --git a/acceptance/bundle/migrate/auto/push-failure/output.txt b/acceptance/bundle/migrate/auto/push-failure/output.txt index cea782a12cd..a7389231faa 100644 --- a/acceptance/bundle/migrate/auto/push-failure/output.txt +++ b/acceptance/bundle/migrate/auto/push-failure/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Opt in via env var; inject 403 on the resources.json push so the deploy fails + >>> DATABRICKS_BUNDLE_ENGINE=direct errcode [CLI] bundle deploy Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... @@ -20,7 +21,6 @@ Exit code: 1 >>> print_migration_telemetry === Local state is direct (the migration wrote it) though the remote push did not land - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate @@ -39,7 +39,6 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged >>> print_migration_telemetry === Retry recovered: local state is direct (the outranked local terraform.tfstate lingers) - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate diff --git a/acceptance/bundle/migrate/auto/push-failure/script b/acceptance/bundle/migrate/auto/push-failure/script index da3ffaad3d9..00e611e1391 100644 --- a/acceptance/bundle/migrate/auto/push-failure/script +++ b/acceptance/bundle/migrate/auto/push-failure/script @@ -15,7 +15,7 @@ trace DATABRICKS_BUNDLE_ENGINE=direct errcode $CLI bundle deploy trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "Local state is direct (the migration wrote it) though the remote push did not land\n" +title "Local state is direct (the migration wrote it) though the remote push did not land" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' trace MSYS_NO_PATHCONV=1 $CLI workspace list "/Workspace/Users/${CURRENT_USER_NAME}/.bundle/test-bundle/default/state" @@ -24,7 +24,7 @@ trace DATABRICKS_BUNDLE_ENGINE=direct $CLI bundle deploy trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "Retry recovered: local state is direct (the outranked local terraform.tfstate lingers)\n" +title "Retry recovered: local state is direct (the outranked local terraform.tfstate lingers)" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' trace MSYS_NO_PATHCONV=1 $CLI workspace list "/Workspace/Users/${CURRENT_USER_NAME}/.bundle/test-bundle/default/state" diff --git a/acceptance/bundle/migrate/auto/registered-model-catalog-change/output.txt b/acceptance/bundle/migrate/auto/registered-model-catalog-change/output.txt index a824176b8ed..28da420a1a7 100644 --- a/acceptance/bundle/migrate/auto/registered-model-catalog-change/output.txt +++ b/acceptance/bundle/migrate/auto/registered-model-catalog-change/output.txt @@ -8,6 +8,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Move the model to another catalog and deploy on direct + >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy Warn: migration to direct: registered_models.my_model: catalog_name differs between config ("othercat_[UNIQUE_NAME]") and terraform state ("main"); this resource will be recreated. Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). diff --git a/acceptance/bundle/migrate/auto/registered-model-rename/output.txt b/acceptance/bundle/migrate/auto/registered-model-rename/output.txt index fbad32d54f3..348db134df6 100644 --- a/acceptance/bundle/migrate/auto/registered-model-rename/output.txt +++ b/acceptance/bundle/migrate/auto/registered-model-rename/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Rename the model (an immutable id field) and deploy on direct + >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy Warn: migration to direct: registered_models.my_model: name differs between config ("themodel-[UNIQUE_NAME]-renamed") and terraform state ("themodel-[UNIQUE_NAME]"); this resource will be recreated. Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). diff --git a/acceptance/bundle/migrate/auto/run-no-commit/output.txt b/acceptance/bundle/migrate/auto/run-no-commit/output.txt index 950329c8541..ca724516ae0 100644 --- a/acceptance/bundle/migrate/auto/run-no-commit/output.txt +++ b/acceptance/bundle/migrate/auto/run-no-commit/output.txt @@ -11,7 +11,6 @@ Run URL: [DATABRICKS_URL]/jobs/[NUMID]/runs/[NUMID]?o=[NUMID] >>> print_migration_telemetry === Nothing durable written: still on terraform (local state files + remote), no direct state / migrating temp / WAL - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/terraform/terraform.tfstate diff --git a/acceptance/bundle/migrate/auto/run-no-commit/script b/acceptance/bundle/migrate/auto/run-no-commit/script index 4d65ccbf135..be5a0e4f32c 100644 --- a/acceptance/bundle/migrate/auto/run-no-commit/script +++ b/acceptance/bundle/migrate/auto/run-no-commit/script @@ -12,7 +12,7 @@ trace DATABRICKS_BUNDLE_ENGINE=direct errcode $CLI bundle run test_job --no-wait trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "Nothing durable written: still on terraform (local state files + remote), no direct state / migrating temp / WAL\n" +title "Nothing durable written: still on terraform (local state files + remote), no direct state / migrating temp / WAL" # find.py lists matching files sorted with forward slashes (cross-platform); the terraform provider # cache under .terraform/ is excluded by matching only state files (tfstate/.backup, resources*.json, WAL). trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' diff --git a/acceptance/bundle/migrate/auto/schema-catalog-change/output.txt b/acceptance/bundle/migrate/auto/schema-catalog-change/output.txt index 5295feaa2e9..dcc5b7ad1c4 100644 --- a/acceptance/bundle/migrate/auto/schema-catalog-change/output.txt +++ b/acceptance/bundle/migrate/auto/schema-catalog-change/output.txt @@ -8,6 +8,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Move the schema to another catalog. Without --auto-approve the recreate is refused + >>> DATABRICKS_BUNDLE_ENGINE=direct errcode [CLI] bundle deploy Warn: migration to direct: schemas.my_schema: catalog_name differs between config ("othercat_[UNIQUE_NAME]") and terraform state ("main"); this resource will be recreated. Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). diff --git a/acceptance/bundle/migrate/auto/schema-rename/output.txt b/acceptance/bundle/migrate/auto/schema-rename/output.txt index 65e060f08f9..f9d0824dce1 100644 --- a/acceptance/bundle/migrate/auto/schema-rename/output.txt +++ b/acceptance/bundle/migrate/auto/schema-rename/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Rename the schema (an immutable id field). Without --auto-approve the recreate is refused + >>> DATABRICKS_BUNDLE_ENGINE=direct errcode [CLI] bundle deploy Warn: migration to direct: schemas.my_schema: name differs between config ("myschema-[UNIQUE_NAME]-renamed") and terraform state ("myschema-[UNIQUE_NAME]"); this resource will be recreated. Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). diff --git a/acceptance/bundle/migrate/auto/schema-storage-change/output.txt b/acceptance/bundle/migrate/auto/schema-storage-change/output.txt index 0902960a2a8..917419c243f 100644 --- a/acceptance/bundle/migrate/auto/schema-storage-change/output.txt +++ b/acceptance/bundle/migrate/auto/schema-storage-change/output.txt @@ -5,6 +5,7 @@ >>> print_migration_telemetry === Change immutable storage_root; without --auto-approve the recreate is refused + >>> DATABRICKS_BUNDLE_ENGINE=direct errcode [CLI] bundle deploy Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... diff --git a/acceptance/bundle/migrate/auto/tfbackup-failure/output.txt b/acceptance/bundle/migrate/auto/tfbackup-failure/output.txt index 4a633e7d7d2..25e3809e31a 100644 --- a/acceptance/bundle/migrate/auto/tfbackup-failure/output.txt +++ b/acceptance/bundle/migrate/auto/tfbackup-failure/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Opt in via env var; inject 403 on the DELETE of remote terraform.tfstate + >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... @@ -15,7 +16,6 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged direct_migrated_via_env true === Local state is now direct (migration succeeded with warning) - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup @@ -37,7 +37,6 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged >>> print_migration_telemetry === Local state remains direct - >>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal) .databricks/bundle/default/resources.json .databricks/bundle/default/terraform/terraform.tfstate.backup diff --git a/acceptance/bundle/migrate/auto/tfbackup-failure/script b/acceptance/bundle/migrate/auto/tfbackup-failure/script index b2d2d9a6618..fb1f1c74cb9 100644 --- a/acceptance/bundle/migrate/auto/tfbackup-failure/script +++ b/acceptance/bundle/migrate/auto/tfbackup-failure/script @@ -16,7 +16,7 @@ trace DATABRICKS_BUNDLE_ENGINE=direct $CLI bundle deploy trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "Local state is now direct (migration succeeded with warning)\n" +title "Local state is now direct (migration succeeded with warning)" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' trace MSYS_NO_PATHCONV=1 $CLI workspace list "/Workspace/Users/${CURRENT_USER_NAME}/.bundle/test-bundle/default/state" @@ -25,7 +25,7 @@ trace DATABRICKS_BUNDLE_ENGINE=direct $CLI bundle deploy trace print_migration_telemetry rm -f "$OUT_REQUESTS" -title "Local state remains direct\n" +title "Local state remains direct" trace find.py '\.databricks/.*(\.tfstate|resources.*\.json|\.wal)' rm -f "$OUT_REQUESTS" diff --git a/acceptance/bundle/migrate/auto/volume-rename/output.txt b/acceptance/bundle/migrate/auto/volume-rename/output.txt index 762538efab5..230e1f479d8 100644 --- a/acceptance/bundle/migrate/auto/volume-rename/output.txt +++ b/acceptance/bundle/migrate/auto/volume-rename/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Rename the volume (an updatable id field) and deploy on direct + >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy Warn: migration to direct: volumes.my_volume: name differs between config ("thevolume-[UNIQUE_NAME]-renamed") and terraform state ("thevolume-[UNIQUE_NAME]"); this resource will be renamed. Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). diff --git a/acceptance/bundle/migrate/auto/volume-type-change/output.txt b/acceptance/bundle/migrate/auto/volume-type-change/output.txt index 40989888210..bb2aaa1e657 100644 --- a/acceptance/bundle/migrate/auto/volume-type-change/output.txt +++ b/acceptance/bundle/migrate/auto/volume-type-change/output.txt @@ -3,6 +3,7 @@ >>> replay_tfstate.py terraform-requests.json terraform.tfstate === Change volume_type (immutable); without --auto-approve the recreate is refused + >>> DATABRICKS_BUNDLE_ENGINE=direct errcode [CLI] bundle deploy Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... diff --git a/acceptance/bundle/migrate/command/added-direct-only/output.txt b/acceptance/bundle/migrate/command/added-direct-only/output.txt index 21ea762043c..3ad80df4199 100644 --- a/acceptance/bundle/migrate/command/added-direct-only/output.txt +++ b/acceptance/bundle/migrate/command/added-direct-only/output.txt @@ -23,6 +23,7 @@ create instance_pools.pool Plan: 1 to add, 0 to change, 0 to delete, 1 unchanged === Deploy creates it; verify via recorded requests + >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Created instance_pools.pool diff --git a/acceptance/bundle/open/output.txt b/acceptance/bundle/open/output.txt index 890b40998f4..4ac80fb20ec 100644 --- a/acceptance/bundle/open/output.txt +++ b/acceptance/bundle/open/output.txt @@ -18,6 +18,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Use a fake browser that just prints the URL it would have opened + === open after deployment >>> [CLI] bundle open foo Opening browser at [DATABRICKS_URL]/jobs/[NUMID]?w=[NUMID] diff --git a/acceptance/bundle/resource_deps/create_error/output.txt b/acceptance/bundle/resource_deps/create_error/output.txt index dcfc83f2ddf..e25a1ab9c35 100644 --- a/acceptance/bundle/resource_deps/create_error/output.txt +++ b/acceptance/bundle/resource_deps/create_error/output.txt @@ -75,6 +75,7 @@ create jobs.foo Plan: 3 to add, 0 to change, 0 to delete, 1 unchanged === Expecting no difference in the output between first and second deploy + >>> print_requests.py --nostamp //jobs { "method": "POST", diff --git a/acceptance/bundle/resource_deps/escaped_ref/output.txt b/acceptance/bundle/resource_deps/escaped_ref/output.txt index 612f722a335..aaf7c8778b0 100644 --- a/acceptance/bundle/resource_deps/escaped_ref/output.txt +++ b/acceptance/bundle/resource_deps/escaped_ref/output.txt @@ -1,5 +1,6 @@ === depends_on: only the real reference creates an edge + >>> jq .plan | map_values(.depends_on) plan.json { "resources.jobs.bar": null, diff --git a/acceptance/bundle/resource_deps/escaped_ref/script b/acceptance/bundle/resource_deps/escaped_ref/script index 459647cb1dc..eb3b3726b7b 100644 --- a/acceptance/bundle/resource_deps/escaped_ref/script +++ b/acceptance/bundle/resource_deps/escaped_ref/script @@ -10,7 +10,7 @@ trace jq '.plan | map_values(.depends_on)' plan.json | nostamp # Not traced: the READPLAN variant adds "--plan ...", and the point of that variant is # that the payload below is identical either way. -title "Payload: escaped stays literal, real is resolved\n" +title "Payload: escaped stays literal, real is resolved" $CLI bundle deploy $(readplanarg plan.json) # --nostamp: under deployment-history recording the job payload carries the DMS deployment # stamp; drop it so the assertion is the same whether or not recording is on. diff --git a/acceptance/bundle/resource_deps/job_id_big_graph/delete_all/output.txt b/acceptance/bundle/resource_deps/job_id_big_graph/delete_all/output.txt index 9e4478fb6c1..6ad29722c43 100644 --- a/acceptance/bundle/resource_deps/job_id_big_graph/delete_all/output.txt +++ b/acceptance/bundle/resource_deps/job_id_big_graph/delete_all/output.txt @@ -285,6 +285,7 @@ Resources: 12 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan === Delete all via empty.yml + >>> [CLI] bundle plan >>> [CLI] bundle deploy diff --git a/acceptance/bundle/resource_deps/job_id_delete_bar/output.txt b/acceptance/bundle/resource_deps/job_id_delete_bar/output.txt index 879c77141ca..181eaea8a00 100644 --- a/acceptance/bundle/resource_deps/job_id_delete_bar/output.txt +++ b/acceptance/bundle/resource_deps/job_id_delete_bar/output.txt @@ -51,6 +51,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === Delete bar, keep foo (foo config updated to not depend on bar) + >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy diff --git a/acceptance/bundle/resource_deps/job_id_delete_foo/output.txt b/acceptance/bundle/resource_deps/job_id_delete_foo/output.txt index b126ba76227..5447132cbaa 100644 --- a/acceptance/bundle/resource_deps/job_id_delete_foo/output.txt +++ b/acceptance/bundle/resource_deps/job_id_delete_foo/output.txt @@ -51,6 +51,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === Delete foo, keep bar + >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy diff --git a/acceptance/bundle/resource_deps/loop_self/output.txt b/acceptance/bundle/resource_deps/loop_self/output.txt index 096498c3d00..7fddf0690a2 100644 --- a/acceptance/bundle/resource_deps/loop_self/output.txt +++ b/acceptance/bundle/resource_deps/loop_self/output.txt @@ -1,5 +1,6 @@ -=== Badness: validate could detect this and fail as wellName: test-bundle +=== Badness: validate could detect this and fail as well +Name: test-bundle Target: default Workspace: User: [USERNAME] diff --git a/acceptance/bundle/resources/alerts/with_file_run_from_subdir/output.txt b/acceptance/bundle/resources/alerts/with_file_run_from_subdir/output.txt index 337ef7876b3..de04a949817 100644 --- a/acceptance/bundle/resources/alerts/with_file_run_from_subdir/output.txt +++ b/acceptance/bundle/resources/alerts/with_file_run_from_subdir/output.txt @@ -33,6 +33,7 @@ } === validate from a subdirectory of the bundle + >>> [CLI] bundle validate -o json { "custom_summary": "My alert from file", diff --git a/acceptance/bundle/resources/apps/config-drift/output.txt b/acceptance/bundle/resources/apps/config-drift/output.txt index e12c69659fc..bb40acd4dc4 100644 --- a/acceptance/bundle/resources/apps/config-drift/output.txt +++ b/acceptance/bundle/resources/apps/config-drift/output.txt @@ -11,6 +11,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] apps get [UNIQUE_NAME] --output json === Simulate out-of-band deployment with changed command and env + === Plan should detect config drift >>> [CLI] bundle plan update apps.myapp diff --git a/acceptance/bundle/resources/apps/lifecycle-started-omitted/output.txt b/acceptance/bundle/resources/apps/lifecycle-started-omitted/output.txt index 701f2a7743b..73fdb662ce9 100644 --- a/acceptance/bundle/resources/apps/lifecycle-started-omitted/output.txt +++ b/acceptance/bundle/resources/apps/lifecycle-started-omitted/output.txt @@ -20,6 +20,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === (started omitted) -> started: false -> deploy: no start/stop requests + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lifecycle-started-omitted-[UNIQUE_NAME]/default/files... Files: 1 uploaded, 0 deleted @@ -28,6 +29,7 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged >>> print_app_requests === started: false -> (started omitted) -> deploy: no start/stop requests + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lifecycle-started-omitted-[UNIQUE_NAME]/default/files... Files: 1 uploaded, 0 deleted @@ -36,6 +38,7 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged >>> print_app_requests === (started omitted) -> started: true -> deploy: app started + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lifecycle-started-omitted-[UNIQUE_NAME]/default/files... Updated apps.mykey @@ -58,6 +61,7 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged } === started: true -> (started omitted) -> deploy: no start/stop requests (compute stays as-is) + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lifecycle-started-omitted-[UNIQUE_NAME]/default/files... Updated apps.mykey @@ -66,7 +70,8 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged >>> print_app_requests -=== (started omitted, app running) -> bundle plan shows no driftPlan: no drift detected +=== (started omitted, app running) -> bundle plan shows no drift +Plan: no drift detected >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/catalogs/auto-approve/output.txt b/acceptance/bundle/resources/catalogs/auto-approve/output.txt index 74d1a53ab73..c798bd9bfa1 100644 --- a/acceptance/bundle/resources/catalogs/auto-approve/output.txt +++ b/acceptance/bundle/resources/catalogs/auto-approve/output.txt @@ -58,4 +58,5 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 2 deleted === Assert the catalog is deleted + Exit code: 1 diff --git a/acceptance/bundle/resources/catalogs/basic/output.txt b/acceptance/bundle/resources/catalogs/basic/output.txt index fdc31856ca9..cc8a08ca77a 100644 --- a/acceptance/bundle/resources/catalogs/basic/output.txt +++ b/acceptance/bundle/resources/catalogs/basic/output.txt @@ -17,6 +17,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === Update catalog comment + === Redeploy with updated comment >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... @@ -40,4 +41,4 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 1 deleted -=== Assert the catalog is deleted \ No newline at end of file +=== Assert the catalog is deleted diff --git a/acceptance/bundle/resources/catalogs/comment_out_of_band/output.txt b/acceptance/bundle/resources/catalogs/comment_out_of_band/output.txt index 58bebd5aac2..04dbc740657 100644 --- a/acceptance/bundle/resources/catalogs/comment_out_of_band/output.txt +++ b/acceptance/bundle/resources/catalogs/comment_out_of_band/output.txt @@ -7,6 +7,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Set the comment out of band, the way Catalog Explorer does + === The remote comment is drift, so the plan updates the catalog >>> [CLI] bundle plan --output json { @@ -24,6 +25,7 @@ Files: 0 uploaded, 0 deleted Resources: 0 created, 1 changed, 0 deleted, 0 unchanged === The comment is gone + >>> [CLI] api get /api/2.1/unity-catalog/catalogs/test-catalog-[UNIQUE_NAME] "" diff --git a/acceptance/bundle/resources/catalogs/with-schemas/output.txt b/acceptance/bundle/resources/catalogs/with-schemas/output.txt index 07928270eb8..9b77c77ed2e 100644 --- a/acceptance/bundle/resources/catalogs/with-schemas/output.txt +++ b/acceptance/bundle/resources/catalogs/with-schemas/output.txt @@ -26,7 +26,9 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === Verify schema belongs to the test catalog + === Update catalog comment + === Redeploy with updated catalog >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... @@ -61,4 +63,5 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 2 deleted === Assert schema is deleted -=== Assert the catalog is deleted \ No newline at end of file + +=== Assert the catalog is deleted diff --git a/acceptance/bundle/resources/cluster_policies/definition_and_family_conflict/script b/acceptance/bundle/resources/cluster_policies/definition_and_family_conflict/script index 4d83ab4b716..8ae30c4b72f 100644 --- a/acceptance/bundle/resources/cluster_policies/definition_and_family_conflict/script +++ b/acceptance/bundle/resources/cluster_policies/definition_and_family_conflict/script @@ -5,5 +5,5 @@ cleanup() { } trap cleanup EXIT -title "Deploying a policy with both definition and policy_family_id must fail\n" +title "Deploying a policy with both definition and policy_family_id must fail" musterr $CLI bundle deploy diff --git a/acceptance/bundle/resources/cluster_policies/permissions/levels/output.txt b/acceptance/bundle/resources/cluster_policies/permissions/levels/output.txt index 37d4c20606e..e228fd2b3ba 100644 --- a/acceptance/bundle/resources/cluster_policies/permissions/levels/output.txt +++ b/acceptance/bundle/resources/cluster_policies/permissions/levels/output.txt @@ -21,6 +21,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === CAN_MANAGE is rejected + >>> [CLI] bundle destroy --auto-approve Warning: invalid value "CAN_MANAGE" for enum field. Valid values are [CAN_USE] at resources.cluster_policies.test_cluster_policy.permissions[0].level diff --git a/acceptance/bundle/resources/cluster_policies/policy_family_definition/output.txt b/acceptance/bundle/resources/cluster_policies/policy_family_definition/output.txt index 8389a962f28..41168b77cad 100644 --- a/acceptance/bundle/resources/cluster_policies/policy_family_definition/output.txt +++ b/acceptance/bundle/resources/cluster_policies/policy_family_definition/output.txt @@ -10,6 +10,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Redeploy issues no edit + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... Files: 0 uploaded, 0 deleted diff --git a/acceptance/bundle/resources/clusters/cluster_policy/output.txt b/acceptance/bundle/resources/clusters/cluster_policy/output.txt index 07031d929bf..37f55bca513 100644 --- a/acceptance/bundle/resources/clusters/cluster_policy/output.txt +++ b/acceptance/bundle/resources/clusters/cluster_policy/output.txt @@ -7,12 +7,10 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === A cluster policy tag on a standalone cluster is not drift - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged === ...classified remote_addition - >>> [CLI] bundle plan -o json { "custom_tags": { diff --git a/acceptance/bundle/resources/clusters/cluster_policy/script b/acceptance/bundle/resources/clusters/cluster_policy/script index d32f03284ae..4169fff3fcf 100644 --- a/acceptance/bundle/resources/clusters/cluster_policy/script +++ b/acceptance/bundle/resources/clusters/cluster_policy/script @@ -7,9 +7,9 @@ trap cleanup EXIT trace $CLI bundle deploy -title "A cluster policy tag on a standalone cluster is not drift\n" +title "A cluster policy tag on a standalone cluster is not drift" trace $CLI bundle plan -title "...classified remote_addition\n" +title "...classified remote_addition" trace $CLI bundle plan -o json | jq -S '.plan["resources.clusters.my_cluster"].changes | with_entries(select(.key | test("custom_tags")))' diff --git a/acceptance/bundle/resources/clusters/deploy/local_ssd_count/script b/acceptance/bundle/resources/clusters/deploy/local_ssd_count/script index 7455e441da8..fd32c88178c 100644 --- a/acceptance/bundle/resources/clusters/deploy/local_ssd_count/script +++ b/acceptance/bundle/resources/clusters/deploy/local_ssd_count/script @@ -9,6 +9,6 @@ trap cleanup EXIT trace $CLI bundle deploy print_requests.py //cluster > out.requests.json -title "Cluster should exist after bundle deployment:\n" +title "Cluster should exist after bundle deployment:" CLUSTER_ID=`read_id.py test_cluster` $CLI clusters get "${CLUSTER_ID}" | gron.py | grep json.gcp_attributes > out.result.txt diff --git a/acceptance/bundle/resources/clusters/deploy/local_ssd_count_update/output.txt b/acceptance/bundle/resources/clusters/deploy/local_ssd_count_update/output.txt index 0c44e1f2189..3505a20a433 100644 --- a/acceptance/bundle/resources/clusters/deploy/local_ssd_count_update/output.txt +++ b/acceptance/bundle/resources/clusters/deploy/local_ssd_count_update/output.txt @@ -1,6 +1,5 @@ === Deploy 1: create the cluster with gcp_attributes but no local_ssd_count - >>> [CLI] bundle deploy -qq === gcp_attributes sent on create (local_ssd_count absent): @@ -12,7 +11,6 @@ === Now the user adds an explicit local_ssd_count: 0 to the config === Deploy 2: bundle should detect and apply the local_ssd_count change - >>> [CLI] bundle plan update clusters.test_cluster @@ -34,14 +32,12 @@ Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged } === Deploy 3: no config change, should converge to a no-op - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Now the user removes local_ssd_count again === Deploy 4: removing the explicit 0 is a change, symmetric with setting it - >>> [CLI] bundle plan update clusters.test_cluster @@ -57,7 +53,6 @@ Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged >>> [CLI] bundle deploy -qq === Deploy 5: no config change, should converge to a no-op - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged diff --git a/acceptance/bundle/resources/clusters/deploy/local_ssd_count_update/script b/acceptance/bundle/resources/clusters/deploy/local_ssd_count_update/script index 4ce07d742fc..d9e8266eeaf 100644 --- a/acceptance/bundle/resources/clusters/deploy/local_ssd_count_update/script +++ b/acceptance/bundle/resources/clusters/deploy/local_ssd_count_update/script @@ -4,34 +4,34 @@ cleanup() { } trap cleanup EXIT -title "Deploy 1: create the cluster with gcp_attributes but no local_ssd_count\n" +title "Deploy 1: create the cluster with gcp_attributes but no local_ssd_count" trace $CLI bundle deploy -qq -title "gcp_attributes sent on create (local_ssd_count absent):\n" +title "gcp_attributes sent on create (local_ssd_count absent):" print_requests.py //clusters/create | jq '.body.gcp_attributes' -title "Now the user adds an explicit local_ssd_count: 0 to the config\n" +title "Now the user adds an explicit local_ssd_count: 0 to the config" update_file.py databricks.yml "#local_ssd_count: 0" "local_ssd_count: 0" -title "Deploy 2: bundle should detect and apply the local_ssd_count change\n" +title "Deploy 2: bundle should detect and apply the local_ssd_count change" trace $CLI bundle plan -title "local_ssd_count change in the plan:\n" +title "local_ssd_count change in the plan:" $CLI bundle plan -o json | jq '.plan[].changes["gcp_attributes.local_ssd_count"]' trace $CLI bundle deploy -qq -title "gcp_attributes sent on update (empty means the change was NOT applied):\n" +title "gcp_attributes sent on update (empty means the change was NOT applied):" print_requests.py //clusters/edit | jq '.body.gcp_attributes' -title "Deploy 3: no config change, should converge to a no-op\n" +title "Deploy 3: no config change, should converge to a no-op" trace $CLI bundle plan -title "Now the user removes local_ssd_count again\n" +title "Now the user removes local_ssd_count again" update_file.py databricks.yml "local_ssd_count: 0" "#local_ssd_count: 0" -title "Deploy 4: removing the explicit 0 is a change, symmetric with setting it\n" +title "Deploy 4: removing the explicit 0 is a change, symmetric with setting it" trace $CLI bundle plan -title "local_ssd_count change in the plan:\n" +title "local_ssd_count change in the plan:" $CLI bundle plan -o json | jq '.plan[].changes["gcp_attributes.local_ssd_count"]' trace $CLI bundle deploy -qq -title "Deploy 5: no config change, should converge to a no-op\n" +title "Deploy 5: no config change, should converge to a no-op" trace $CLI bundle plan diff --git a/acceptance/bundle/resources/clusters/deploy/simple/script b/acceptance/bundle/resources/clusters/deploy/simple/script index 12977cedb09..12b3be5c8fa 100644 --- a/acceptance/bundle/resources/clusters/deploy/simple/script +++ b/acceptance/bundle/resources/clusters/deploy/simple/script @@ -7,6 +7,6 @@ trap cleanup EXIT trace $CLI bundle deploy -title "Cluster should exist after bundle deployment:\n" +title "Cluster should exist after bundle deployment:" CLUSTER_ID=$($CLI bundle summary -o json | jq -r '.resources.clusters.test_cluster.id') $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers}' diff --git a/acceptance/bundle/resources/clusters/deploy/spot_bid_max_price_update/output.txt b/acceptance/bundle/resources/clusters/deploy/spot_bid_max_price_update/output.txt index b6997db09ef..6e846cb9fed 100644 --- a/acceptance/bundle/resources/clusters/deploy/spot_bid_max_price_update/output.txt +++ b/acceptance/bundle/resources/clusters/deploy/spot_bid_max_price_update/output.txt @@ -1,6 +1,5 @@ === Deploy 1: create the cluster with azure_attributes but no spot_bid_max_price - >>> [CLI] bundle deploy -qq === azure_attributes sent on create (spot_bid_max_price absent): @@ -11,7 +10,6 @@ === Now the user adds an explicit spot_bid_max_price: 0 to the config === Deploy 2: bundle should detect and apply the spot_bid_max_price change - >>> [CLI] bundle plan update clusters.test_cluster @@ -32,14 +30,12 @@ Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged } === Deploy 3: no config change, should converge to a no-op - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Now the user removes spot_bid_max_price again === Deploy 4: removing the explicit 0 is a change, symmetric with setting it - >>> [CLI] bundle plan update clusters.test_cluster @@ -55,7 +51,6 @@ Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged >>> [CLI] bundle deploy -qq === Deploy 5: no config change, should converge to a no-op - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged diff --git a/acceptance/bundle/resources/clusters/deploy/spot_bid_max_price_update/script b/acceptance/bundle/resources/clusters/deploy/spot_bid_max_price_update/script index 450f4e695fd..cb8513653f4 100644 --- a/acceptance/bundle/resources/clusters/deploy/spot_bid_max_price_update/script +++ b/acceptance/bundle/resources/clusters/deploy/spot_bid_max_price_update/script @@ -4,34 +4,34 @@ cleanup() { } trap cleanup EXIT -title "Deploy 1: create the cluster with azure_attributes but no spot_bid_max_price\n" +title "Deploy 1: create the cluster with azure_attributes but no spot_bid_max_price" trace $CLI bundle deploy -qq -title "azure_attributes sent on create (spot_bid_max_price absent):\n" +title "azure_attributes sent on create (spot_bid_max_price absent):" print_requests.py //clusters/create | jq '.body.azure_attributes' -title "Now the user adds an explicit spot_bid_max_price: 0 to the config\n" +title "Now the user adds an explicit spot_bid_max_price: 0 to the config" update_file.py databricks.yml "#spot_bid_max_price: 0" "spot_bid_max_price: 0" -title "Deploy 2: bundle should detect and apply the spot_bid_max_price change\n" +title "Deploy 2: bundle should detect and apply the spot_bid_max_price change" trace $CLI bundle plan -title "spot_bid_max_price change in the plan:\n" +title "spot_bid_max_price change in the plan:" $CLI bundle plan -o json | jq '.plan[].changes["azure_attributes.spot_bid_max_price"]' trace $CLI bundle deploy -qq -title "azure_attributes sent on update (empty means the change was NOT applied):\n" +title "azure_attributes sent on update (empty means the change was NOT applied):" print_requests.py //clusters/edit | jq '.body.azure_attributes' -title "Deploy 3: no config change, should converge to a no-op\n" +title "Deploy 3: no config change, should converge to a no-op" trace $CLI bundle plan -title "Now the user removes spot_bid_max_price again\n" +title "Now the user removes spot_bid_max_price again" update_file.py databricks.yml "spot_bid_max_price: 0" "#spot_bid_max_price: 0" -title "Deploy 4: removing the explicit 0 is a change, symmetric with setting it\n" +title "Deploy 4: removing the explicit 0 is a change, symmetric with setting it" trace $CLI bundle plan -title "spot_bid_max_price change in the plan:\n" +title "spot_bid_max_price change in the plan:" $CLI bundle plan -o json | jq '.plan[].changes["azure_attributes.spot_bid_max_price"]' trace $CLI bundle deploy -qq -title "Deploy 5: no config change, should converge to a no-op\n" +title "Deploy 5: no config change, should converge to a no-op" trace $CLI bundle plan diff --git a/acceptance/bundle/resources/clusters/deploy/update-after-create/script b/acceptance/bundle/resources/clusters/deploy/update-after-create/script index 05409a7ffcb..b08f318f799 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-after-create/script +++ b/acceptance/bundle/resources/clusters/deploy/update-after-create/script @@ -7,11 +7,11 @@ trap cleanup EXIT trace $CLI bundle deploy -title "Cluster should exist after bundle deployment:\n" +title "Cluster should exist after bundle deployment:" CLUSTER_ID=$($CLI bundle summary -o json | jq -r '.resources.clusters.test_cluster.id') $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers}' -title "Updating cluster should call update API\n" +title "Updating cluster should call update API" # The cluster routes through the shared instance pool (node type c5d.xlarge), # whose maximum executor heap is 3157 MB, so keep the bumped value under that. update_file.py databricks.yml "\"spark.executor.memory\": \"2g\"" "\"spark.executor.memory\": \"3g\"" diff --git a/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/script b/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/script index e336ebc564f..b34f9554b27 100755 --- a/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/script +++ b/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/script @@ -13,15 +13,15 @@ $CLI bundle plan > out.plan_.txt $CLI bundle plan -o json | nostamp > out.plan_.json trace $CLI bundle deploy -q -title "Cluster should exist with num_workers after bundle deployment:\n" +title "Cluster should exist with num_workers after bundle deployment:" CLUSTER_ID=$($CLI bundle summary -o json | nostamp | jq -r '.resources.clusters.test_cluster.id') add_repl "$CLUSTER_ID" CLUSTER_ID $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers,autoscale}' -title "Terminating the cluster\n" +title "Terminating the cluster" $CLI clusters delete "${CLUSTER_ID}" | jq '{cluster_id}' -title "Adding autoscale section should call update API on stopped cluster\n" +title "Adding autoscale section should call update API on stopped cluster" update_file.py databricks.yml " num_workers: 2" " autoscale: min_workers: 2 max_workers: 4" @@ -31,10 +31,10 @@ trace $CLI bundle deploy -q trace jq 'select(.method == "POST" and (.path | contains("/clusters/edit"))) | del(.body.aws_attributes, .body.driver_node_type_id, .body.data_security_mode, .body.enable_elastic_disk)' "$OUT_REQUESTS" rm "$OUT_REQUESTS" -title "Cluster should have autoscale\n" +title "Cluster should have autoscale" $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers,autoscale}' -title "Changing autoscale should call update API on stopped cluster\n" +title "Changing autoscale should call update API on stopped cluster" update_file.py databricks.yml "min_workers: 2" "min_workers: 3" update_file.py databricks.yml "max_workers: 4" "max_workers: 5" $CLI bundle plan >> out.plan_.txt @@ -43,13 +43,13 @@ trace $CLI bundle deploy -q trace jq 'select(.method == "POST" and (.path | contains("/clusters/edit"))) | del(.body.aws_attributes, .body.driver_node_type_id, .body.data_security_mode, .body.enable_elastic_disk)' "$OUT_REQUESTS" rm "$OUT_REQUESTS" -title "Cluster should have new autoscale\n" +title "Cluster should have new autoscale" $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers,autoscale}' -title "Starting the cluster\n" +title "Starting the cluster" $CLI clusters start "${CLUSTER_ID}" -title "Changing autoscale should call resize API on running cluster\n" +title "Changing autoscale should call resize API on running cluster" update_file.py databricks.yml "min_workers: 3" "min_workers: 4" update_file.py databricks.yml "max_workers: 5" "max_workers: 6" $CLI bundle plan >> out.plan_.txt @@ -58,10 +58,10 @@ trace $CLI bundle deploy -q trace jq 'select(.method == "POST" and (.path | contains("/clusters/resize")))' "$OUT_REQUESTS" rm "$OUT_REQUESTS" -title "Cluster should have new autoscale\n" +title "Cluster should have new autoscale" $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers,autoscale}' -title "Removing autoscale section should call resize API\n" +title "Removing autoscale section should call resize API" update_file.py databricks.yml " autoscale: min_workers: 4 max_workers: 6" " num_workers: 3" @@ -71,5 +71,5 @@ trace $CLI bundle deploy -q trace jq 'select(.method == "POST" and (.path | contains("/clusters/resize")))' "$OUT_REQUESTS" rm "$OUT_REQUESTS" -title "Cluster should have num_workers\n" +title "Cluster should have num_workers" $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers,autoscale}' diff --git a/acceptance/bundle/resources/clusters/deploy/update-and-resize/script b/acceptance/bundle/resources/clusters/deploy/update-and-resize/script index 06d5ae378cc..f6a053f1126 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-and-resize/script +++ b/acceptance/bundle/resources/clusters/deploy/update-and-resize/script @@ -13,12 +13,12 @@ $CLI bundle plan > out.plan_.txt $CLI bundle plan -o json | nostamp > out.plan_.json trace $CLI bundle deploy -q -title "Cluster should exist after bundle deployment:\n" +title "Cluster should exist after bundle deployment:" CLUSTER_ID=$($CLI bundle summary -o json | nostamp | jq -r '.resources.clusters.test_cluster.id') add_repl "$CLUSTER_ID" CLUSTER_ID $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers}' -title "Changing num_workers should call update API on stopped cluster\n" +title "Changing num_workers should call update API on stopped cluster" update_file.py databricks.yml "num_workers: 2" "num_workers: 3" $CLI bundle plan >> out.plan_.txt $CLI bundle plan -o json | nostamp >> out.plan_.json @@ -26,13 +26,13 @@ trace $CLI bundle deploy -q trace jq 'select(.method == "POST" and (.path | contains("/clusters/edit"))) | del(.body.aws_attributes, .body.driver_node_type_id, .body.data_security_mode, .body.enable_elastic_disk)' "$OUT_REQUESTS" rm "$OUT_REQUESTS" -title "Cluster should have new num_workers\n" +title "Cluster should have new num_workers" $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers}' -title "Starting the cluster\n" +title "Starting the cluster" $CLI clusters start "${CLUSTER_ID}" -title "Changing num_workers should call resize API on running cluster\n" +title "Changing num_workers should call resize API on running cluster" update_file.py databricks.yml "num_workers: 3" "num_workers: 4" $CLI bundle plan >> out.plan_.txt $CLI bundle plan -o json | nostamp >> out.plan_.json @@ -40,10 +40,10 @@ trace $CLI bundle deploy -q trace jq 'select(.method == "POST" and (.path | contains("/clusters/resize")))' "$OUT_REQUESTS" rm "$OUT_REQUESTS" -title "Cluster should have new num_workers\n" +title "Cluster should have new num_workers" $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers}' -title "Changing num_workers and spark_conf should call update API\n" +title "Changing num_workers and spark_conf should call update API" update_file.py databricks.yml "num_workers: 4" "num_workers: 5" update_file.py databricks.yml '"spark.executor.memory": "2g"' '"spark.executor.memory": "4g"' $CLI bundle plan >> out.plan_.txt @@ -52,5 +52,5 @@ trace $CLI bundle deploy -q trace jq 'select(.method == "POST" and (.path | contains("/clusters/edit"))) | del(.body.aws_attributes, .body.driver_node_type_id, .body.data_security_mode, .body.enable_elastic_disk)' "$OUT_REQUESTS" rm "$OUT_REQUESTS" -title "Cluster should have new num_workers and spark_conf\n" +title "Cluster should have new num_workers and spark_conf" $CLI clusters get "${CLUSTER_ID}" | jq '{cluster_name,num_workers,spark_conf}' diff --git a/acceptance/bundle/resources/clusters/deploy/use_preemptible_update/output.txt b/acceptance/bundle/resources/clusters/deploy/use_preemptible_update/output.txt index afad5c5060f..bab6d0a80ac 100644 --- a/acceptance/bundle/resources/clusters/deploy/use_preemptible_update/output.txt +++ b/acceptance/bundle/resources/clusters/deploy/use_preemptible_update/output.txt @@ -1,6 +1,5 @@ === Deploy 1: create the cluster with gcp_attributes but no use_preemptible_executors - >>> [CLI] bundle deploy -qq === gcp_attributes sent on create (use_preemptible_executors absent): @@ -12,7 +11,6 @@ === Now the user adds an explicit use_preemptible_executors: false to the config === Deploy 2: bundle should detect and apply the use_preemptible_executors change - >>> [CLI] bundle plan update clusters.test_cluster @@ -35,14 +33,12 @@ Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged } === Deploy 3: no config change, should converge to a no-op - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Now the user removes use_preemptible_executors again === Deploy 4: removing the explicit false is a change, symmetric with setting it - >>> [CLI] bundle plan update clusters.test_cluster @@ -58,7 +54,6 @@ Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged >>> [CLI] bundle deploy -qq === Deploy 5: no config change, should converge to a no-op - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged diff --git a/acceptance/bundle/resources/clusters/deploy/use_preemptible_update/script b/acceptance/bundle/resources/clusters/deploy/use_preemptible_update/script index d2598b7a7aa..4b3ba64068b 100644 --- a/acceptance/bundle/resources/clusters/deploy/use_preemptible_update/script +++ b/acceptance/bundle/resources/clusters/deploy/use_preemptible_update/script @@ -4,34 +4,34 @@ cleanup() { } trap cleanup EXIT -title "Deploy 1: create the cluster with gcp_attributes but no use_preemptible_executors\n" +title "Deploy 1: create the cluster with gcp_attributes but no use_preemptible_executors" trace $CLI bundle deploy -qq -title "gcp_attributes sent on create (use_preemptible_executors absent):\n" +title "gcp_attributes sent on create (use_preemptible_executors absent):" print_requests.py //clusters/create | jq '.body.gcp_attributes' -title "Now the user adds an explicit use_preemptible_executors: false to the config\n" +title "Now the user adds an explicit use_preemptible_executors: false to the config" update_file.py databricks.yml "#use_preemptible_executors: false" "use_preemptible_executors: false" -title "Deploy 2: bundle should detect and apply the use_preemptible_executors change\n" +title "Deploy 2: bundle should detect and apply the use_preemptible_executors change" trace $CLI bundle plan -title "use_preemptible_executors change in the plan:\n" +title "use_preemptible_executors change in the plan:" $CLI bundle plan -o json | jq '.plan[].changes["gcp_attributes.use_preemptible_executors"]' trace $CLI bundle deploy -qq -title "gcp_attributes sent on update (empty means the change was NOT applied):\n" +title "gcp_attributes sent on update (empty means the change was NOT applied):" print_requests.py //clusters/edit | jq '.body.gcp_attributes' -title "Deploy 3: no config change, should converge to a no-op\n" +title "Deploy 3: no config change, should converge to a no-op" trace $CLI bundle plan -title "Now the user removes use_preemptible_executors again\n" +title "Now the user removes use_preemptible_executors again" update_file.py databricks.yml "use_preemptible_executors: false" "#use_preemptible_executors: false" -title "Deploy 4: removing the explicit false is a change, symmetric with setting it\n" +title "Deploy 4: removing the explicit false is a change, symmetric with setting it" trace $CLI bundle plan -title "use_preemptible_executors change in the plan:\n" +title "use_preemptible_executors change in the plan:" $CLI bundle plan -o json | jq '.plan[].changes["gcp_attributes.use_preemptible_executors"]' trace $CLI bundle deploy -qq -title "Deploy 5: no config change, should converge to a no-op\n" +title "Deploy 5: no config change, should converge to a no-op" trace $CLI bundle plan diff --git a/acceptance/bundle/resources/clusters/libraries-content-change/output.txt b/acceptance/bundle/resources/clusters/libraries-content-change/output.txt index ef3f8cf7c11..7b5146ee4f3 100644 --- a/acceptance/bundle/resources/clusters/libraries-content-change/output.txt +++ b/acceptance/bundle/resources/clusters/libraries-content-change/output.txt @@ -1,5 +1,6 @@ === Deploy a cluster with a local wheel library + OK: cluster created with wheel >>> print_requests.py //libraries/install @@ -17,6 +18,7 @@ OK: cluster created with wheel } === Badness: wheel code changes but version does not, so redeploy does not reinstall it + >>> jq .plan["resources.clusters.mycluster"].action tmp.plan.json "skip" diff --git a/acceptance/bundle/resources/clusters/libraries-repo/output.txt b/acceptance/bundle/resources/clusters/libraries-repo/output.txt index 03dfa68dc62..19e3daadbf9 100644 --- a/acceptance/bundle/resources/clusters/libraries-repo/output.txt +++ b/acceptance/bundle/resources/clusters/libraries-repo/output.txt @@ -1,5 +1,6 @@ === Deploy creates the cluster and installs the pypi library + OK: cluster created with pypi library === Plan is a no-op after deploy: the repo round-trips @@ -7,6 +8,7 @@ OK: cluster created with pypi library Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Changing only the repo is planned as an update + >>> [CLI] bundle plan update clusters.mycluster diff --git a/acceptance/bundle/resources/clusters/libraries-scenarios/output.txt b/acceptance/bundle/resources/clusters/libraries-scenarios/output.txt index c31dc73b484..debe00e1d5e 100644 --- a/acceptance/bundle/resources/clusters/libraries-scenarios/output.txt +++ b/acceptance/bundle/resources/clusters/libraries-scenarios/output.txt @@ -1,8 +1,10 @@ === Deploy a cluster that declares no libraries + OK: cluster created === Out of band: a job run (or the UI) installs 'six' on the shared cluster + >>> print_requests.py //libraries/install { "method": "POST", @@ -20,6 +22,7 @@ OK: cluster created } === No libraries section: six is skipped as unmanaged, not drift + >>> plan_libs { "libraries": { @@ -36,6 +39,7 @@ OK: cluster created } === Declare 'requests': plan installs it and uninstalls the out-of-band six + >>> plan_libs { "libraries": { @@ -104,6 +108,7 @@ OK: cluster created } === Drift: 'requests' is uninstalled out of band; plan reinstalls the declared library + >>> print_requests.py //libraries/uninstall { "method": "POST", @@ -158,6 +163,7 @@ OK: cluster created } === Remove the libraries section: libraries become unmanaged, requests stays installed, no install or uninstall + >>> plan_libs { "libraries": { @@ -183,6 +189,7 @@ OK: cluster created >>> print_requests.py //libraries/uninstall //libraries/install === No-op redeploy: libraries are unmanaged and nothing changes + >>> plan_libs { "libraries": { diff --git a/acceptance/bundle/resources/clusters/libraries-stopped-cluster/output.txt b/acceptance/bundle/resources/clusters/libraries-stopped-cluster/output.txt index d7913bf1bb0..3922fcbc652 100644 --- a/acceptance/bundle/resources/clusters/libraries-stopped-cluster/output.txt +++ b/acceptance/bundle/resources/clusters/libraries-stopped-cluster/output.txt @@ -1,8 +1,10 @@ === Deploy libraries on a started=false cluster + OK: created on stopped cluster === Change the libraries and redeploy the stopped cluster + OK: libraries changed on stopped cluster >>> [CLI] bundle destroy --auto-approve diff --git a/acceptance/bundle/resources/clusters/libraries-update/output.txt b/acceptance/bundle/resources/clusters/libraries-update/output.txt index 64c9ac77476..c1763ab3bfe 100644 --- a/acceptance/bundle/resources/clusters/libraries-update/output.txt +++ b/acceptance/bundle/resources/clusters/libraries-update/output.txt @@ -1,5 +1,6 @@ === Create: the declared library installs on the new cluster + >>> print_requests.py //libraries/install { "method": "POST", @@ -17,6 +18,7 @@ } === Update: adding a library installs the declared set on the running cluster + >>> print_requests.py //libraries/install //libraries/uninstall { "method": "POST", @@ -39,6 +41,7 @@ } === Delete: emptying the libraries list uninstalls them + >>> print_requests.py //libraries/uninstall //libraries/install { "method": "POST", diff --git a/acceptance/bundle/resources/clusters/libraries/output.txt b/acceptance/bundle/resources/clusters/libraries/output.txt index 6e0dc533ca0..92782c38f65 100644 --- a/acceptance/bundle/resources/clusters/libraries/output.txt +++ b/acceptance/bundle/resources/clusters/libraries/output.txt @@ -1,5 +1,6 @@ === Deploy a cluster with a pypi and a local wheel library + >>> jq .plan["resources.clusters.mycluster"].new_state.value.libraries tmp.plan.json [ { @@ -35,6 +36,7 @@ OK: cluster created with libraries } === Removing the wheel and redeploying uninstalls it + >>> print_requests.py //libraries/uninstall { "method": "POST", diff --git a/acceptance/bundle/resources/clusters/resize-terminated-fallback/output.txt b/acceptance/bundle/resources/clusters/resize-terminated-fallback/output.txt index 1b7f5da4ee8..3947b0b2b72 100644 --- a/acceptance/bundle/resources/clusters/resize-terminated-fallback/output.txt +++ b/acceptance/bundle/resources/clusters/resize-terminated-fallback/output.txt @@ -19,7 +19,6 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === Apply saved plan: resize fails with INVALID_STATE, falls back to edit - >>> [CLI] bundle deploy --plan plan.json Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... Resized clusters.test_cluster @@ -49,7 +48,6 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged } === Cluster should have new num_workers - >>> [CLI] clusters get [CLUSTER_ID] { "cluster_name": "test-cluster-[UNIQUE_NAME]", diff --git a/acceptance/bundle/resources/clusters/resize-terminated-fallback/script b/acceptance/bundle/resources/clusters/resize-terminated-fallback/script index 72399f2e419..e8780a28bb7 100644 --- a/acceptance/bundle/resources/clusters/resize-terminated-fallback/script +++ b/acceptance/bundle/resources/clusters/resize-terminated-fallback/script @@ -11,17 +11,17 @@ trace $CLI bundle deploy CLUSTER_ID=$($CLI bundle summary -o json | jq -r '.resources.clusters.test_cluster.id') add_repl "$CLUSTER_ID" CLUSTER_ID -title "Create a plan while cluster is running: should show resize\n" +title "Create a plan while cluster is running: should show resize" update_file.py databricks.yml "num_workers: 2" "num_workers: 3" trace $CLI bundle plan -o json > plan.json -title "Terminate the cluster before applying the saved plan\n" +title "Terminate the cluster before applying the saved plan" $CLI clusters delete "$CLUSTER_ID" > /dev/null trace $CLI clusters get "$CLUSTER_ID" | jq '{cluster_name,num_workers,state}' -title "Apply saved plan: resize fails with INVALID_STATE, falls back to edit\n" +title "Apply saved plan: resize fails with INVALID_STATE, falls back to edit" trace $CLI bundle deploy --plan plan.json trace print_requests.py //clusters/resize //clusters/edit -title "Cluster should have new num_workers\n" +title "Cluster should have new num_workers" trace $CLI clusters get "$CLUSTER_ID" | jq '{cluster_name,num_workers}' diff --git a/acceptance/bundle/resources/dashboards/change-serialized-inline/script b/acceptance/bundle/resources/dashboards/change-serialized-inline/script index f16a2584031..13a0c4a3d9a 100644 --- a/acceptance/bundle/resources/dashboards/change-serialized-inline/script +++ b/acceptance/bundle/resources/dashboards/change-serialized-inline/script @@ -28,7 +28,7 @@ trace $CLI bundle plan -o json > plan_raw.json # Generate golden file by applying nostamp for comparison (discard output) cat plan_raw.json | nostamp > out.plan.json -title "deploy the change\n" +title "deploy the change" $CLI bundle deploy $(readplanarg plan_raw.json) print_requests.py //api/2.0/lakeview/dashboards > out.requests.txt diff --git a/acceptance/bundle/resources/dashboards/detect-change/output.txt b/acceptance/bundle/resources/dashboards/detect-change/output.txt index 06d6548f11e..4f9bd9df273 100644 --- a/acceptance/bundle/resources/dashboards/detect-change/output.txt +++ b/acceptance/bundle/resources/dashboards/detect-change/output.txt @@ -17,6 +17,7 @@ Files: 3 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Assert that the dashboard exists at the expected path and is, indeed, a dashboard: + >>> [CLI] workspace get-status /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/resources/test-dashboard-[UNIQUE_NAME].lvdash.json { "object_type": "DASHBOARD", @@ -38,7 +39,8 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged "warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]" } -=== Load the dashboard by its ID and confirm its display name: { +=== Load the dashboard by its ID and confirm its display name: +{ "display_name": "test-dashboard-[UNIQUE_NAME]", "page_display_name": "New Page" } diff --git a/acceptance/bundle/resources/dashboards/detect-change/script b/acceptance/bundle/resources/dashboards/detect-change/script index cdc1d201a15..a4e28041082 100644 --- a/acceptance/bundle/resources/dashboards/detect-change/script +++ b/acceptance/bundle/resources/dashboards/detect-change/script @@ -29,7 +29,7 @@ rm out.summary.json title "Load the dashboard by its ID and confirm its display name: " echo "$DASHBOARD" | jq '{display_name,page_display_name: (.serialized_dashboard | fromjson | .pages[0].displayName)}' -title "Make an out of band modification to the dashboard and confirm that it is detected:\n" +title "Make an out of band modification to the dashboard and confirm that it is detected:" RESOURCE_ID=$($CLI workspace get-status "${DASHBOARD_PATH}" | jq -r '.resource_id') DASHBOARD_JSON="{\"serialized_dashboard\": \"{}\", \"warehouse_id\": \"$TEST_DEFAULT_WAREHOUSE_ID\"}" UPDATE_RESP=$($CLI lakeview update "${RESOURCE_ID}" --json "${DASHBOARD_JSON}") diff --git a/acceptance/bundle/resources/dashboards/generate_inplace/script b/acceptance/bundle/resources/dashboards/generate_inplace/script index a8112a752a0..6d0a596e4c1 100644 --- a/acceptance/bundle/resources/dashboards/generate_inplace/script +++ b/acceptance/bundle/resources/dashboards/generate_inplace/script @@ -11,10 +11,10 @@ trap cleanup EXIT dashboard_id=$($CLI bundle summary -o json | jq .resources.dashboards.already_exists.id -r) -title "Get current dashboard\n" +title "Get current dashboard" retry $CLI lakeview get $dashboard_id | jq .serialized_dashboard -title "Update dashboard\n" +title "Update dashboard" $CLI lakeview update $dashboard_id --display-name "Updated dashboard" | jq .serialized_dashboard # This should error. diff --git a/acceptance/bundle/resources/database_catalogs/recreate/output.txt b/acceptance/bundle/resources/database_catalogs/recreate/output.txt index 40b7bf2adec..8ea69a0292a 100644 --- a/acceptance/bundle/resources/database_catalogs/recreate/output.txt +++ b/acceptance/bundle/resources/database_catalogs/recreate/output.txt @@ -7,6 +7,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Change an immutable catalog field: no update API, so the plan recreates it + >>> [CLI] bundle plan recreate database_catalogs.my_catalog diff --git a/acceptance/bundle/resources/database_instances/recreate/output.txt b/acceptance/bundle/resources/database_instances/recreate/output.txt index dc6c194d76f..1753e7b135e 100644 --- a/acceptance/bundle/resources/database_instances/recreate/output.txt +++ b/acceptance/bundle/resources/database_instances/recreate/output.txt @@ -6,6 +6,7 @@ Files: 0 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Rename the instance: name is immutable, so the plan recreates it + >>> [CLI] bundle plan recreate database_instances.my_database diff --git a/acceptance/bundle/resources/external_locations/comment_cleared/output.txt b/acceptance/bundle/resources/external_locations/comment_cleared/output.txt index a7b39cb324d..7eb0fc13fc0 100644 --- a/acceptance/bundle/resources/external_locations/comment_cleared/output.txt +++ b/acceptance/bundle/resources/external_locations/comment_cleared/output.txt @@ -7,6 +7,7 @@ Files: 1 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Remove the comment from the configuration and redeploy + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Updated external_locations.location1 @@ -14,6 +15,7 @@ Files: 1 uploaded, 0 deleted Resources: 0 created, 1 changed, 0 deleted, 0 unchanged === The comment the bundle no longer declares + >>> [CLI] api get /api/2.1/unity-catalog/external-locations/myloc "" diff --git a/acceptance/bundle/resources/external_locations/output.txt b/acceptance/bundle/resources/external_locations/output.txt index 56858719e8e..f77f3a6308a 100644 --- a/acceptance/bundle/resources/external_locations/output.txt +++ b/acceptance/bundle/resources/external_locations/output.txt @@ -63,6 +63,7 @@ Resources: 4 created, 0 changed, 0 deleted, 0 unchanged } === Update external location comment + === Redeploy with updated comment >>> [CLI] bundle plan update external_locations.test_location @@ -83,6 +84,7 @@ Resources: 0 created, 1 changed, 0 deleted, 3 unchanged } === Update catalog comment + === Redeploy with updated catalog comment >>> [CLI] bundle plan update catalogs.test_catalog diff --git a/acceptance/bundle/resources/genie_spaces/delete_warning/output.txt b/acceptance/bundle/resources/genie_spaces/delete_warning/output.txt index 52720a7fcda..b0562268af7 100644 --- a/acceptance/bundle/resources/genie_spaces/delete_warning/output.txt +++ b/acceptance/bundle/resources/genie_spaces/delete_warning/output.txt @@ -6,6 +6,7 @@ Files: 4 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Deploying without the genie space warns before deleting it (chat history loss) + >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/genie-delete-warning-[UNIQUE_NAME]/default/files... diff --git a/acceptance/bundle/resources/genie_spaces/version_migration/output.txt b/acceptance/bundle/resources/genie_spaces/version_migration/output.txt index 8b764650fcb..3b7456ac438 100644 --- a/acceptance/bundle/resources/genie_spaces/version_migration/output.txt +++ b/acceptance/bundle/resources/genie_spaces/version_migration/output.txt @@ -9,7 +9,8 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged -=== serialized_space: local version 1, remote version 2, skipped (etag_based){ +=== serialized_space: local version 1, remote version 2, skipped (etag_based) +{ "action": "skip", "reason": "etag_based", "local_version": 1, diff --git a/acceptance/bundle/resources/job_runs/interrupted_run/output.txt b/acceptance/bundle/resources/job_runs/interrupted_run/output.txt index e759bffe272..624c103494a 100644 --- a/acceptance/bundle/resources/job_runs/interrupted_run/output.txt +++ b/acceptance/bundle/resources/job_runs/interrupted_run/output.txt @@ -32,6 +32,7 @@ Exit code: 1 } === a run that is still going is skipped + >>> jq .plan["resources.job_runs.my_run"] tmp.plan.json { "depends_on": [ diff --git a/acceptance/bundle/resources/job_runs/on_bundle_deploy/output.txt b/acceptance/bundle/resources/job_runs/on_bundle_deploy/output.txt index dcf574a7d4f..e514b39bd59 100644 --- a/acceptance/bundle/resources/job_runs/on_bundle_deploy/output.txt +++ b/acceptance/bundle/resources/job_runs/on_bundle_deploy/output.txt @@ -82,6 +82,7 @@ Resources: } === removing on_bundle_deploy is unchanged and does not run + >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged diff --git a/acceptance/bundle/resources/job_runs/on_bundle_deploy/script b/acceptance/bundle/resources/job_runs/on_bundle_deploy/script index 10f95d176f4..cd4a58bab4e 100644 --- a/acceptance/bundle/resources/job_runs/on_bundle_deploy/script +++ b/acceptance/bundle/resources/job_runs/on_bundle_deploy/script @@ -17,7 +17,7 @@ trace $CLI bundle plan # The deploys are not traced: readplanarg makes the command line differ per variant. $CLI bundle plan -o json > tmp.plan.json trace jq '.plan["resources.job_runs.my_run"].changes' tmp.plan.json -title "bundle deploy\n" +title "bundle deploy" $CLI bundle deploy $(readplanarg tmp.plan.json) read_id.py my_run > /dev/null trace $CLI bundle summary @@ -36,6 +36,6 @@ update_file.py databricks.yml " lifecycle: trace $CLI bundle plan $CLI bundle plan -o json > tmp.plan.json trace jq '.plan["resources.job_runs.my_run"].changes' tmp.plan.json -title "bundle deploy\n" +title "bundle deploy" $CLI bundle deploy $(readplanarg tmp.plan.json) trace print_requests.py //jobs/run-now diff --git a/acceptance/bundle/resources/job_runs/on_file_change/output.txt b/acceptance/bundle/resources/job_runs/on_file_change/output.txt index 099497398b4..a9c82f0991c 100644 --- a/acceptance/bundle/resources/job_runs/on_file_change/output.txt +++ b/acceptance/bundle/resources/job_runs/on_file_change/output.txt @@ -31,6 +31,7 @@ Resources: 0 created, 0 changed, 0 deleted, 2 unchanged >>> print_requests.py //jobs/run-now === touch without content change plans nothing + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/job-runs-on-file-change/default/files... Files: 1 uploaded, 0 deleted @@ -39,6 +40,7 @@ Resources: 0 created, 0 changed, 0 deleted, 2 unchanged >>> print_requests.py //jobs/run-now === editing the file re-fires + >>> jq .plan["resources.job_runs.my_run"] tmp.plan1.json { "depends_on": [ @@ -113,6 +115,7 @@ Resources: 1 created, 0 changed, 1 deleted, 1 unchanged Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged === deleting the file warns and re-fires + >>> [CLI] bundle plan -o json Warning: lifecycle.triggers.on_file_change: no synced files match "seed.txt" in databricks.yml:18:29 @@ -194,6 +197,7 @@ Warning: lifecycle.triggers.on_file_change: no synced files match "seed.txt" Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged === restoring the file re-fires again + >>> [CLI] bundle plan -o json Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/job-runs-on-file-change/default/files... Output from job_runs.my_run: id=[MY_RUN_ID_4]: Run URL: [DATABRICKS_URL]/jobs/[MY_JOB_ID]/runs/[MY_RUN_ID_4]?o=[NUMID] @@ -216,6 +220,7 @@ Resources: 1 created, 0 changed, 1 deleted, 1 unchanged Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged === removing on_file_change is unchanged and does not run + >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged diff --git a/acceptance/bundle/resources/job_runs/on_file_change/script b/acceptance/bundle/resources/job_runs/on_file_change/script index 6a3121450c8..2a7e23ac042 100644 --- a/acceptance/bundle/resources/job_runs/on_file_change/script +++ b/acceptance/bundle/resources/job_runs/on_file_change/script @@ -32,7 +32,7 @@ title "editing the file re-fires" update_file.py seed.txt "v1" "v2" $CLI bundle plan -o json > tmp.plan1.json trace jq '.plan["resources.job_runs.my_run"]' tmp.plan1.json -title "bundle deploy\n" +title "bundle deploy" $CLI bundle deploy $(readplanarg tmp.plan1.json) read_id.py my_run > /dev/null trace print_requests.py --keep //jobs/runs/delete @@ -63,7 +63,7 @@ update_file.py databricks.yml " lifecycle: " "" trace $CLI bundle plan $CLI bundle plan -o json > tmp.plan4.json -title "bundle deploy\n" +title "bundle deploy" $CLI bundle deploy $(readplanarg tmp.plan4.json) trace print_requests.py //jobs/run-now plan_no_changes diff --git a/acceptance/bundle/resources/job_runs/on_file_change_build/output.txt b/acceptance/bundle/resources/job_runs/on_file_change_build/output.txt index fa2cc712902..d92e75f99d8 100644 --- a/acceptance/bundle/resources/job_runs/on_file_change_build/output.txt +++ b/acceptance/bundle/resources/job_runs/on_file_change_build/output.txt @@ -24,6 +24,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === a prebuild file change re-fires in the same deploy + >>> [CLI] bundle deploy Executing 'prebuild' script Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/job-runs-on-file-change-build/default/files... diff --git a/acceptance/bundle/resources/job_runs/on_file_change_errors/output.txt b/acceptance/bundle/resources/job_runs/on_file_change_errors/output.txt index 73f170fe8e9..2570f97c746 100644 --- a/acceptance/bundle/resources/job_runs/on_file_change_errors/output.txt +++ b/acceptance/bundle/resources/job_runs/on_file_change_errors/output.txt @@ -13,6 +13,7 @@ Workspace: Found 1 error === a glob that only matches directories warns + >>> [CLI] bundle validate Warning: lifecycle.triggers.on_file_change: no synced files match "dirs/*" in databricks.yml:24:29 @@ -26,6 +27,7 @@ Workspace: Found 1 warning === a glob matching a directory and an excluded file warns + >>> [CLI] bundle validate Warning: lifecycle.triggers.on_file_change: no synced files match "mixed/*" in databricks.yml:24:29 @@ -39,6 +41,7 @@ Workspace: Found 1 warning === a glob matching only excluded files warns + >>> [CLI] bundle validate Warning: lifecycle.triggers.on_file_change: no synced files match "allexcluded/*" in databricks.yml:24:29 @@ -52,6 +55,7 @@ Workspace: Found 1 warning === a pattern that matches nothing warns + >>> [CLI] bundle validate Warning: lifecycle.triggers.on_file_change: no synced files match "missing/*.txt" in databricks.yml:24:29 @@ -65,6 +69,7 @@ Workspace: Found 1 warning === ** is not supported + >>> musterr [CLI] bundle validate Error: lifecycle.triggers.on_file_change: ** in "src/**" is not supported; use * for a single directory level in databricks.yml:24:29 @@ -78,6 +83,7 @@ Workspace: Found 1 error === an absolute pattern is rejected + >>> musterr [CLI] bundle validate Error: lifecycle.triggers.on_file_change: pattern "/tmp/seed.txt" must be relative to the defining YAML file in databricks.yml:18:29 diff --git a/acceptance/bundle/resources/job_runs/on_file_change_glob/output.txt b/acceptance/bundle/resources/job_runs/on_file_change_glob/output.txt index 3963f98f4c1..370ec57654a 100644 --- a/acceptance/bundle/resources/job_runs/on_file_change_glob/output.txt +++ b/acceptance/bundle/resources/job_runs/on_file_change_glob/output.txt @@ -127,10 +127,12 @@ Resources: 1 created, 0 changed, 1 deleted, 1 unchanged } === editing a gitignored file does not re-fire + >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged === removing one pattern does not re-fire + >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged diff --git a/acceptance/bundle/resources/job_runs/on_file_change_glob/script b/acceptance/bundle/resources/job_runs/on_file_change_glob/script index 04a951a4bc2..bc69fc1605a 100644 --- a/acceptance/bundle/resources/job_runs/on_file_change_glob/script +++ b/acceptance/bundle/resources/job_runs/on_file_change_glob/script @@ -19,34 +19,34 @@ trace read_id.py my_job read_id.py my_run > /dev/null trace print_requests.py //jobs/run-now -title "editing one matched file re-fires\n" +title "editing one matched file re-fires" update_file.py migrations/001.txt "one" "one-edited" changes # The deploy is not traced: readplanarg makes the command line differ per variant. -title "bundle deploy\n" +title "bundle deploy" $CLI bundle deploy $(readplanarg tmp.plan.json) read_id.py my_run > /dev/null trace print_requests.py --keep //jobs/runs/delete trace print_requests.py //jobs/run-now -title "editing a file in a subdirectory re-fires\n" +title "editing a file in a subdirectory re-fires" # printf keeps LF on Windows, where update_file.py's text-mode rewrite would # restore CRLF and leave the file hashing differently than the deploy above. printf 'sub-edited\n' > mysubdir/a.txt changes printf 'sub\n' > mysubdir/a.txt -title "a new matching file re-fires\n" +title "a new matching file re-fires" printf 'three\n' > migrations/003.txt changes rm migrations/003.txt -title "removing a matched file re-fires\n" +title "removing a matched file re-fires" mv migrations/002.txt tmp.002.txt changes mv tmp.002.txt migrations/002.txt -title "editing a file below the glob does not re-fire\n" +title "editing a file below the glob does not re-fire" # migrations/* matches the archive directory itself, which is skipped: the glob # does not descend into it. update_file.py migrations/archive/003.txt "three" "three-edited" diff --git a/acceptance/bundle/resources/job_runs/on_file_change_include_sync_root/output.txt b/acceptance/bundle/resources/job_runs/on_file_change_include_sync_root/output.txt index b7dd158c070..f5d63df87a1 100644 --- a/acceptance/bundle/resources/job_runs/on_file_change_include_sync_root/output.txt +++ b/acceptance/bundle/resources/job_runs/on_file_change_include_sync_root/output.txt @@ -1,5 +1,6 @@ === first deploy + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/job-runs-on-file-change-include-sync-root/default/files... Created jobs.my_job @@ -17,6 +18,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === editing the file next to the included YAML re-fires + >>> changes { "lifecycle.triggers_state.on_file_change['bundle/resources/watched-resources.txt']": { @@ -34,6 +36,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === editing the file at the bundle root re-fires + >>> changes { "lifecycle.triggers_state.on_file_change['bundle/watched-bundle.txt']": { @@ -51,6 +54,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === editing the file at the sync root re-fires + >>> changes { "lifecycle.triggers_state.on_file_change['shared.txt']": { diff --git a/acceptance/bundle/resources/job_runs/on_file_change_predeploy/output.txt b/acceptance/bundle/resources/job_runs/on_file_change_predeploy/output.txt index 1ea9a3ff990..0d19b389bb5 100644 --- a/acceptance/bundle/resources/job_runs/on_file_change_predeploy/output.txt +++ b/acceptance/bundle/resources/job_runs/on_file_change_predeploy/output.txt @@ -24,6 +24,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === a predeploy file change re-fires in the same deploy + >>> [CLI] bundle deploy Executing 'predeploy' script Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/job-runs-on-file-change-predeploy/default/files... diff --git a/acceptance/bundle/resources/job_runs/wait/output.txt b/acceptance/bundle/resources/job_runs/wait/output.txt index 0d7596a9462..47e5784aed0 100644 --- a/acceptance/bundle/resources/job_runs/wait/output.txt +++ b/acceptance/bundle/resources/job_runs/wait/output.txt @@ -14,6 +14,7 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged [MY_RUN_ID] === the downstream job was created with the run's result_state + >>> [CLI] jobs get [DOWNSTREAM_JOB_ID] -o json SUCCESS diff --git a/acceptance/bundle/resources/jobs/check-metadata/script b/acceptance/bundle/resources/jobs/check-metadata/script index a486009c74c..6af4fe8ed7b 100644 --- a/acceptance/bundle/resources/jobs/check-metadata/script +++ b/acceptance/bundle/resources/jobs/check-metadata/script @@ -16,10 +16,10 @@ trace cat out.summary.json JOB_1_ID=$(jq -r '.id' out.summary.json) add_repl "$JOB_1_ID" JOB_1_ID rm out.summary.json -title "Assert job 1 is created\n" +title "Assert job 1 is created" $CLI jobs get "${JOB_1_ID}" | jq '{name: .settings.name}' -title "Assert job 2 is created\n" +title "Assert job 2 is created" JOB_2_ID=$($CLI bundle summary -o json | jq -r '.resources.jobs.bar.id') add_repl "$JOB_2_ID" JOB_2_ID $CLI jobs get "${JOB_2_ID}" | jq '{name: .settings.name}' diff --git a/acceptance/bundle/resources/jobs/cluster_policy/config_conflicts_policy/output.txt b/acceptance/bundle/resources/jobs/cluster_policy/config_conflicts_policy/output.txt index b28170e7362..24027952ceb 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/config_conflicts_policy/output.txt +++ b/acceptance/bundle/resources/jobs/cluster_policy/config_conflicts_policy/output.txt @@ -1,6 +1,5 @@ === A cluster tag contradicting a fixed policy value is rejected at create - >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... Created cluster_policies.my_policy diff --git a/acceptance/bundle/resources/jobs/cluster_policy/config_conflicts_policy/script b/acceptance/bundle/resources/jobs/cluster_policy/config_conflicts_policy/script index b8cb4a39cbf..f8004aa8af1 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/config_conflicts_policy/script +++ b/acceptance/bundle/resources/jobs/cluster_policy/config_conflicts_policy/script @@ -5,5 +5,5 @@ cleanup() { } trap cleanup EXIT -title "A cluster tag contradicting a fixed policy value is rejected at create\n" +title "A cluster tag contradicting a fixed policy value is rejected at create" musterr trace $CLI bundle deploy diff --git a/acceptance/bundle/resources/jobs/cluster_policy/default_flag/output.txt b/acceptance/bundle/resources/jobs/cluster_policy/default_flag/output.txt index 0b92fbd4538..a88f0100798 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/default_flag/output.txt +++ b/acceptance/bundle/resources/jobs/cluster_policy/default_flag/output.txt @@ -21,7 +21,6 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged ] === Neither is drift on a second plan - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged diff --git a/acceptance/bundle/resources/jobs/cluster_policy/default_flag/script b/acceptance/bundle/resources/jobs/cluster_policy/default_flag/script index f359b41276d..fd34a51bfbc 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/default_flag/script +++ b/acceptance/bundle/resources/jobs/cluster_policy/default_flag/script @@ -8,9 +8,9 @@ trap cleanup EXIT trace $CLI bundle deploy job_id=$(read_id.py my_job) -title "defaultValue is supplied only with apply_policy_default_values (flag_on), not flag_off\n" +title "defaultValue is supplied only with apply_policy_default_values (flag_on), not flag_off" $CLI jobs get "$job_id" | jq -S '[.settings.job_clusters[] | {job_cluster_key, custom_tags: .new_cluster.custom_tags}]' -title "Neither is drift on a second plan\n" +title "Neither is drift on a second plan" trace $CLI bundle plan diff --git a/acceptance/bundle/resources/jobs/cluster_policy/fixed_addition/output.txt b/acceptance/bundle/resources/jobs/cluster_policy/fixed_addition/output.txt index 6aca041061f..e296df50722 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/fixed_addition/output.txt +++ b/acceptance/bundle/resources/jobs/cluster_policy/fixed_addition/output.txt @@ -7,12 +7,10 @@ Files: 3 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Policy-supplied spark_version and custom_tags are not drift at any cluster-spec location - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged === Each is classified remote_addition - >>> [CLI] bundle plan -o json { "job_clusters[job_cluster_key='job_cluster'].new_cluster.custom_tags": { diff --git a/acceptance/bundle/resources/jobs/cluster_policy/fixed_addition/script b/acceptance/bundle/resources/jobs/cluster_policy/fixed_addition/script index 3c6c5f02c10..15a126e9ffd 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/fixed_addition/script +++ b/acceptance/bundle/resources/jobs/cluster_policy/fixed_addition/script @@ -7,9 +7,9 @@ trap cleanup EXIT trace $CLI bundle deploy -title "Policy-supplied spark_version and custom_tags are not drift at any cluster-spec location\n" +title "Policy-supplied spark_version and custom_tags are not drift at any cluster-spec location" trace $CLI bundle plan -title "Each is classified remote_addition\n" +title "Each is classified remote_addition" trace $CLI bundle plan -o json | jq -S '.plan["resources.jobs.my_job"].changes | with_entries(select(.key | test("custom_tags|spark_version")))' diff --git a/acceptance/bundle/resources/jobs/cluster_policy/owned_tag_drift/output.txt b/acceptance/bundle/resources/jobs/cluster_policy/owned_tag_drift/output.txt index 33d79d43fe2..029dd075681 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/owned_tag_drift/output.txt +++ b/acceptance/bundle/resources/jobs/cluster_policy/owned_tag_drift/output.txt @@ -14,7 +14,6 @@ update jobs.my_job Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged === Removing a config-owned tag is a change the user asked for, not a backend addition - >>> update_file.py databricks.yml Mine: mine Other: other >>> [CLI] bundle plan -o json diff --git a/acceptance/bundle/resources/jobs/cluster_policy/owned_tag_drift/script b/acceptance/bundle/resources/jobs/cluster_policy/owned_tag_drift/script index d86c89445ee..3fd3c0ca5f5 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/owned_tag_drift/script +++ b/acceptance/bundle/resources/jobs/cluster_policy/owned_tag_drift/script @@ -8,14 +8,14 @@ trap cleanup EXIT trace $CLI bundle deploy job_id=$(read_id.py my_job) -title "An out-of-band change to a config-owned tag is drift, even with a policy attached\n" +title "An out-of-band change to a config-owned tag is drift, even with a policy attached" edit_resource.py jobs "$job_id" <<'EOF' for jc in r["job_clusters"]: jc["new_cluster"]["custom_tags"]["Mine"] = "changed-out-of-band" EOF trace $CLI bundle plan | contains.py "1 to change" -title "Removing a config-owned tag is a change the user asked for, not a backend addition\n" +title "Removing a config-owned tag is a change the user asked for, not a backend addition" trace update_file.py databricks.yml "Mine: mine" "Other: other" trace $CLI bundle plan -o json | jq -S '.plan["resources.jobs.my_job"].changes | with_entries(select(.key | test("custom_tags")))' diff --git a/acceptance/bundle/resources/jobs/cluster_policy/policy_id_scoping/output.txt b/acceptance/bundle/resources/jobs/cluster_policy/policy_id_scoping/output.txt index 004baa641d2..7f0c6336781 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/policy_id_scoping/output.txt +++ b/acceptance/bundle/resources/jobs/cluster_policy/policy_id_scoping/output.txt @@ -9,7 +9,6 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Inject a remote-only tag on the ungated cluster (no policy_id) to show it is not gated === The gated cluster's policy tag is skipped; the ungated cluster's tag is drift - >>> [CLI] bundle plan -o json { "job_clusters[job_cluster_key='gated'].new_cluster.custom_tags": { diff --git a/acceptance/bundle/resources/jobs/cluster_policy/policy_id_scoping/script b/acceptance/bundle/resources/jobs/cluster_policy/policy_id_scoping/script index cdbdcaba7c0..6c5da851234 100644 --- a/acceptance/bundle/resources/jobs/cluster_policy/policy_id_scoping/script +++ b/acceptance/bundle/resources/jobs/cluster_policy/policy_id_scoping/script @@ -8,13 +8,13 @@ trap cleanup EXIT trace $CLI bundle deploy job_id=$(read_id.py my_job) -title "Inject a remote-only tag on the ungated cluster (no policy_id) to show it is not gated\n" +title "Inject a remote-only tag on the ungated cluster (no policy_id) to show it is not gated" edit_resource.py jobs "$job_id" <<'EOF' for jc in r["job_clusters"]: if jc["job_cluster_key"] == "ungated": jc["new_cluster"]["custom_tags"] = {"Injected": "out-of-band"} EOF -title "The gated cluster's policy tag is skipped; the ungated cluster's tag is drift\n" +title "The gated cluster's policy tag is skipped; the ungated cluster's tag is drift" trace $CLI bundle plan -o json | jq -S '.plan["resources.jobs.my_job"].changes | with_entries(select(.key | test("custom_tags")))' diff --git a/acceptance/bundle/resources/jobs/fail-on-active-runs/output.txt b/acceptance/bundle/resources/jobs/fail-on-active-runs/output.txt index 5676ea96cc6..4c634bb82f5 100644 --- a/acceptance/bundle/resources/jobs/fail-on-active-runs/output.txt +++ b/acceptance/bundle/resources/jobs/fail-on-active-runs/output.txt @@ -16,6 +16,7 @@ Files: 3 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Remove .databricks directory to simulate a fresh deployment + === deploy empty bundle again >>> [CLI] bundle deploy --fail-on-active-runs Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-jobs-active-runs-test-[UNIQUE_NAME]/default/files... diff --git a/acceptance/bundle/resources/jobs/remote_delete/removed_from_config/output.txt b/acceptance/bundle/resources/jobs/remote_delete/removed_from_config/output.txt index 2db3607d8a6..d1bda1b2fa4 100644 --- a/acceptance/bundle/resources/jobs/remote_delete/removed_from_config/output.txt +++ b/acceptance/bundle/resources/jobs/remote_delete/removed_from_config/output.txt @@ -11,6 +11,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] pipelines delete [UUID] === Remove resources from config, plan and deploy + === Plan and deploy again, then summary >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 0 unchanged diff --git a/acceptance/bundle/resources/jobs/remote_matches_config/output.txt b/acceptance/bundle/resources/jobs/remote_matches_config/output.txt index 18763b94677..118e6f6bd6a 100644 --- a/acceptance/bundle/resources/jobs/remote_matches_config/output.txt +++ b/acceptance/bundle/resources/jobs/remote_matches_config/output.txt @@ -12,6 +12,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Make local changes: update max_concurrent_runs to 2 + === Make remote changes via CLI: add a new tag and set timeout >>> [CLI] bundle plan diff --git a/acceptance/bundle/resources/jobs/remote_matches_config/script b/acceptance/bundle/resources/jobs/remote_matches_config/script index 3b3b62ad4a1..62455246a42 100755 --- a/acceptance/bundle/resources/jobs/remote_matches_config/script +++ b/acceptance/bundle/resources/jobs/remote_matches_config/script @@ -7,7 +7,7 @@ trace $CLI bundle plan | contains.py "0 to add, 0 to change, 0 to delete" title "Make local changes: update max_concurrent_runs to 2" update_file.py databricks.yml "max_concurrent_runs: 1" "max_concurrent_runs: 2" -title "Make remote changes via CLI: add a new tag and set timeout\n" +title "Make remote changes via CLI: add a new tag and set timeout" edit_resource.py jobs $job_id <>> [CLI] jobs get [FOO_ID] { "created_time": [UNIX_TIME_MILLIS], diff --git a/acceptance/bundle/resources/jobs/update_single_node/output.txt b/acceptance/bundle/resources/jobs/update_single_node/output.txt index 21ce8c8f446..c2d4da9e6d6 100644 --- a/acceptance/bundle/resources/jobs/update_single_node/output.txt +++ b/acceptance/bundle/resources/jobs/update_single_node/output.txt @@ -32,6 +32,7 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Fetch job ID and verify remote state + >>> [CLI] jobs get [FOO_ID] { "created_time": [UNIX_TIME_MILLIS], diff --git a/acceptance/bundle/resources/jobs/webhook-reorder-remote/script b/acceptance/bundle/resources/jobs/webhook-reorder-remote/script index 64e56ce732e..7311dbad12f 100644 --- a/acceptance/bundle/resources/jobs/webhook-reorder-remote/script +++ b/acceptance/bundle/resources/jobs/webhook-reorder-remote/script @@ -4,7 +4,7 @@ job_id="$(read_id.py my_job)" trace $CLI bundle plan | contains.py "0 to add, 0 to change, 0 to delete" -title "Remote returns webhook destinations in a different order\n" +title "Remote returns webhook destinations in a different order" edit_resource.py jobs "$job_id" <>> [CLI] bundle plan --output json { diff --git a/acceptance/bundle/resources/model_serving_endpoints/drift/telemetry_config_with_config_update/output.txt b/acceptance/bundle/resources/model_serving_endpoints/drift/telemetry_config_with_config_update/output.txt index 093d5875e98..0ae256da7dc 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/drift/telemetry_config_with_config_update/output.txt +++ b/acceptance/bundle/resources/model_serving_endpoints/drift/telemetry_config_with_config_update/output.txt @@ -7,6 +7,7 @@ Files: 1 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Update config and telemetry_config + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Updated model_serving_endpoints.endpoint1 @@ -27,6 +28,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged 2 {"method": "GET", "path": "/api/2.0/serving-endpoints/test-endpoint"} === Remove telemetry_config + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Updated model_serving_endpoints.endpoint1 diff --git a/acceptance/bundle/resources/models/basic/output.txt b/acceptance/bundle/resources/models/basic/output.txt index 6727e0d9d9e..69cd38ece44 100644 --- a/acceptance/bundle/resources/models/basic/output.txt +++ b/acceptance/bundle/resources/models/basic/output.txt @@ -68,6 +68,7 @@ Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged } === add a new tag, this should be a no-op; terraform does make an update request but since update request has no tags in it, it does nothing; direct skips request completely + >>> [CLI] bundle plan >>> [CLI] bundle deploy -qq diff --git a/acceptance/bundle/resources/models/readplan-permissions/output.txt b/acceptance/bundle/resources/models/readplan-permissions/output.txt index a4e059b61a7..704bf1b2389 100644 --- a/acceptance/bundle/resources/models/readplan-permissions/output.txt +++ b/acceptance/bundle/resources/models/readplan-permissions/output.txt @@ -29,7 +29,8 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } } -=== Remove manager permission and description, deploy from planUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... +=== Remove manager permission and description, deploy from plan +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Updated models.mymodel Updated models.mymodel.permissions Files: 2 uploaded, 0 deleted diff --git a/acceptance/bundle/resources/permissions/factcheck/script b/acceptance/bundle/resources/permissions/factcheck/script index cbddce58087..7045272200d 100644 --- a/acceptance/bundle/resources/permissions/factcheck/script +++ b/acceptance/bundle/resources/permissions/factcheck/script @@ -16,7 +16,7 @@ add_repl "$sql_warehouse_id" SQL_WAREHOUSE_ID user=deco-test-user@databricks.com -title "Permissions API simply takes the latest level in the request for a given principal\n" +title "Permissions API simply takes the latest level in the request for a given principal" python3 check_permissions.py $user jobs $job_id CAN_VIEW,CAN_MANAGE_RUN CAN_MANAGE_RUN python3 check_permissions.py $user jobs $job_id CAN_MANAGE_RUN,CAN_VIEW CAN_VIEW python3 check_permissions.py $user jobs $job_id CAN_VIEW,CAN_MANAGE_RUN,CAN_MANAGE CAN_MANAGE @@ -24,7 +24,7 @@ python3 check_permissions.py $user jobs $job_id CAN_MANAGE,CAN_MANAGE_RUN CAN_MA python3 check_permissions.py $CURRENT_USER_NAME jobs $job_id CAN_MANAGE,IS_OWNER IS_OWNER -title "Since we take the most recent level, IS_OWNER is lost, which results in the error due to lack of owner defined\n" +title "Since we take the most recent level, IS_OWNER is lost, which results in the error due to lack of owner defined" musterr python3 check_permissions.py $CURRENT_USER_NAME jobs $job_id IS_OWNER,CAN_MANAGE CAN_MANAGE python3 check_permissions.py $user sql/warehouses $sql_warehouse_id CAN_VIEW,CAN_USE CAN_USE diff --git a/acceptance/bundle/resources/permissions/jobs/delete_one/script b/acceptance/bundle/resources/permissions/jobs/delete_one/script index ef6e2142e07..738a6622064 100644 --- a/acceptance/bundle/resources/permissions/jobs/delete_one/script +++ b/acceptance/bundle/resources/permissions/jobs/delete_one/script @@ -26,7 +26,7 @@ job_id="$(read_id.py job_with_permissions)" $CLI permissions get jobs "$job_id" | gron.py --sort-arrays access_control_list | grep -v display_name > out.permissions_create.txt rm -f "$OUT_REQUESTS" -title "Delete one permission and deploy again\n" +title "Delete one permission and deploy again" grep -v DELETE databricks.yml > tmp.yml && mv tmp.yml databricks.yml trace $CLI bundle deploy print_requests.py --nostamp //jobs/ | gron.py --sort-arrays access_control_list > out.requests_update.txt diff --git a/acceptance/bundle/resources/permissions/jobs/update/output.txt b/acceptance/bundle/resources/permissions/jobs/update/output.txt index 1ed877b8f1a..eafa8ab31e6 100644 --- a/acceptance/bundle/resources/permissions/jobs/update/output.txt +++ b/acceptance/bundle/resources/permissions/jobs/update/output.txt @@ -115,7 +115,6 @@ Resources: 0 created, 0 changed, 0 deleted, 1 unchanged Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged === Restore original config - >>> diff.py databricks.yml.saved databricks.yml --- databricks.yml.saved +++ databricks.yml diff --git a/acceptance/bundle/resources/permissions/jobs/update/script b/acceptance/bundle/resources/permissions/jobs/update/script index 0396e6b68e4..0807e13e8cf 100644 --- a/acceptance/bundle/resources/permissions/jobs/update/script +++ b/acceptance/bundle/resources/permissions/jobs/update/script @@ -11,28 +11,28 @@ job_id="$(read_id.py job_with_permissions)" trace $CLI permissions get jobs "$job_id" rm -f "$OUT_REQUESTS" -title "Update one permission and deploy again\n" +title "Update one permission and deploy again" update_file.py databricks.yml CAN_VIEW CAN_MANAGE trace $CLI bundle plan -o json | nostamp > out.plan_update.json trace $CLI bundle deploy trace print_requests.py --nostamp //jobs/ > out.requests_update.json trace $CLI bundle plan -title "Delete one permission and deploy again\n" +title "Delete one permission and deploy again" grep -v DELETE_ONE databricks.yml > tmp.yml && mv tmp.yml databricks.yml trace $CLI bundle plan -o json | nostamp > out.plan_delete_one.json trace $CLI bundle deploy trace print_requests.py --nostamp //jobs/ > out.requests_delete_one.json trace $CLI bundle plan -title "Delete the whole block and deploy again\n" +title "Delete the whole block and deploy again" grep -v PERMISSIONS databricks.yml > tmp.yml && mv tmp.yml databricks.yml trace $CLI bundle plan -o json | nostamp > out.plan_delete_all.json trace $CLI bundle deploy trace print_requests.py --nostamp //jobs/ > out.requests_delete_all.json trace $CLI bundle plan -title "Restore original config\n" +title "Restore original config" trace diff.py databricks.yml.saved databricks.yml mv databricks.yml.saved databricks.yml @@ -41,7 +41,7 @@ trace $CLI bundle deploy trace print_requests.py --nostamp //jobs/ > out.requests_restore_original.json trace $CLI bundle plan -title "Set permissions: []\n" +title "Set permissions: []" grep -vE '(PERMISSIONS|DELETE_ONE)' databricks.yml > tmp.yml && mv tmp.yml databricks.yml update_file.py databricks.yml '# permissions: [] # EXPLICIT_EMPTY' 'permissions: [] # EXPLICIT_EMPTY' trace $CLI bundle plan -o json | nostamp > out.plan_set_empty.json diff --git a/acceptance/bundle/resources/permissions/pipelines/update/script b/acceptance/bundle/resources/permissions/pipelines/update/script index 3be2be37147..209ab959dcb 100644 --- a/acceptance/bundle/resources/permissions/pipelines/update/script +++ b/acceptance/bundle/resources/permissions/pipelines/update/script @@ -9,21 +9,21 @@ pipeline_id="$(read_id.py foo)" trace $CLI permissions get pipelines "$pipeline_id" rm -f "$OUT_REQUESTS" -title "Update one permission and deploy again\n" +title "Update one permission and deploy again" update_file.py databricks.yml CAN_VIEW CAN_MANAGE trace $CLI bundle plan -o json | nostamp > out.plan_update.json trace $CLI bundle deploy trace print_requests.py --nostamp //pipeline '^//api/2.0/bundle' > out.requests_update.json trace $CLI bundle plan -title "Delete one permission and deploy again\n" +title "Delete one permission and deploy again" grep -v DELETE_ONE databricks.yml > tmp.yml && mv tmp.yml databricks.yml trace $CLI bundle plan -o json | nostamp > out.plan_delete_one.json trace $CLI bundle deploy trace print_requests.py --nostamp //pipeline '^//api/2.0/bundle' > out.requests_delete_one.json trace $CLI bundle plan -title "Delete the whole block and deploy again\n" +title "Delete the whole block and deploy again" grep -v PERMISSIONS databricks.yml > tmp.yml && mv tmp.yml databricks.yml trace cat databricks.yml trace $CLI bundle plan -o json | nostamp > out.plan_delete_all.json @@ -31,7 +31,7 @@ trace $CLI bundle deploy trace print_requests.py --nostamp //pipeline '^//api/2.0/bundle' --sort > out.requests_delete_all.json trace $CLI bundle plan -title "Restore original config\n" +title "Restore original config" mv databricks.yml.saved databricks.yml trace $CLI bundle plan -o json | nostamp > out.plan_restore.json trace $CLI bundle deploy diff --git a/acceptance/bundle/resources/pipelines/auto-approve/output.txt b/acceptance/bundle/resources/pipelines/auto-approve/output.txt index 3795c17db35..5cb7b68eb4a 100644 --- a/acceptance/bundle/resources/pipelines/auto-approve/output.txt +++ b/acceptance/bundle/resources/pipelines/auto-approve/output.txt @@ -7,6 +7,7 @@ Files: 6 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Assert the pipeline is created + >>> [CLI] pipelines get [UUID] { "spec": { @@ -29,7 +30,8 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } } -=== Assert the job is created{ +=== Assert the job is created +{ "name": "test-bundle-job-[UNIQUE_NAME]" } diff --git a/acceptance/bundle/resources/pipelines/cluster_policy/output.txt b/acceptance/bundle/resources/pipelines/cluster_policy/output.txt index b337f807267..de0c529839a 100644 --- a/acceptance/bundle/resources/pipelines/cluster_policy/output.txt +++ b/acceptance/bundle/resources/pipelines/cluster_policy/output.txt @@ -7,7 +7,6 @@ Files: 3 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === A pipeline cluster with policy_id converges: the Pipelines API does not expand the policy - >>> [CLI] bundle plan Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged diff --git a/acceptance/bundle/resources/pipelines/cluster_policy/script b/acceptance/bundle/resources/pipelines/cluster_policy/script index dfe1ad7caa2..de3678d8ec0 100644 --- a/acceptance/bundle/resources/pipelines/cluster_policy/script +++ b/acceptance/bundle/resources/pipelines/cluster_policy/script @@ -7,5 +7,5 @@ trap cleanup EXIT trace $CLI bundle deploy -title "A pipeline cluster with policy_id converges: the Pipelines API does not expand the policy\n" +title "A pipeline cluster with policy_id converges: the Pipelines API does not expand the policy" trace $CLI bundle plan diff --git a/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/output.txt b/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/output.txt index 831e9e36a7d..79153dd4e53 100644 --- a/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/output.txt +++ b/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/output.txt @@ -105,6 +105,7 @@ Resources: 1 created, 0 changed, 1 deleted, 0 unchanged } === Fetch pipeline ID and verify remote state + >>> [CLI] pipelines get [MY_ID_2] { "creator_user_name": "[USERNAME]", diff --git a/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/output.txt b/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/output.txt index 4152f08a59b..066e214624a 100644 --- a/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/output.txt +++ b/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/output.txt @@ -95,6 +95,7 @@ Resources: 1 created, 0 changed, 1 deleted, 0 unchanged } === Fetch pipeline ID and verify remote state + >>> [CLI] pipelines get [MY_ID_2] { "creator_user_name": "[USERNAME]", diff --git a/acceptance/bundle/resources/pipelines/recreate/output.txt b/acceptance/bundle/resources/pipelines/recreate/output.txt index 65a8f543cfe..c86c41b44ee 100644 --- a/acceptance/bundle/resources/pipelines/recreate/output.txt +++ b/acceptance/bundle/resources/pipelines/recreate/output.txt @@ -7,6 +7,7 @@ Files: 3 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Assert the pipeline is created with catalog + >>> [CLI] pipelines get [UUID] { "spec": { diff --git a/acceptance/bundle/resources/pipelines/remote_matches_config/output.txt b/acceptance/bundle/resources/pipelines/remote_matches_config/output.txt index 774b5582008..3c706fb19dd 100644 --- a/acceptance/bundle/resources/pipelines/remote_matches_config/output.txt +++ b/acceptance/bundle/resources/pipelines/remote_matches_config/output.txt @@ -6,7 +6,9 @@ Files: 1 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Make local change: run_as user -> changed@example.test + === Force remote run_as to match the new config value + >>> [CLI] bundle plan update pipelines.my_pipeline diff --git a/acceptance/bundle/resources/pipelines/update/output.txt b/acceptance/bundle/resources/pipelines/update/output.txt index f84d08b7557..205db30af7c 100644 --- a/acceptance/bundle/resources/pipelines/update/output.txt +++ b/acceptance/bundle/resources/pipelines/update/output.txt @@ -37,6 +37,7 @@ Files: 1 uploaded, 0 deleted Resources: 0 created, 1 changed, 0 deleted, 0 unchanged === Fetch pipeline ID and verify remote state + >>> [CLI] pipelines get [MY_ID] { "creator_user_name": "[USERNAME]", diff --git a/acceptance/bundle/resources/postgres_branches/purge_on_delete/output.txt b/acceptance/bundle/resources/postgres_branches/purge_on_delete/output.txt index b38d10cd744..ab4490ab49c 100644 --- a/acceptance/bundle/resources/postgres_branches/purge_on_delete/output.txt +++ b/acceptance/bundle/resources/postgres_branches/purge_on_delete/output.txt @@ -55,4 +55,5 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --sort --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ === bundle destroy + >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --sort --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt b/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt index 5441f61b43b..a4373139121 100644 --- a/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt +++ b/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt @@ -11,6 +11,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged (unset) === Step 2: set purge_on_delete: true + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch @@ -21,6 +22,7 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged json.state.resources.postgres_branches.branch.state.purge_on_delete = true; === Step 3: flip to purge_on_delete: false + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch @@ -31,6 +33,7 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged json.state.resources.postgres_branches.branch.state.purge_on_delete = false; === Step 4: remove the line again + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch @@ -41,4 +44,5 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged (unset) === bundle destroy (branch DELETE must be a plain DELETE, no ?purge=true) + >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --sort --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_branches/recreate/output.txt b/acceptance/bundle/resources/postgres_branches/recreate/output.txt index 78cf8d611dc..b1fdacabf8f 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate/output.txt @@ -38,6 +38,7 @@ Files: 0 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Change branch_id (should trigger recreation in direct, update in terraform) + >>> cat databricks.yml bundle: name: deploy-postgres-branch-recreate-[UNIQUE_NAME] @@ -74,6 +75,7 @@ Files: 0 uploaded, 0 deleted Resources: 1 created, 0 changed, 1 deleted, 1 unchanged === Fetch new branch ID + === Destroy and verify cleanup >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_branches/replace_existing/output.txt b/acceptance/bundle/resources/postgres_branches/replace_existing/output.txt index 5f8d6a0823f..25b1d5aa650 100644 --- a/acceptance/bundle/resources/postgres_branches/replace_existing/output.txt +++ b/acceptance/bundle/resources/postgres_branches/replace_existing/output.txt @@ -33,4 +33,5 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ === bundle destroy + >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_databases/recreate/output.txt b/acceptance/bundle/resources/postgres_databases/recreate/output.txt index 2619af86a8b..3d13f00d30c 100644 --- a/acceptance/bundle/resources/postgres_databases/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_databases/recreate/output.txt @@ -185,6 +185,7 @@ Resources: 1 created, 0 changed, 1 deleted, 3 unchanged } === Fetch database and verify it exists after recreation + >>> [CLI] postgres get-database [MY_DATABASE_ID]-v2 { "database_id": "test-database-[UNIQUE_NAME]-v2", diff --git a/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt b/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt index 944668621bf..0790f8d4cb3 100644 --- a/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt +++ b/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt @@ -19,6 +19,7 @@ create postgres_databases.my_database Plan: 1 to add, 0 to change, 0 to delete, 3 unchanged === Re-deploy: replace_existing adopts the already-existing database instead of erroring + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/replace-existing-database-[UNIQUE_NAME]/default/files... Created postgres_databases.my_database diff --git a/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt b/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt index 64e5b4d2d1d..d2e7c260913 100644 --- a/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt @@ -9,6 +9,7 @@ Files: 0 uploaded, 0 deleted Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Add a settings block and re-deploy + >>> [CLI] bundle plan update postgres_endpoints.my_endpoint diff --git a/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt b/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt index 7ff6430ff42..2554540da28 100644 --- a/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt @@ -159,6 +159,7 @@ Resources: 1 created, 0 changed, 1 deleted, 2 unchanged } === Fetch endpoint and verify it exists after recreation + >>> [CLI] postgres get-endpoint [MY_ENDPOINT_ID]-v2 "ENDPOINT_TYPE_READ_ONLY" diff --git a/acceptance/bundle/resources/postgres_endpoints/replace_existing/output.txt b/acceptance/bundle/resources/postgres_endpoints/replace_existing/output.txt index 61ae1fbba07..be609b6da13 100644 --- a/acceptance/bundle/resources/postgres_endpoints/replace_existing/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/replace_existing/output.txt @@ -34,4 +34,5 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ === bundle destroy + >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_projects/factcheck/update_mask_spec/output.txt b/acceptance/bundle/resources/postgres_projects/factcheck/update_mask_spec/output.txt index f61f5cf9033..d8c6adabbac 100644 --- a/acceptance/bundle/resources/postgres_projects/factcheck/update_mask_spec/output.txt +++ b/acceptance/bundle/resources/postgres_projects/factcheck/update_mask_spec/output.txt @@ -1,5 +1,6 @@ === Create accepts a minimal body; the server materializes the rest + >>> [CLI] postgres get-project projects/factcheck-spec-[UNIQUE_NAME] { "name": "projects/factcheck-spec-[UNIQUE_NAME]", @@ -63,6 +64,7 @@ } === Set default_endpoint_settings to a non-default value (leaf mask) + >>> [CLI] postgres get-project projects/factcheck-spec-[UNIQUE_NAME] { "name": "projects/factcheck-spec-[UNIQUE_NAME]", diff --git a/acceptance/bundle/resources/postgres_projects/factcheck/update_mask_star/output.txt b/acceptance/bundle/resources/postgres_projects/factcheck/update_mask_star/output.txt index 932e1d86fd8..aee3b38f252 100644 --- a/acceptance/bundle/resources/postgres_projects/factcheck/update_mask_star/output.txt +++ b/acceptance/bundle/resources/postgres_projects/factcheck/update_mask_star/output.txt @@ -1,5 +1,6 @@ === Create accepts a minimal body; the server materializes the rest + >>> [CLI] postgres get-project projects/factcheck-star-[UNIQUE_NAME] { "name": "projects/factcheck-star-[UNIQUE_NAME]", @@ -45,6 +46,7 @@ Exit code: 1 } === Set default_endpoint_settings to a non-default value (leaf mask) + >>> [CLI] postgres get-project projects/factcheck-star-[UNIQUE_NAME] { "name": "projects/factcheck-star-[UNIQUE_NAME]", diff --git a/acceptance/bundle/resources/postgres_projects/purge_on_delete/output.txt b/acceptance/bundle/resources/postgres_projects/purge_on_delete/output.txt index 96e64343201..abd39efb5e6 100644 --- a/acceptance/bundle/resources/postgres_projects/purge_on_delete/output.txt +++ b/acceptance/bundle/resources/postgres_projects/purge_on_delete/output.txt @@ -64,4 +64,5 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --sort --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ === bundle destroy + >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --sort --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_projects/purge_on_delete_transitions/output.txt b/acceptance/bundle/resources/postgres_projects/purge_on_delete_transitions/output.txt index f4d53b0ce18..390f800d8a8 100644 --- a/acceptance/bundle/resources/postgres_projects/purge_on_delete_transitions/output.txt +++ b/acceptance/bundle/resources/postgres_projects/purge_on_delete_transitions/output.txt @@ -10,6 +10,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged (unset) === Step 2: set purge_on_delete: true + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_projects.proj @@ -20,6 +21,7 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged json.state.resources.postgres_projects.proj.state.purge_on_delete = true; === Step 3: flip to purge_on_delete: false + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_projects.proj @@ -30,6 +32,7 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged json.state.resources.postgres_projects.proj.state.purge_on_delete = false; === Step 4: remove the line again + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_projects.proj @@ -40,4 +43,5 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged (unset) === bundle destroy (must be a plain DELETE, no ?purge=true) + >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --sort --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_projects/recreate/output.txt b/acceptance/bundle/resources/postgres_projects/recreate/output.txt index c731c8a3f2f..4fdd7fd85b4 100644 --- a/acceptance/bundle/resources/postgres_projects/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_projects/recreate/output.txt @@ -30,6 +30,7 @@ Files: 0 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Change project_id (should trigger recreation in direct, update in terraform) + >>> cat databricks.yml bundle: name: deploy-postgres-recreate-[UNIQUE_NAME] @@ -60,6 +61,7 @@ Files: 0 uploaded, 0 deleted Resources: 1 created, 0 changed, 1 deleted, 0 unchanged === Fetch new project ID + === Destroy and verify cleanup >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt b/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt index f3f4318a653..4bc132a246d 100644 --- a/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt +++ b/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt @@ -12,6 +12,7 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle deployment unbind my_role === Bind the existing role to take explicit ownership of it + >>> [CLI] bundle deployment bind my_role projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role --auto-approve Successfully bound postgres_role with an id 'projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role' Run 'bundle deploy' to deploy changes to your workspace diff --git a/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt b/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt index 8743a283141..5939e23a458 100644 --- a/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt +++ b/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt @@ -138,6 +138,7 @@ Resources: 1 created, 0 changed, 1 deleted, 2 unchanged } === Fetch role and verify the new postgres_role value is live + >>> [CLI] postgres get-role [MY_ROLE_ID] { "name": "[MY_ROLE_ID]", diff --git a/acceptance/bundle/resources/postgres_roles/recreate/output.txt b/acceptance/bundle/resources/postgres_roles/recreate/output.txt index dc0c7e73f6d..4850cbca92b 100644 --- a/acceptance/bundle/resources/postgres_roles/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_roles/recreate/output.txt @@ -138,6 +138,7 @@ Resources: 1 created, 0 changed, 1 deleted, 2 unchanged } === Fetch role and verify it exists after recreation + >>> [CLI] postgres get-role [MY_ROLE_ID]-v2 { "name": "[MY_ROLE_ID]-v2", diff --git a/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt b/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt index 4073ac96ab0..0d6367cc4fe 100644 --- a/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt +++ b/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt @@ -18,6 +18,7 @@ create postgres_roles.my_role Plan: 1 to add, 0 to change, 0 to delete, 2 unchanged === Re-deploy: replace_existing adopts the already-existing role instead of erroring + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/replace-existing-role-[UNIQUE_NAME]/default/files... Created postgres_roles.my_role diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt index c0ecf60045f..ac851355185 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt @@ -1,5 +1,6 @@ === Create with a snapshot schedule + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-basic-[UNIQUE_NAME]/default/files... Created postgres_projects.my_project @@ -21,6 +22,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === Update the schedule cadence + >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-basic-[UNIQUE_NAME]/default/files... Updated postgres_snapshot_schedules.main_schedule @@ -41,6 +43,7 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged } === Remove the snapshot schedule resource (disables automatic snapshots) + >>> cat databricks.yml bundle: name: deploy-pg-ss-basic-[UNIQUE_NAME] diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt index e11ac76f602..4f097ae0670 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt @@ -1,5 +1,6 @@ === Deploy with a snapshot schedule + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-oob-[UNIQUE_NAME]/default/files... Created postgres_projects.my_project diff --git a/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt b/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt index cf1175b788f..b3bed5f550e 100644 --- a/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt +++ b/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt @@ -9,6 +9,7 @@ Files: 0 uploaded, 0 deleted Resources: 4 created, 0 changed, 0 deleted, 0 unchanged === The delete never completes; the capped wait times out and the recreate fails + >>> DATABRICKS_BUNDLE_RESOURCE_MAX_WAIT=1 errcode [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-capped-postgres-synced-table-[UNIQUE_NAME]/default/files... Recreated postgres_synced_tables.my_table diff --git a/acceptance/bundle/resources/registered_models/aliases_converge/output.txt b/acceptance/bundle/resources/registered_models/aliases_converge/output.txt index af7b9aae061..d25cd0be496 100644 --- a/acceptance/bundle/resources/registered_models/aliases_converge/output.txt +++ b/acceptance/bundle/resources/registered_models/aliases_converge/output.txt @@ -32,6 +32,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged } === Edit the comment: an in-place update, not a recreate + >>> [CLI] bundle plan update registered_models.my_registered_model diff --git a/acceptance/bundle/resources/registered_models/basic/output.txt b/acceptance/bundle/resources/registered_models/basic/output.txt index 0cfe7b53077..fb05660caf4 100644 --- a/acceptance/bundle/resources/registered_models/basic/output.txt +++ b/acceptance/bundle/resources/registered_models/basic/output.txt @@ -8,6 +8,7 @@ >>> export SCHEMA_NAME=default === create catalog and schema to test diff functionality + >>> [CLI] catalogs create mycatalog-[UNIQUE_NAME] { "full_name": "mycatalog-[UNIQUE_NAME]" @@ -19,6 +20,7 @@ } === create the registered model + >>> [CLI] bundle plan create registered_models.my_registered_model @@ -39,6 +41,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === update the comment, this should not recreate + >>> [CLI] bundle plan update registered_models.my_registered_model @@ -59,6 +62,7 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged } === update the name, this should recreate + >>> [CLI] bundle plan recreate registered_models.my_registered_model @@ -79,6 +83,7 @@ Resources: 1 created, 0 changed, 1 deleted, 0 unchanged } === update the catalog name, this should recreate + >>> [CLI] bundle plan recreate registered_models.my_registered_model @@ -99,6 +104,7 @@ Resources: 1 created, 0 changed, 1 deleted, 0 unchanged } === update the schema name, this should recreate + >>> [CLI] bundle plan recreate registered_models.my_registered_model diff --git a/acceptance/bundle/resources/registered_models/comment_cleared/output.txt b/acceptance/bundle/resources/registered_models/comment_cleared/output.txt index 76ef93f002f..de27219f9d5 100644 --- a/acceptance/bundle/resources/registered_models/comment_cleared/output.txt +++ b/acceptance/bundle/resources/registered_models/comment_cleared/output.txt @@ -8,6 +8,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Remove the comment from the configuration and redeploy + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... Updated registered_models.model1 @@ -15,6 +16,7 @@ Files: 1 uploaded, 0 deleted Resources: 0 created, 1 changed, 0 deleted, 1 unchanged === The comment the bundle no longer declares + >>> [CLI] api get /api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].test-model-[UNIQUE_NAME] "" diff --git a/acceptance/bundle/resources/schemas/auto-approve/output.txt b/acceptance/bundle/resources/schemas/auto-approve/output.txt index cf9002a43cb..cb8c315c34a 100644 --- a/acceptance/bundle/resources/schemas/auto-approve/output.txt +++ b/acceptance/bundle/resources/schemas/auto-approve/output.txt @@ -14,6 +14,7 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged } === Assert the pipeline is created and uses the schema + >>> [CLI] pipelines get [UUID] { "spec": { @@ -82,4 +83,5 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 2 deleted === Assert the schema is deleted + Exit code: 1 diff --git a/acceptance/bundle/resources/schemas/comment_out_of_band/output.txt b/acceptance/bundle/resources/schemas/comment_out_of_band/output.txt index ff470fc8acd..18ffc2bc327 100644 --- a/acceptance/bundle/resources/schemas/comment_out_of_band/output.txt +++ b/acceptance/bundle/resources/schemas/comment_out_of_band/output.txt @@ -7,6 +7,7 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Set the comment out of band, the way Catalog Explorer does + === The remote comment is drift, so the plan updates the schema >>> [CLI] bundle plan --output json { @@ -24,6 +25,7 @@ Files: 0 uploaded, 0 deleted Resources: 0 created, 1 changed, 0 deleted, 0 unchanged === The comment is gone + >>> [CLI] api get /api/2.1/unity-catalog/schemas/main.test-schema-[UNIQUE_NAME] "" diff --git a/acceptance/bundle/resources/secret_scopes/basic/output.txt b/acceptance/bundle/resources/secret_scopes/basic/output.txt index c432f2996de..99293f41eb2 100644 --- a/acceptance/bundle/resources/secret_scopes/basic/output.txt +++ b/acceptance/bundle/resources/secret_scopes/basic/output.txt @@ -52,6 +52,7 @@ } === update the name of the scope (should recreate) + >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy -qq diff --git a/acceptance/bundle/resources/secret_scopes/permissions/output.txt b/acceptance/bundle/resources/secret_scopes/permissions/output.txt index 998becfd22f..9df6d9b9b7f 100644 --- a/acceptance/bundle/resources/secret_scopes/permissions/output.txt +++ b/acceptance/bundle/resources/secret_scopes/permissions/output.txt @@ -20,6 +20,7 @@ {"permission":"WRITE","principal":"scopes-permissions-group-[UNIQUE_NAME]"} === update permissions (remove sp, change permission for user, add users and remove deco-test-group) + >>> [CLI] bundle plan >>> [CLI] bundle deploy -qq @@ -30,6 +31,7 @@ {"permission":"WRITE","principal":"deco-test-user@databricks.com"} === change scope name (should recreate scope and update permissions) + >>> [CLI] bundle plan >>> [CLI] bundle deploy -qq diff --git a/acceptance/bundle/resources/synced_database_tables/recreate/output.txt b/acceptance/bundle/resources/synced_database_tables/recreate/output.txt index 03e95138a2f..862a94d9888 100644 --- a/acceptance/bundle/resources/synced_database_tables/recreate/output.txt +++ b/acceptance/bundle/resources/synced_database_tables/recreate/output.txt @@ -8,6 +8,7 @@ Files: 2 uploaded, 0 deleted Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Change an immutable synced-table field: no update API, so the plan recreates it + >>> [CLI] bundle plan recreate synced_database_tables.my_synced_table diff --git a/acceptance/bundle/resources/vector_search_endpoints/drift/target_qps/output.txt b/acceptance/bundle/resources/vector_search_endpoints/drift/target_qps/output.txt index 8e7a03dce0d..7adaebf1746 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/drift/target_qps/output.txt +++ b/acceptance/bundle/resources/vector_search_endpoints/drift/target_qps/output.txt @@ -31,6 +31,7 @@ update vector_search_endpoints.my_endpoint Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged === Deploy restores target_qps to 1 + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/drift-vs-endpoint-target-qps-[UNIQUE_NAME]/default/files... Updated vector_search_endpoints.my_endpoint diff --git a/acceptance/bundle/resources/vector_search_endpoints/recreate/endpoint_type/output.txt b/acceptance/bundle/resources/vector_search_endpoints/recreate/endpoint_type/output.txt index 22ca8a55cf6..4f582ec3d6a 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/recreate/endpoint_type/output.txt +++ b/acceptance/bundle/resources/vector_search_endpoints/recreate/endpoint_type/output.txt @@ -1,5 +1,6 @@ === Initial deployment with STANDARD endpoint_type + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-vs-endpoint-[UNIQUE_NAME]/default/files... Created vector_search_endpoints.my_endpoint diff --git a/acceptance/bundle/resources/vector_search_endpoints/update/budget_policy/output.txt b/acceptance/bundle/resources/vector_search_endpoints/update/budget_policy/output.txt index 017c9052b9b..a8ec333bf97 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/update/budget_policy/output.txt +++ b/acceptance/bundle/resources/vector_search_endpoints/update/budget_policy/output.txt @@ -1,5 +1,6 @@ === Initial deployment (no budget policy) + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-vs-endpoint-budget-[UNIQUE_NAME]/default/files... Created vector_search_endpoints.my_endpoint diff --git a/acceptance/bundle/resources/vector_search_endpoints/update/target_qps/output.txt b/acceptance/bundle/resources/vector_search_endpoints/update/target_qps/output.txt index 44bbd77a910..86b116539ab 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/update/target_qps/output.txt +++ b/acceptance/bundle/resources/vector_search_endpoints/update/target_qps/output.txt @@ -1,5 +1,6 @@ === Initial deployment + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-vs-endpoint-target-qps-[UNIQUE_NAME]/default/files... Created vector_search_endpoints.my_endpoint diff --git a/acceptance/bundle/resources/vector_search_indexes/recreate/embedding_dimension/output.txt b/acceptance/bundle/resources/vector_search_indexes/recreate/embedding_dimension/output.txt index cdb909152fd..1d7331409dd 100644 --- a/acceptance/bundle/resources/vector_search_indexes/recreate/embedding_dimension/output.txt +++ b/acceptance/bundle/resources/vector_search_indexes/recreate/embedding_dimension/output.txt @@ -1,5 +1,6 @@ === Initial deployment + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-vs-index-[UNIQUE_NAME]/default/files... Created vector_search_endpoints.my_endpoint diff --git a/acceptance/bundle/resources/volumes/change-comment/script b/acceptance/bundle/resources/volumes/change-comment/script index 913d5acdf90..d623c47fe12 100644 --- a/acceptance/bundle/resources/volumes/change-comment/script +++ b/acceptance/bundle/resources/volumes/change-comment/script @@ -8,7 +8,7 @@ trace $CLI bundle deploy trace print_requests.py //unity -title "Summary should now show id and url\n" +title "Summary should now show id and url" $CLI bundle summary -o json | jq .resources.volumes.volume1.id $CLI bundle summary -o json | jq .resources.volumes.volume1.url @@ -18,7 +18,7 @@ trace $CLI volumes read main.myschema.myvolume title "Update comment" trace update_file.py databricks.yml COMMENT1 COMMENT2 -title "Summary should show modified_status=modified and show the same id\n" +title "Summary should show modified_status=modified and show the same id" $CLI bundle summary -o json | jq .resources.volumes.volume1 trace $CLI bundle deploy diff --git a/acceptance/bundle/resources/volumes/change-name/script b/acceptance/bundle/resources/volumes/change-name/script index e2c2c5ea7ba..d8f122a9820 100644 --- a/acceptance/bundle/resources/volumes/change-name/script +++ b/acceptance/bundle/resources/volumes/change-name/script @@ -2,7 +2,7 @@ trace $CLI bundle deploy trace print_requests.py //unity -title "Summary should now show id and url\n" +title "Summary should now show id and url" $CLI bundle summary -o json | jq .resources title "Update name" diff --git a/acceptance/bundle/resources/volumes/change-schema-name/script b/acceptance/bundle/resources/volumes/change-schema-name/script index c369e53fff9..7de9ae73bed 100644 --- a/acceptance/bundle/resources/volumes/change-schema-name/script +++ b/acceptance/bundle/resources/volumes/change-schema-name/script @@ -2,7 +2,7 @@ trace $CLI bundle deploy trace print_requests.py //unity -title "Summary should now show id and url\n" +title "Summary should now show id and url" $CLI bundle summary -o json | jq .resources title "Update name" diff --git a/acceptance/bundle/resources/volumes/comment_out_of_band/output.txt b/acceptance/bundle/resources/volumes/comment_out_of_band/output.txt index b6619370518..46e5cb9811f 100644 --- a/acceptance/bundle/resources/volumes/comment_out_of_band/output.txt +++ b/acceptance/bundle/resources/volumes/comment_out_of_band/output.txt @@ -8,6 +8,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Set the comment out of band, the way Catalog Explorer does + === The remote comment is drift, so the plan updates the volume >>> [CLI] bundle plan --output json { @@ -30,6 +31,7 @@ Files: 0 uploaded, 0 deleted Resources: 0 created, 1 changed, 0 deleted, 1 unchanged === The comment is gone + >>> [CLI] api get /api/2.1/unity-catalog/volumes/main.test-schema-[UNIQUE_NAME].test-volume-[UNIQUE_NAME] "" diff --git a/acceptance/bundle/resources/volumes/comment_with_rename/output.txt b/acceptance/bundle/resources/volumes/comment_with_rename/output.txt index 224755056d0..bb8467f8e28 100644 --- a/acceptance/bundle/resources/volumes/comment_with_rename/output.txt +++ b/acceptance/bundle/resources/volumes/comment_with_rename/output.txt @@ -8,6 +8,7 @@ Files: 2 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Set the comment out of band, then rename the volume in the same deploy + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... Updated volumes.volume1 @@ -15,6 +16,7 @@ Files: 1 uploaded, 0 deleted Resources: 0 created, 1 changed, 0 deleted, 1 unchanged === The rename and the clear both landed, so it converges in one pass + >>> [CLI] api get /api/2.1/unity-catalog/volumes/main.test-schema-[UNIQUE_NAME].vol_two "" diff --git a/acceptance/bundle/resources/volumes/recreate/output.txt b/acceptance/bundle/resources/volumes/recreate/output.txt index fed59b1a868..73d49186d36 100644 --- a/acceptance/bundle/resources/volumes/recreate/output.txt +++ b/acceptance/bundle/resources/volumes/recreate/output.txt @@ -11,6 +11,7 @@ Validation OK! >>> [CLI] bundle deploy -qq === Assert the volume is created successfully + >>> [CLI] volumes read main.schema1-[UNIQUE_NAME].my_volume { "catalog_name": "main", diff --git a/acceptance/bundle/run/app-with-job/script b/acceptance/bundle/run/app-with-job/script index f0b41a2881e..c15ba27e7ab 100644 --- a/acceptance/bundle/run/app-with-job/script +++ b/acceptance/bundle/run/app-with-job/script @@ -15,7 +15,7 @@ APP_URL=$($CLI apps get "app-${UNIQUE_NAME}" | jq -r '.url') title "Check app config" trace $CLI workspace export "/Workspace/Users/${CURRENT_USER_NAME}/.bundle/app-with-job-${UNIQUE_NAME}/files/app/app.yml" -title "Try to run the app\n" +title "Try to run the app" $CLI bundle run test_app &> LOG.run.txt trace cat LOG.run.txt | grep -q "${APP_URL}" @@ -26,7 +26,7 @@ title "Stop the app" trace $CLI apps stop "app-${UNIQUE_NAME}" | jq '{compute_status}' trace $CLI apps get "app-${UNIQUE_NAME}" | jq '{app_status,compute_status}' -title "Try to run the app again\n" +title "Try to run the app again" $CLI bundle run test_app &> LOG.run.txt trace cat LOG.run.txt | grep -q "${APP_URL}" diff --git a/acceptance/bundle/run_as/pipelines/regular_user/output.txt b/acceptance/bundle/run_as/pipelines/regular_user/output.txt index 21faafb4d57..20718c7be42 100644 --- a/acceptance/bundle/run_as/pipelines/regular_user/output.txt +++ b/acceptance/bundle/run_as/pipelines/regular_user/output.txt @@ -1,5 +1,6 @@ -=== run_as should succeed in all cases\nProcessing target: t_user_name +=== run_as should succeed in all cases +\nProcessing target: t_user_name >>> [CLI] bundle validate -t t_user_name Name: run_as diff --git a/acceptance/bundle/run_as/pipelines/service_principal/output.txt b/acceptance/bundle/run_as/pipelines/service_principal/output.txt index 21faafb4d57..20718c7be42 100644 --- a/acceptance/bundle/run_as/pipelines/service_principal/output.txt +++ b/acceptance/bundle/run_as/pipelines/service_principal/output.txt @@ -1,5 +1,6 @@ -=== run_as should succeed in all cases\nProcessing target: t_user_name +=== run_as should succeed in all cases +\nProcessing target: t_user_name >>> [CLI] bundle validate -t t_user_name Name: run_as diff --git a/acceptance/bundle/select/basic/script b/acceptance/bundle/select/basic/script index f4fbd243a54..178d578969e 100644 --- a/acceptance/bundle/select/basic/script +++ b/acceptance/bundle/select/basic/script @@ -23,10 +23,10 @@ trace $CLI bundle plan --select jobs.foo # inline, or via --plan (READPLAN=1). The deploy is not traced because readplanarg # varies the command line between READPLAN variants, which must produce identical output. $CLI bundle plan --select jobs.foo -o json > plan.json -title "bundle deploy --select jobs.foo\n" +title "bundle deploy --select jobs.foo" $CLI bundle deploy --select jobs.foo $(readplanarg plan.json) # The deploy reports that --select was used via telemetry. -title "Telemetry:\n" +title "Telemetry:" print_telemetry_bool_values | grep '^select_used ' # Only bar and foo were created, never baz. trace print_requests.py --nostamp --sort //jobs @@ -38,7 +38,7 @@ trace $CLI bundle summary title "Full plan after partial deploy" trace $CLI bundle plan $CLI bundle plan -o json > plan-full.json -title "Full deploy\n" +title "Full deploy" $CLI bundle deploy $(readplanarg plan-full.json) # Only baz is created this time. trace print_requests.py --nostamp --sort //jobs diff --git a/acceptance/bundle/select/grants_permissions/script b/acceptance/bundle/select/grants_permissions/script index 230a9111291..d75e1a6d452 100644 --- a/acceptance/bundle/select/grants_permissions/script +++ b/acceptance/bundle/select/grants_permissions/script @@ -19,11 +19,11 @@ musterr trace $CLI bundle plan --select schemas.my_schema.grants # Deploying a selected resource applies its permissions/grants too. $CLI bundle plan --select jobs.my_job -o json > plan-job.json -title "bundle deploy --select jobs.my_job\n" +title "bundle deploy --select jobs.my_job" $CLI bundle deploy --select jobs.my_job $(readplanarg plan-job.json) $CLI bundle plan --select schemas.my_schema -o json > plan-schema.json -title "bundle deploy --select schemas.my_schema\n" +title "bundle deploy --select schemas.my_schema" $CLI bundle deploy --select schemas.my_schema $(readplanarg plan-schema.json) # Assert the permissions PUT and grants PATCH were emitted for the selected resources. diff --git a/acceptance/bundle/select/plan_file_survives_not_selected/output.txt b/acceptance/bundle/select/plan_file_survives_not_selected/output.txt index f350b38e54d..ebe468a41a0 100644 --- a/acceptance/bundle/select/plan_file_survives_not_selected/output.txt +++ b/acceptance/bundle/select/plan_file_survives_not_selected/output.txt @@ -1,6 +1,5 @@ === bundle deploy --plan (no --select) - >>> [CLI] bundle deploy --plan plan.json Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/select-plan-[UNIQUE_NAME]/default/files... Created jobs.foo diff --git a/acceptance/bundle/select/plan_file_survives_not_selected/script b/acceptance/bundle/select/plan_file_survives_not_selected/script index 908aeb6ad1d..7a2e6443ddd 100644 --- a/acceptance/bundle/select/plan_file_survives_not_selected/script +++ b/acceptance/bundle/select/plan_file_survives_not_selected/script @@ -12,5 +12,5 @@ $CLI bundle plan --select jobs.foo -o json > plan.json # Deploy from the plan file WITHOUT re-passing --select. b.Select is empty here, # so the ", 2 not selected" suffix must come from the serialized plan.NotSelected, # not from the flag. This is the regression guard for that wiring. -title "bundle deploy --plan (no --select)\n" +title "bundle deploy --plan (no --select)" trace $CLI bundle deploy --plan plan.json diff --git a/acceptance/bundle/state/engine_default/script b/acceptance/bundle/state/engine_default/script index cadf288994a..02a757f356c 100644 --- a/acceptance/bundle/state/engine_default/script +++ b/acceptance/bundle/state/engine_default/script @@ -1,4 +1,4 @@ -title 'No engine configured and no state: deploy defaults to the direct engine\n' +title 'No engine configured and no state: deploy defaults to the direct engine' unset DATABRICKS_BUNDLE_ENGINE trace $CLI bundle deploy trace print_requests.py //api/2.1/unity-catalog/schemas | jq '.headers["User-Agent"][0]' | contains.py 'engine/direct' '!terraform' '!tf-provider' diff --git a/acceptance/bundle/state/engine_mismatch/output.txt b/acceptance/bundle/state/engine_mismatch/output.txt index 92b102b8005..8e015bd15f4 100644 --- a/acceptance/bundle/state/engine_mismatch/output.txt +++ b/acceptance/bundle/state/engine_mismatch/output.txt @@ -5,6 +5,5 @@ [TEST_TMP_DIR]/.databricks/bundle/default/terraform/terraform.tfstate: local terraform state serial=1 lineage="test-lineage" === Invalid env var with config set: config takes priority, still no warning - >>> DATABRICKS_BUNDLE_ENGINE=bla [CLI] bundle debug states [TEST_TMP_DIR]/.databricks/bundle/default/terraform/terraform.tfstate: local terraform state serial=1 lineage="test-lineage" diff --git a/acceptance/bundle/state/engine_mismatch/script b/acceptance/bundle/state/engine_mismatch/script index 450ef1835eb..55b6276d5be 100644 --- a/acceptance/bundle/state/engine_mismatch/script +++ b/acceptance/bundle/state/engine_mismatch/script @@ -3,9 +3,9 @@ echo '{"serial": 1, "lineage": "test-lineage"}' > .databricks/bundle/default/ter # `bundle debug states` doesn't deploy; it should just report the state without # a mismatch warning. The "will attempt to migrate" hint belongs to deploy only. -title 'Direct opt-in with terraform state on disk: debug states reports without warning\n' +title 'Direct opt-in with terraform state on disk: debug states reports without warning' unset DATABRICKS_BUNDLE_ENGINE trace $CLI bundle debug states -title 'Invalid env var with config set: config takes priority, still no warning\n' +title 'Invalid env var with config set: config takes priority, still no warning' trace DATABRICKS_BUNDLE_ENGINE=bla $CLI bundle debug states diff --git a/acceptance/bundle/state/force_pull_commands/output.txt b/acceptance/bundle/state/force_pull_commands/output.txt index 977e1a296e3..ce3ada5600e 100644 --- a/acceptance/bundle/state/force_pull_commands/output.txt +++ b/acceptance/bundle/state/force_pull_commands/output.txt @@ -6,12 +6,11 @@ Files: 2 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Use a fake browser that just prints the URL it would have opened -=== bundle summary without --force-pull: no remote state read +=== bundle summary without --force-pull: no remote state read >>> [CLI] bundle summary === bundle summary --force-pull: remote state read - >>> [CLI] bundle summary --force-pull { "method": "GET", @@ -23,12 +22,10 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged } === bundle open without --force-pull: no remote state read - >>> [CLI] bundle open foo Opening browser at [DATABRICKS_URL]/jobs/[NUMID]?w=[NUMID] === bundle open --force-pull: remote state read - >>> [CLI] bundle open foo --force-pull Opening browser at [DATABRICKS_URL]/jobs/[NUMID]?w=[NUMID] { diff --git a/acceptance/bundle/state/force_pull_commands/script b/acceptance/bundle/state/force_pull_commands/script index fc287979037..15bfbfa70cb 100644 --- a/acceptance/bundle/state/force_pull_commands/script +++ b/acceptance/bundle/state/force_pull_commands/script @@ -8,22 +8,22 @@ export BROWSER="echo_browser.py" # --force-pull make zero HTTP requests, so the file is never created and # print_requests.py would otherwise exit with "File not found". -title "bundle summary without --force-pull: no remote state read\n" +title "bundle summary without --force-pull: no remote state read" trace $CLI bundle summary > /dev/null touch "$OUT_REQUESTS" print_requests.py --get //workspace/export -title "bundle summary --force-pull: remote state read\n" +title "bundle summary --force-pull: remote state read" trace $CLI bundle summary --force-pull > /dev/null touch "$OUT_REQUESTS" print_requests.py --get //workspace/export -title "bundle open without --force-pull: no remote state read\n" +title "bundle open without --force-pull: no remote state read" trace $CLI bundle open foo > /dev/null touch "$OUT_REQUESTS" print_requests.py --get //workspace/export -title "bundle open --force-pull: remote state read\n" +title "bundle open --force-pull: remote state read" trace $CLI bundle open foo --force-pull > /dev/null touch "$OUT_REQUESTS" print_requests.py --get //workspace/export diff --git a/acceptance/bundle/state/newer_cli_version/script b/acceptance/bundle/state/newer_cli_version/script index 172dc126cb3..c21b7215c88 100644 --- a/acceptance/bundle/state/newer_cli_version/script +++ b/acceptance/bundle/state/newer_cli_version/script @@ -1,9 +1,9 @@ -title "State written by a newer CLI: warn, but proceed\n" +title "State written by a newer CLI: warn, but proceed" mkdir -p .databricks/bundle/default cp resources.newer.json .databricks/bundle/default/resources.json trace $CLI bundle plan -title "State written by this CLI: no warning\n" +title "State written by this CLI: no warning" # The running version is only known at test time, so derive the state's # cli_version from the binary itself rather than committing it as a fixture. version=$($CLI version | sed 's/^Databricks CLI v//') diff --git a/acceptance/bundle/state/same_serial/output.txt b/acceptance/bundle/state/same_serial/output.txt index 93a58414de8..3a8ef910436 100644 --- a/acceptance/bundle/state/same_serial/output.txt +++ b/acceptance/bundle/state/same_serial/output.txt @@ -1,5 +1,6 @@ === If serial is the same, refuse to proceed + >>> musterr [CLI] bundle deploy Error: same serial number in terraform and direct states diff --git a/acceptance/bundle/state/state_present/output.txt b/acceptance/bundle/state/state_present/output.txt index c0ae3a7e505..b28f725f14b 100644 --- a/acceptance/bundle/state/state_present/output.txt +++ b/acceptance/bundle/state/state_present/output.txt @@ -19,6 +19,7 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] interactive/none engine/direct auth/pat" === Adding resources.json with lower serial does not change anything + >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle plan Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765). Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged diff --git a/acceptance/bundle/state/state_present/script b/acceptance/bundle/state/state_present/script index f06f4f2d7f4..3a882dd64a2 100644 --- a/acceptance/bundle/state/state_present/script +++ b/acceptance/bundle/state/state_present/script @@ -1,4 +1,4 @@ -title 'Terraform state is present, empty env var uses state engine\n' +title 'Terraform state is present, empty env var uses state engine' mkdir -p .databricks/bundle/default/terraform echo '{"version": 4, "serial": 1, "lineage": "test-lineage"}' > .databricks/bundle/default/terraform/terraform.tfstate @@ -20,7 +20,7 @@ trace DATABRICKS_BUNDLE_ENGINE=terraform $CLI bundle plan trace DATABRICKS_BUNDLE_ENGINE= $CLI bundle plan rm "$OUT_REQUESTS" -title 'Adding resources.json with higher serial, env var mismatch warns but uses state engine\n' +title 'Adding resources.json with higher serial, env var mismatch warns but uses state engine' echo '{"serial": 10, "lineage": "test-lineage"}' > .databricks/bundle/default/resources.json trace DATABRICKS_BUNDLE_ENGINE=direct $CLI bundle plan diff --git a/acceptance/bundle/telemetry/deploy/output.txt b/acceptance/bundle/telemetry/deploy/output.txt index 4802ba571b3..84c2150dc86 100644 --- a/acceptance/bundle/telemetry/deploy/output.txt +++ b/acceptance/bundle/telemetry/deploy/output.txt @@ -16,4 +16,5 @@ Resources: 5 created, 0 changed, 0 deleted, 0 unchanged true === Assert the dry-run migration to the direct engine is reported -=== Assert the terraform engine opt-in is reported \ No newline at end of file + +=== Assert the terraform engine opt-in is reported diff --git a/acceptance/bundle/templates-machinery/supported-url/output.txt b/acceptance/bundle/templates-machinery/supported-url/output.txt index 959b4c6fb82..29dd76a8162 100644 --- a/acceptance/bundle/templates-machinery/supported-url/output.txt +++ b/acceptance/bundle/templates-machinery/supported-url/output.txt @@ -1,4 +1,6 @@ === https:// URL is recognized as a Git URL + === ssh:// URL is recognized as a Git URL -=== git@ URL is recognized as a Git URL \ No newline at end of file + +=== git@ URL is recognized as a Git URL diff --git a/acceptance/bundle/validate/presets_name_prefix_dev/script b/acceptance/bundle/validate/presets_name_prefix_dev/script index f18f5384f7c..c3809f3badf 100644 --- a/acceptance/bundle/validate/presets_name_prefix_dev/script +++ b/acceptance/bundle/validate/presets_name_prefix_dev/script @@ -1,22 +1,22 @@ -title "Remove presets: section entirely - out.without_presets.json\n" +title "Remove presets: section entirely - out.without_presets.json" grep -v PRESETS databricks.yml.tmpl > databricks.yml trace musterr grep -C 1 prefix: databricks.yml $CLI bundle validate -o json > out.without_presets.json -title "Set name_prefix="prefix" - out.with_static_prefix.json\n" +title "Set name_prefix="prefix" - out.with_static_prefix.json" PREFIX="prefix" envsubst < databricks.yml.tmpl > databricks.yml trace grep -C 1 prefix: databricks.yml trace musterr $CLI bundle validate -o json > out.with_static_prefix.json -title "Set name_prefix="" - out.with_empty_prefix.json\n" +title "Set name_prefix="" - out.with_empty_prefix.json" PREFIX='""' envsubst < databricks.yml.tmpl > databricks.yml trace grep -C 1 prefix: databricks.yml trace $CLI bundle validate -o json > out.with_empty_prefix.json -title "Set name_prefix= - out.with_nil_prefix.json\n" +title "Set name_prefix= - out.with_nil_prefix.json" PREFIX= envsubst < databricks.yml.tmpl > databricks.yml trace grep -C 1 prefix: databricks.yml trace $CLI bundle validate -o json > out.with_nil_prefix.json rm databricks.yml -title "The end\n" # prevent dangling empty line +title "The end" diff --git a/acceptance/bundle/variables/reference-typo/script b/acceptance/bundle/variables/reference-typo/script index 5fb854524c5..c80fade45ec 100644 --- a/acceptance/bundle/variables/reference-typo/script +++ b/acceptance/bundle/variables/reference-typo/script @@ -1,17 +1,17 @@ -title "Typo of a defined variable: single suggestion\n" +title "Typo of a defined variable: single suggestion" withdir single musterr trace $CLI bundle validate -title "Typo close to two defined variables: multiple suggestions\n" +title "Typo close to two defined variables: multiple suggestions" withdir multiple musterr trace $CLI bundle validate -title "Typo in a non-variable reference (workspace field): multiple suggestions\n" +title "Typo in a non-variable reference (workspace field): multiple suggestions" withdir non-var-multiple musterr trace $CLI bundle validate -title "Nested complex variable with multiple typos: only the first is reported\n" +title "Nested complex variable with multiple typos: only the first is reported" withdir multiple-typos musterr trace $CLI bundle validate -title "Two typos in one reference: lookup fails at the outermost key\n" +title "Two typos in one reference: lookup fails at the outermost key" withdir double-nested-typo musterr trace $CLI bundle validate -title "Two typos in one reference, outermost close to two variables: multiple suggestions\n" +title "Two typos in one reference, outermost close to two variables: multiple suggestions" withdir double-nested-typo-multiple musterr trace $CLI bundle validate diff --git a/acceptance/cache/clear/script b/acceptance/cache/clear/script index 7c082ae82dd..df4edc294fc 100644 --- a/acceptance/cache/clear/script +++ b/acceptance/cache/clear/script @@ -2,15 +2,15 @@ export DATABRICKS_CACHE_DIR=$(pwd)/.cache $CLI cache clear &> /dev/null -title "First call in a session is expected to be a cache miss:\n" +title "First call in a session is expected to be a cache miss:" trace $CLI bundle validate --debug 2>&1 | grep "Local Cache" | grep -v "cache path" -title "Second call in a session is expected to be a cache hit\n" +title "Second call in a session is expected to be a cache hit" trace $CLI bundle validate --debug 2>&1 | grep "Local Cache" | grep -v "cache path" trace $CLI cache clear -title "First call after a clear is expected to be a cache miss:\n" +title "First call after a clear is expected to be a cache miss:" trace $CLI bundle validate --debug 2>&1 | grep "Local Cache" | grep -v "cache path" rm -rf "${DATABRICKS_CACHE_DIR}" diff --git a/acceptance/cache/simple/output.txt b/acceptance/cache/simple/output.txt index 64fe62f815f..595cef56224 100644 --- a/acceptance/cache/simple/output.txt +++ b/acceptance/cache/simple/output.txt @@ -14,7 +14,6 @@ [DEBUG_TIMESTAMP] Debug: [Local Cache] cache hit === Bundle deploy should send telemetry values - >>> [CLI] bundle deploy -p dogfood Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exploratory-cache-test/default/files... Files: 3 uploaded, 0 deleted diff --git a/acceptance/cache/simple/script b/acceptance/cache/simple/script index 700183f096d..c0d69d43f78 100644 --- a/acceptance/cache/simple/script +++ b/acceptance/cache/simple/script @@ -2,13 +2,13 @@ export DATABRICKS_CACHE_DIR=$(pwd)/.cache $CLI cache clear &> /dev/null -title "First call in a session is expected to be a cache miss:\n" +title "First call in a session is expected to be a cache miss:" trace $CLI bundle validate -p dogfood --debug 2>&1 | grep "Local Cache" | grep -v "cache path" -title "Second call in a session is expected to be a cache hit\n" +title "Second call in a session is expected to be a cache hit" trace $CLI bundle validate -p dogfood --debug 2>&1 | grep "Local Cache" | grep -v "cache path" -title "Bundle deploy should send telemetry values\n" +title "Bundle deploy should send telemetry values" trace $CLI bundle deploy -p dogfood trace print_telemetry_bool_values | grep "local.cache" diff --git a/acceptance/cmd/aitools/claude-config-dir/output.txt b/acceptance/cmd/aitools/claude-config-dir/output.txt index 508651018c5..b5349ea5ed8 100644 --- a/acceptance/cmd/aitools/claude-config-dir/output.txt +++ b/acceptance/cmd/aitools/claude-config-dir/output.txt @@ -1,17 +1,14 @@ === Plugin installed only in the custom config directory - >>> CLAUDE_CONFIG_DIR=custom [CLI] version Databricks CLI v[CLI_VERSION] === Custom directory takes precedence over the default installation - >>> CLAUDE_CONFIG_DIR=missing [CLI] version Databricks skills are not installed. To work with Databricks reliably, first run: databricks aitools install Databricks CLI v[CLI_VERSION] === Empty override uses the default installation - >>> CLAUDE_CONFIG_DIR= [CLI] version Databricks CLI v[CLI_VERSION] diff --git a/acceptance/cmd/aitools/claude-config-dir/script b/acceptance/cmd/aitools/claude-config-dir/script index bdec19ef438..26f51369813 100644 --- a/acceptance/cmd/aitools/claude-config-dir/script +++ b/acceptance/cmd/aitools/claude-config-dir/script @@ -3,16 +3,16 @@ unset CLAUDE_CODE_SESSION_ID # aitools commands skip the install hint; version exercises it without auth or network. sethome ./empty-home -title "Plugin installed only in the custom config directory\n" +title "Plugin installed only in the custom config directory" trace CLAUDE_CONFIG_DIR=custom $CLI version sethome ./installed-home -title "Custom directory takes precedence over the default installation\n" +title "Custom directory takes precedence over the default installation" trace CLAUDE_CONFIG_DIR=missing $CLI version -title "Empty override uses the default installation\n" +title "Empty override uses the default installation" trace CLAUDE_CONFIG_DIR= $CLI version -title "Unset override uses the default installation\n" +title "Unset override uses the default installation" unset CLAUDE_CONFIG_DIR trace $CLI version diff --git a/acceptance/cmd/api/default-profile-vs-env/script b/acceptance/cmd/api/default-profile-vs-env/script index b8f620081ac..a6b4c91b398 100644 --- a/acceptance/cmd/api/default-profile-vs-env/script +++ b/acceptance/cmd/api/default-profile-vs-env/script @@ -4,6 +4,6 @@ sethome "./home" # (basic) auth on a different host. The env below still points a PAT at the test # server. Without the #5616 guard, the default profile would be pinned and merged # with the env PAT, failing with "more than one authorization method configured". -title "api without --profile uses env auth, ignoring default_profile (#5616)\n" +title "api without --profile uses env auth, ignoring default_profile (#5616)" MSYS_NO_PATHCONV=1 trace $CLI api get /api/2.0/clusters/list trace print_requests.py --get //api/2.0/clusters/list diff --git a/acceptance/cmd/api/default-profile/script b/acceptance/cmd/api/default-profile/script index 8f0ea946e66..0a83edc8ffa 100644 --- a/acceptance/cmd/api/default-profile/script +++ b/acceptance/cmd/api/default-profile/script @@ -9,9 +9,9 @@ unset DATABRICKS_HOST unset DATABRICKS_TOKEN unset DATABRICKS_CONFIG_PROFILE -title "default_profile is used when no --profile flag and no DATABRICKS_CONFIG_PROFILE\n" +title "default_profile is used when no --profile flag and no DATABRICKS_CONFIG_PROFILE" MSYS_NO_PATHCONV=1 trace $CLI api get /api/2.0/clusters/list trace print_requests.py --get //api/2.0/clusters/list | contains.py "X-Databricks-Workspace-Id" -title "--profile overrides default_profile (negative case)\n" +title "--profile overrides default_profile (negative case)" MSYS_NO_PATHCONV=1 errcode $CLI api get /api/2.0/clusters/list -p other 2>&1 | contains.py "other.test" diff --git a/acceptance/cmd/api/integer-precision/output.txt b/acceptance/cmd/api/integer-precision/output.txt index 02c843db4b4..a0e80092f0b 100644 --- a/acceptance/cmd/api/integer-precision/output.txt +++ b/acceptance/cmd/api/integer-precision/output.txt @@ -1,5 +1,6 @@ === Response: a >2^53 id is rendered exactly, in server key order + >>> [CLI] api get /api/2.0/test/bigint { "name": "a>> print_requests.py //test/bigint --del-field headers { "method": "POST", @@ -18,6 +20,7 @@ } === Request query (GET): the id in --json survives in the query string + >>> print_requests.py --get //test/bigint --del-field headers { "method": "GET", diff --git a/acceptance/cmd/api/profile-overrides-env/script b/acceptance/cmd/api/profile-overrides-env/script index 3628f59e9c3..5bab9860d38 100644 --- a/acceptance/cmd/api/profile-overrides-env/script +++ b/acceptance/cmd/api/profile-overrides-env/script @@ -10,13 +10,13 @@ real_token=$DATABRICKS_TOKEN export DATABRICKS_HOST=https://dev.cloud.databricks.test export DATABRICKS_TOKEN=dev-token -title "api --profile overrides auth env vars (#5096)\n" +title "api --profile overrides auth env vars (#5096)" MSYS_NO_PATHCONV=1 trace $CLI api get /api/2.0/clusters/list --profile my-workspace trace print_requests.py --get //api/2.0/clusters/list # Host-only profile: the profile wins for the host, but env fills the token it # omits (#5096). export DATABRICKS_TOKEN=$real_token -title "api host-only --profile fills the token from the environment (#5096)\n" +title "api host-only --profile fills the token from the environment (#5096)" MSYS_NO_PATHCONV=1 trace $CLI api get /api/2.0/clusters/list --profile host-only trace print_requests.py --get //api/2.0/clusters/list diff --git a/acceptance/cmd/api/request-handling/output.txt b/acceptance/cmd/api/request-handling/output.txt index a8d9ede8e51..467db6038ec 100644 --- a/acceptance/cmd/api/request-handling/output.txt +++ b/acceptance/cmd/api/request-handling/output.txt @@ -1,8 +1,10 @@ === Accept: application/json is sent (the raw response target must not drop it) + OK: Accept header present === A literal 'null' --json sends no request body (not the bytes "null") + >>> print_requests.py //test/req --del-field headers { "method": "POST", @@ -10,6 +12,7 @@ OK: Accept header present } === Query parameters in the path and a --json body are both sent + >>> print_requests.py //test/req --del-field headers { "method": "POST", @@ -24,4 +27,4 @@ OK: Accept header present } === Malformed --json is rejected client-side with a positioned error -Error: error decoding JSON at (inline):1:9: invalid character '}' looking for beginning of object key string +Error: error decoding JSON at (inline):1:8: invalid character ',' looking for beginning of value diff --git a/acceptance/cmd/api/request-handling/script b/acceptance/cmd/api/request-handling/script index c85bccd5df9..f9efdb0396c 100644 --- a/acceptance/cmd/api/request-handling/script +++ b/acceptance/cmd/api/request-handling/script @@ -13,5 +13,5 @@ title "Query parameters in the path and a --json body are both sent" MSYS_NO_PATHCONV=1 $CLI api post "/api/2.0/test/req?foo=bar&x=1" --json '{"hello": "world"}' > /dev/null trace print_requests.py //test/req --del-field headers -title "Malformed --json is rejected client-side with a positioned error\n" +title "Malformed --json is rejected client-side with a positioned error" MSYS_NO_PATHCONV=1 musterr $CLI api post /api/2.0/test/req --json '{"a": 1,}' diff --git a/acceptance/cmd/api/response-handling/output.txt b/acceptance/cmd/api/response-handling/output.txt index f1724aef023..11719fed44b 100644 --- a/acceptance/cmd/api/response-handling/output.txt +++ b/acceptance/cmd/api/response-handling/output.txt @@ -1,16 +1,20 @@ === Empty response body renders null + >>> [CLI] api get /api/2.0/test/empty null === A trailing newline in the body does not add a blank line + >>> [CLI] api get /api/2.0/test/trailing { "ok": true } === An HTML response surfaces the SDK's actionable error + OK: HTML detected === A malformed JSON response surfaces an unmarshal error + OK: unmarshal error reported diff --git a/acceptance/cmd/auth/describe/account-host-with-workspace-id/output.txt b/acceptance/cmd/auth/describe/account-host-with-workspace-id/output.txt index 505db5b55c1..b4207dd331d 100644 --- a/acceptance/cmd/auth/describe/account-host-with-workspace-id/output.txt +++ b/acceptance/cmd/auth/describe/account-host-with-workspace-id/output.txt @@ -1,6 +1,5 @@ === Describe falls back to the account endpoint when the workspace check fails - >>> [CLI] auth describe --profile acct-with-ws Host: [DATABRICKS_URL] Account ID: acct-123 diff --git a/acceptance/cmd/auth/describe/account-host-with-workspace-id/script b/acceptance/cmd/auth/describe/account-host-with-workspace-id/script index e2ba8c9ff19..de29ec18197 100644 --- a/acceptance/cmd/auth/describe/account-host-with-workspace-id/script +++ b/acceptance/cmd/auth/describe/account-host-with-workspace-id/script @@ -5,5 +5,5 @@ sethome "./home" # serves account APIs (https://github.com/databricks/cli/issues/5479). envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" -title "Describe falls back to the account endpoint when the workspace check fails\n" +title "Describe falls back to the account endpoint when the workspace check fails" trace $CLI auth describe --profile acct-with-ws diff --git a/acceptance/cmd/auth/describe/bundle-profile-env/output.txt b/acceptance/cmd/auth/describe/bundle-profile-env/output.txt index 38d278a905d..bf594bbeea2 100644 --- a/acceptance/cmd/auth/describe/bundle-profile-env/output.txt +++ b/acceptance/cmd/auth/describe/bundle-profile-env/output.txt @@ -1,6 +1,5 @@ === Describe inside a bundle attributes the profile to DATABRICKS_CONFIG_PROFILE (#2303) - >>> [CLI] auth describe Host: [DATABRICKS_URL] User: [USERNAME] diff --git a/acceptance/cmd/auth/describe/bundle-profile-env/script b/acceptance/cmd/auth/describe/bundle-profile-env/script index 33dc4391829..7a5677ebee1 100644 --- a/acceptance/cmd/auth/describe/bundle-profile-env/script +++ b/acceptance/cmd/auth/describe/bundle-profile-env/script @@ -11,5 +11,5 @@ export DATABRICKS_CONFIG_PROFILE=env-profile # Inside a bundle root the resolved config labels every attribute "bundle", so # before #2303 the profile read "(from bundle)" even though it came from # DATABRICKS_CONFIG_PROFILE. describe must attribute it to the env var. -title "Describe inside a bundle attributes the profile to DATABRICKS_CONFIG_PROFILE (#2303)\n" +title "Describe inside a bundle attributes the profile to DATABRICKS_CONFIG_PROFILE (#2303)" trace $CLI auth describe diff --git a/acceptance/cmd/auth/describe/default-profile/output.txt b/acceptance/cmd/auth/describe/default-profile/output.txt index d6a00bdcb8c..5d413708be0 100644 --- a/acceptance/cmd/auth/describe/default-profile/output.txt +++ b/acceptance/cmd/auth/describe/default-profile/output.txt @@ -1,6 +1,5 @@ === Describe without --profile (DATABRICKS_HOST takes precedence over default_profile) - >>> [CLI] auth describe Host: [DATABRICKS_URL] User: [USERNAME] @@ -18,7 +17,6 @@ Current configuration: ✓ discovery_url: [DATABRICKS_URL]/oidc/.well-known/oauth-authorization-server === Describe without --profile and without DATABRICKS_HOST (uses default_profile) - >>> [CLI] auth describe Host: [DATABRICKS_URL] User: [USERNAME] diff --git a/acceptance/cmd/auth/describe/default-profile/script b/acceptance/cmd/auth/describe/default-profile/script index 8a677abec6f..5faa33cbdaf 100644 --- a/acceptance/cmd/auth/describe/default-profile/script +++ b/acceptance/cmd/auth/describe/default-profile/script @@ -5,10 +5,10 @@ envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" # DATABRICKS_HOST is set in the environment, so authentication is fully # determined by the environment and the default profile is not pinned. -title "Describe without --profile (DATABRICKS_HOST takes precedence over default_profile)\n" +title "Describe without --profile (DATABRICKS_HOST takes precedence over default_profile)" trace $CLI auth describe # Without a host in the environment, the default profile is resolved and used. unset DATABRICKS_HOST DATABRICKS_TOKEN -title "Describe without --profile and without DATABRICKS_HOST (uses default_profile)\n" +title "Describe without --profile and without DATABRICKS_HOST (uses default_profile)" trace $CLI auth describe diff --git a/acceptance/cmd/auth/describe/profile-overrides-env/output.txt b/acceptance/cmd/auth/describe/profile-overrides-env/output.txt index 60872b97469..92bf0a122d6 100644 --- a/acceptance/cmd/auth/describe/profile-overrides-env/output.txt +++ b/acceptance/cmd/auth/describe/profile-overrides-env/output.txt @@ -1,6 +1,5 @@ === Describe with --profile overrides auth env vars (#5096) - >>> [CLI] auth describe --profile my-workspace Host: [DATABRICKS_URL] User: [USERNAME] @@ -18,7 +17,6 @@ Current configuration: ✓ discovery_url: [DATABRICKS_URL]/oidc/.well-known/oauth-authorization-server === Describe with a host-only --profile fills the token from the environment (#5096) - >>> [CLI] auth describe --profile host-only Host: [DATABRICKS_URL] User: [USERNAME] diff --git a/acceptance/cmd/auth/describe/profile-overrides-env/script b/acceptance/cmd/auth/describe/profile-overrides-env/script index cccc6917845..9837009340c 100644 --- a/acceptance/cmd/auth/describe/profile-overrides-env/script +++ b/acceptance/cmd/auth/describe/profile-overrides-env/script @@ -9,11 +9,11 @@ real_token=$DATABRICKS_TOKEN export DATABRICKS_HOST=https://dev.cloud.databricks.test export DATABRICKS_TOKEN=dev-token -title "Describe with --profile overrides auth env vars (#5096)\n" +title "Describe with --profile overrides auth env vars (#5096)" trace $CLI auth describe --profile my-workspace # Host-only profile: the profile wins for the host, but env fills the token it # omits (#5096). export DATABRICKS_TOKEN=$real_token -title "Describe with a host-only --profile fills the token from the environment (#5096)\n" +title "Describe with a host-only --profile fills the token from the environment (#5096)" trace $CLI auth describe --profile host-only diff --git a/acceptance/cmd/auth/docker/configure-errors/output.txt b/acceptance/cmd/auth/docker/configure-errors/output.txt index 9bf795932c9..5304b099bed 100644 --- a/acceptance/cmd/auth/docker/configure-errors/output.txt +++ b/acceptance/cmd/auth/docker/configure-errors/output.txt @@ -1,6 +1,5 @@ === Unsupported inherited flags - >>> musterr [CLI] auth docker configure docker-test --host https://other.cloud.databricks.test Error: --host is not supported for auth docker configure. Select the workspace with [PROFILE] or --profile instead @@ -11,12 +10,10 @@ Error: --account-id is not supported for auth docker configure. Select the works Error: --workspace-id is not supported for auth docker configure. Select the workspace with [PROFILE] or --profile instead === Profile argument and flag - >>> musterr [CLI] auth docker configure docker-test --profile docker-test Error: argument "docker-test" cannot be combined with --profile. Use --profile instead === Invalid explicit region - >>> musterr [CLI] auth docker configure docker-test --region= Flag --region has been deprecated, --region will be fully removed in the next release Error: region is required @@ -30,12 +27,10 @@ Flag --region has been deprecated, --region will be fully removed in the next re Error: invalid region "invalid_region" === Unsupported workspace host - >>> musterr [CLI] auth docker configure unsupported-host Error: profile "unsupported-host" does not target a supported Databricks workspace host. Select a workspace profile, or create one with databricks auth login --host --profile === Unsupported authentication profiles - >>> musterr [CLI] auth docker configure pat Error: profile "pat" uses auth_type "pat". Docker credential helper requires a profile created by databricks auth login @@ -46,7 +41,6 @@ Error: profile "m2m" uses client credentials. Docker credential helper requires Error: profile "blank-auth" uses auth_type "". Docker credential helper requires a profile created by databricks auth login === Another profile already maps to the workspace - >>> musterr [CLI] auth docker configure docker-test Error: multiple Databricks profiles match workspace ID [NUMID]: duplicate and docker-test. Remove duplicate workspace_id entries before using Docker credential helper diff --git a/acceptance/cmd/auth/docker/configure-errors/script b/acceptance/cmd/auth/docker/configure-errors/script index b05752e3027..da8890f5abe 100644 --- a/acceptance/cmd/auth/docker/configure-errors/script +++ b/acceptance/cmd/auth/docker/configure-errors/script @@ -33,31 +33,31 @@ workspace_id = 333444555 ENDCFG cp "$HOME/.databrickscfg" "$HOME/databrickscfg.before" -title "Unsupported inherited flags\n" +title "Unsupported inherited flags" trace musterr $CLI auth docker configure docker-test --host https://other.cloud.databricks.test trace musterr $CLI auth docker configure docker-test --account-id 00000000-0000-0000-0000-000000000000 trace musterr $CLI auth docker configure docker-test --workspace-id 900800700600 -title "Profile argument and flag\n" +title "Profile argument and flag" trace musterr $CLI auth docker configure docker-test --profile docker-test -title "Invalid explicit region\n" +title "Invalid explicit region" trace musterr $CLI auth docker configure docker-test --region= trace configure_with_whitespace_region trace musterr $CLI auth docker configure docker-test --region=invalid_region -title "Unsupported workspace host\n" +title "Unsupported workspace host" trace musterr $CLI auth docker configure unsupported-host -title "Unsupported authentication profiles\n" +title "Unsupported authentication profiles" trace musterr $CLI auth docker configure pat trace musterr $CLI auth docker configure m2m trace musterr $CLI auth docker configure blank-auth -title "Another profile already maps to the workspace\n" +title "Another profile already maps to the workspace" trace musterr $CLI auth docker configure docker-test -title "Nothing changed\n" +title "Nothing changed" assert_not_exists.py "$DOCKER_CONFIG/config.json" cmp "$HOME/databrickscfg.before" "$HOME/.databrickscfg" printf 'Docker config not created; profiles unchanged\n' diff --git a/acceptance/cmd/auth/docker/configure-missing-region/script b/acceptance/cmd/auth/docker/configure-missing-region/script index 0925a13ff8f..4b86dcad6fd 100644 --- a/acceptance/cmd/auth/docker/configure-missing-region/script +++ b/acceptance/cmd/auth/docker/configure-missing-region/script @@ -6,7 +6,7 @@ cp "$HOME/.databrickscfg" "$HOME/databrickscfg.before" trace musterr $CLI auth docker configure docker-test -title "Profile and Docker state unchanged\n" +title "Profile and Docker state unchanged" cmp "$HOME/databrickscfg.before" "$HOME/.databrickscfg" assert_not_exists.py "$DOCKER_CONFIG/config.json" assert_not_exists.py "$HOME/bin/docker-credential-databricks" diff --git a/acceptance/cmd/auth/docker/configure/output.txt b/acceptance/cmd/auth/docker/configure/output.txt index ac0b64def36..e4c7d317252 100644 --- a/acceptance/cmd/auth/docker/configure/output.txt +++ b/acceptance/cmd/auth/docker/configure/output.txt @@ -111,7 +111,6 @@ Docker config unchanged } === Deprecated --region flag skips workspace lookups - >>> databricks auth docker configure docker-test --region us-west-2 Flag --region has been deprecated, --region will be fully removed in the next release Configured Docker credential helper for [NUMID].container.us-west-2.localhost diff --git a/acceptance/cmd/auth/docker/configure/script b/acceptance/cmd/auth/docker/configure/script index 96b62b88d8e..8df314ca720 100644 --- a/acceptance/cmd/auth/docker/configure/script +++ b/acceptance/cmd/auth/docker/configure/script @@ -22,10 +22,10 @@ if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; t } fi -title "Docker config\n" +title "Docker config" jq -S . "$DOCKER_CONFIG/config.json" -title "Profile with resolved workspace ID\n" +title "Profile with resolved workspace ID" cat "$HOME/.databrickscfg" trace databricks auth docker host --profile docker-test --output json | tee "$HOME/host.json" @@ -34,24 +34,24 @@ trace print_requests.py --get //api registry_host=$(jq -r .host "$HOME/host.json") printf '%s\n' "$registry_host" | trace docker-credential-databricks get | jq -S . -title "Invalid registry host\n" +title "Invalid registry host" printf '%s\n' registry.example.test | trace musterr docker-credential-databricks get trace musterr docker-credential-databricks erase -title "Configure again\n" +title "Configure again" cp "$DOCKER_CONFIG/config.json" "$HOME/config.before.json" databricks auth docker configure docker-test &>LOG.configure-again cmp "$HOME/config.before.json" "$DOCKER_CONFIG/config.json" printf 'Docker config unchanged\n' trace print_requests.py --get //api -title "Deprecated --region flag skips workspace lookups\n" +title "Deprecated --region flag skips workspace lookups" trace databricks auth docker configure docker-test --region us-west-2 assert_not_exists.py "$OUT_REQUESTS" printf 'No requests sent\n' -title "Explicit --region resolves a missing workspace ID\n" +title "Explicit --region resolves a missing workspace ID" cat > "$HOME/.databrickscfg" <>> musterr [CLI] auth docker host Error: --profile is required for auth docker host === Workspace profile required - >>> musterr [CLI] auth docker host --profile account Error: profile "account" does not target a workspace. Run databricks auth login --host and retry with that profile === Unsupported workspace host - >>> musterr [CLI] auth docker host --profile unsupported-host Error: profile "unsupported-host" does not target a supported Databricks workspace host. Select a workspace profile, or create one with databricks auth login --host --profile === Other authentication flags not supported - >>> musterr [CLI] auth docker host --profile docker-test --host https://other.cloud.databricks.test Error: --host is not supported for auth docker host. Select the workspace with --profile instead @@ -26,7 +22,6 @@ Error: --account-id is not supported for auth docker host. Select the workspace Error: --workspace-id is not supported for auth docker host. Select the workspace with --profile instead === Credential helper not configured - >>> [CLI] auth docker host --profile docker-test Registry host: [NUMID].container.us-west-2.localhost Credential helper configured: NO diff --git a/acceptance/cmd/auth/docker/host/script b/acceptance/cmd/auth/docker/host/script index 576f6c4ffa6..b713beb42fe 100644 --- a/acceptance/cmd/auth/docker/host/script +++ b/acceptance/cmd/auth/docker/host/script @@ -1,7 +1,7 @@ setup_docker_auth export DOCKER_CONFIG="$HOME/docker" -title "Profile required\n" +title "Profile required" trace musterr $CLI auth docker host cat >> "$HOME/.databrickscfg" <<'ENDCFG' @@ -17,31 +17,31 @@ auth_type = databricks-cli ENDCFG cp "$HOME/.databrickscfg" "$HOME/databrickscfg.before" -title "Workspace profile required\n" +title "Workspace profile required" trace musterr $CLI auth docker host --profile account -title "Unsupported workspace host\n" +title "Unsupported workspace host" trace musterr $CLI auth docker host --profile unsupported-host -title "Other authentication flags not supported\n" +title "Other authentication flags not supported" trace musterr $CLI auth docker host --profile docker-test --host https://other.cloud.databricks.test trace musterr $CLI auth docker host --profile docker-test --account-id 00000000-0000-0000-0000-000000000000 trace musterr $CLI auth docker host --profile docker-test --workspace-id 111222333 -title "Credential helper not configured\n" +title "Credential helper not configured" trace $CLI auth docker host --profile docker-test assert_not_exists.py "$DOCKER_CONFIG/config.json" -title "Invalid Docker config\n" +title "Invalid Docker config" mkdir -p "$DOCKER_CONFIG" cp invalid-docker-config.json "$DOCKER_CONFIG/config.json" trace musterr $CLI auth docker host --profile docker-test -title "Default credential store without an installed helper\n" +title "Default credential store without an installed helper" cp docker-config.json "$DOCKER_CONFIG/config.json" trace PATH="$HOME" $CLI auth docker host --profile docker-test trace PATH="$HOME" $CLI auth docker host --profile docker-test --output json -title "Profiles unchanged\n" +title "Profiles unchanged" cmp "$HOME/databrickscfg.before" "$HOME/.databrickscfg" printf 'Workspace ID not saved\n' diff --git a/acceptance/cmd/auth/docker/invalid-refresh-token/output.txt b/acceptance/cmd/auth/docker/invalid-refresh-token/output.txt index a206e114758..eb9ec04cc4e 100644 --- a/acceptance/cmd/auth/docker/invalid-refresh-token/output.txt +++ b/acceptance/cmd/auth/docker/invalid-refresh-token/output.txt @@ -1,6 +1,5 @@ === Unresolved workspace ID - >>> musterr [CLI] auth docker host --profile docker-test Error: A new access token could not be retrieved because the refresh token is invalid. To reauthenticate, run the following command: $ databricks auth login --profile docker-test @@ -10,7 +9,6 @@ Error: A new access token could not be retrieved because the refresh token is in $ databricks auth login --profile docker-test === Stored workspace ID - >>> musterr [CLI] auth docker host --profile docker-test Error: A new access token could not be retrieved because the refresh token is invalid. To reauthenticate, run the following command: $ databricks auth login --profile docker-test diff --git a/acceptance/cmd/auth/docker/invalid-refresh-token/script b/acceptance/cmd/auth/docker/invalid-refresh-token/script index ddbfcf8c015..7bb96ab1438 100644 --- a/acceptance/cmd/auth/docker/invalid-refresh-token/script +++ b/acceptance/cmd/auth/docker/invalid-refresh-token/script @@ -2,7 +2,7 @@ setup_docker_auth cp token-cache.json "$HOME/.databricks/token-cache.json" export DOCKER_CONFIG="$HOME/docker" -title "Unresolved workspace ID\n" +title "Unresolved workspace ID" trace musterr $CLI auth docker host --profile docker-test trace musterr $CLI auth docker configure docker-test @@ -10,11 +10,11 @@ cat >> "$HOME/.databrickscfg" <<'ENDCFG' workspace_id = 900800700600 ENDCFG -title "Stored workspace ID\n" +title "Stored workspace ID" trace musterr $CLI auth docker host --profile docker-test trace musterr $CLI auth docker configure docker-test printf '%s\n' "900800700600.container.us-west-2.localhost" | trace musterr $CLI auth docker token -title "Docker config not created\n" +title "Docker config not created" assert_not_exists.py "$DOCKER_CONFIG/config.json" printf 'OK\n' diff --git a/acceptance/cmd/auth/docker/token/script b/acceptance/cmd/auth/docker/token/script index a272f6af120..154eab1406e 100644 --- a/acceptance/cmd/auth/docker/token/script +++ b/acceptance/cmd/auth/docker/token/script @@ -4,30 +4,30 @@ workspace_id = 900800700600 ENDCFG registry_host=900800700600.container.us-west-2.localhost -title "Cached token\n" +title "Cached token" printf '%s\n' "$registry_host" | trace $CLI auth docker token --no-force-refresh | jq -S . -title "Refreshed token by default\n" +title "Refreshed token by default" printf '%s\n' "$registry_host" | trace $CLI auth docker token | jq -S . -title "No profile for the workspace\n" +title "No profile for the workspace" printf '%s\n' "111222333.container.us-west-2.localhost" | trace musterr $CLI auth docker token -title "Not an Artifact Registry host\n" +title "Not an Artifact Registry host" printf '%s\n' "registry.example.test" | trace musterr $CLI auth docker token -title "Profile flag not supported\n" +title "Profile flag not supported" printf '%s\n' "$registry_host" | trace musterr $CLI auth docker token --profile docker-test -title "Positional argument not supported\n" +title "Positional argument not supported" printf '%s\n' "$registry_host" | trace musterr $CLI auth docker token docker-test -title "Other authentication flags not supported\n" +title "Other authentication flags not supported" printf '%s\n' "$registry_host" | trace musterr $CLI auth docker token --host https://other.cloud.databricks.test printf '%s\n' "$registry_host" | trace musterr $CLI auth docker token --account-id 00000000-0000-0000-0000-000000000000 printf '%s\n' "$registry_host" | trace musterr $CLI auth docker token --workspace-id 111222333 -title "Test-server registry never matches a remote workspace\n" +title "Test-server registry never matches a remote workspace" cat >> "$HOME/.databrickscfg" <<'ENDCFG' [remote] @@ -37,7 +37,7 @@ workspace_id = 444555666 ENDCFG printf '%s\n' "444555666.container.us-west-2.localhost" | trace musterr $CLI auth docker token -title "Multiple profiles for the workspace\n" +title "Multiple profiles for the workspace" cat >> "$HOME/.databrickscfg" < "./home/.databrickscfg" -title "Initial profile with cluster_id\n" +title "Initial profile with cluster_id" cat "./home/.databrickscfg" # Use a fake browser that performs a GET on the authorization URL @@ -13,7 +13,7 @@ export BROWSER="browser.py" title "Run auth login with --configure-serverless" trace $CLI auth login --host $DATABRICKS_HOST --profile DEFAULT --configure-serverless -title "Profile after auth login with --configure-serverless\n" +title "Profile after auth login with --configure-serverless" cat "./home/.databrickscfg" # Track the .databrickscfg file that was created to surface changes. diff --git a/acceptance/cmd/auth/login/custom-config-file/script b/acceptance/cmd/auth/login/custom-config-file/script index d253b4a3d8b..6320234b665 100644 --- a/acceptance/cmd/auth/login/custom-config-file/script +++ b/acceptance/cmd/auth/login/custom-config-file/script @@ -9,7 +9,7 @@ export DATABRICKS_CONFIG_FILE="./home/custom.databrickscfg" # home/custom.databrickscfg is a checked-in input: an existing custom config file # with a DIFFERENT host. Since --profile and --host conflict, the CLI should error. -title "Initial custom config file (with old host)\n" +title "Initial custom config file (with old host)" cat "./home/custom.databrickscfg" title "Login with conflicting host (should error)" diff --git a/acceptance/cmd/auth/login/host-arg-overrides-profile/script b/acceptance/cmd/auth/login/host-arg-overrides-profile/script index 44badb0d1c4..854d810f117 100644 --- a/acceptance/cmd/auth/login/host-arg-overrides-profile/script +++ b/acceptance/cmd/auth/login/host-arg-overrides-profile/script @@ -1,7 +1,7 @@ sethome "./home" # home/.databrickscfg is a checked-in input: an existing profile with a DIFFERENT host. -title "Initial profile with old host\n" +title "Initial profile with old host" cat "./home/.databrickscfg" # Login with --profile and --host where the profile has a different host. diff --git a/acceptance/cmd/auth/login/host-from-profile/output.txt b/acceptance/cmd/auth/login/host-from-profile/output.txt index 841ec08ade0..def7eeb899d 100644 --- a/acceptance/cmd/auth/login/host-from-profile/output.txt +++ b/acceptance/cmd/auth/login/host-from-profile/output.txt @@ -10,17 +10,14 @@ client_id = custom-client-id Profile existing-profile was successfully saved === OAuth client ID - >>> print_requests.py //oidc/v1/authorize --get json.q.client_id = "custom-client-id"; === Login with a client ID override - >>> [CLI] auth login --profile existing-profile --client-id flag-client-id Profile existing-profile was successfully saved === Overridden OAuth client ID - >>> print_requests.py //oidc/v1/authorize --get json.q.client_id = "flag-client-id"; diff --git a/acceptance/cmd/auth/login/host-from-profile/script b/acceptance/cmd/auth/login/host-from-profile/script index c800d378fea..5b09df96d94 100644 --- a/acceptance/cmd/auth/login/host-from-profile/script +++ b/acceptance/cmd/auth/login/host-from-profile/script @@ -3,7 +3,7 @@ sethome "./home" # An existing profile with a host. envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" -title "Initial profile\n" +title "Initial profile" cat "./home/.databrickscfg" # Use a fake browser that performs a GET on the authorization URL @@ -14,16 +14,16 @@ export BROWSER="browser.py" title "Login with existing profile (no host argument)" trace $CLI auth login --profile existing-profile -title "OAuth client ID\n" +title "OAuth client ID" trace print_requests.py //oidc/v1/authorize --get | gron.py | grep client_id -title "Login with a client ID override\n" +title "Login with a client ID override" trace $CLI auth login --profile existing-profile --client-id flag-client-id -title "Overridden OAuth client ID\n" +title "Overridden OAuth client ID" trace print_requests.py //oidc/v1/authorize --get | gron.py | grep client_id -title "Profile after login\n" +title "Profile after login" cat "./home/.databrickscfg" # Track the .databrickscfg file that was created to surface changes. diff --git a/acceptance/cmd/auth/login/preserve-fields/script b/acceptance/cmd/auth/login/preserve-fields/script index b416038a3e3..239864a17b1 100644 --- a/acceptance/cmd/auth/login/preserve-fields/script +++ b/acceptance/cmd/auth/login/preserve-fields/script @@ -4,7 +4,7 @@ sethome "./home" # key that is not a recognized SDK config attribute. envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" -title "Initial profile\n" +title "Initial profile" cat "./home/.databrickscfg" # Use a fake browser that performs a GET on the authorization URL @@ -14,5 +14,5 @@ export BROWSER="browser.py" title "Run auth login (no --configure-cluster or --configure-serverless)" trace $CLI auth login --host $DATABRICKS_HOST --profile DEFAULT -title "Profile after auth login — all non-auth fields should be preserved\n" +title "Profile after auth login — all non-auth fields should be preserved" cat "./home/.databrickscfg" diff --git a/acceptance/cmd/auth/logout/default-profile/script b/acceptance/cmd/auth/logout/default-profile/script index 367175b945f..b5b0be2042f 100644 --- a/acceptance/cmd/auth/logout/default-profile/script +++ b/acceptance/cmd/auth/logout/default-profile/script @@ -2,16 +2,16 @@ sethome "./home" envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" -title "Initial config\n" +title "Initial config" cat "./home/.databrickscfg" title "Delete the DEFAULT profile" trace $CLI auth logout --profile DEFAULT --auto-approve --delete -title "Backup file should exist\n" +title "Backup file should exist" assert_backup_exists -title "Config after logout — empty DEFAULT with comment should remain at the top of the file\n" +title "Config after logout — empty DEFAULT with comment should remain at the top of the file" cat "./home/.databrickscfg" cp "./home/.databrickscfg" "./out.databrickscfg" diff --git a/acceptance/cmd/auth/logout/delete-clears-default/script b/acceptance/cmd/auth/logout/delete-clears-default/script index 2028390f4ad..efa7348eec8 100644 --- a/acceptance/cmd/auth/logout/delete-clears-default/script +++ b/acceptance/cmd/auth/logout/delete-clears-default/script @@ -1,18 +1,18 @@ sethome "./home" -title "Initial settings section\n" +title "Initial settings section" cat "./home/.databrickscfg" | grep -A1 __settings__ title "Delete the default profile" trace $CLI auth logout --profile workspace-a --auto-approve --delete -title "Settings after deleting default — default_profile should be cleared\n" +title "Settings after deleting default — default_profile should be cleared" cat "./home/.databrickscfg" | grep -A1 __settings__ title "Delete a non-default profile" trace $CLI auth logout --profile workspace-b --auto-approve --delete -title "Settings after deleting non-default — section should still be present but empty\n" +title "Settings after deleting non-default — section should still be present but empty" cat "./home/.databrickscfg" | grep -A1 __settings__ cp "./home/.databrickscfg" "./out.databrickscfg" diff --git a/acceptance/cmd/auth/logout/delete-pat-token-profile/script b/acceptance/cmd/auth/logout/delete-pat-token-profile/script index fbd2bc18b66..f7cf7398d6f 100644 --- a/acceptance/cmd/auth/logout/delete-pat-token-profile/script +++ b/acceptance/cmd/auth/logout/delete-pat-token-profile/script @@ -1,19 +1,19 @@ sethome "./home" -title "Initial config\n" +title "Initial config" cat "./home/.databrickscfg" title "Logout without --delete — should report no changes for non-U2M profile" trace $CLI auth logout --profile dev --auto-approve -title "Config after logout — profile should be unchanged\n" +title "Config after logout — profile should be unchanged" cat "./home/.databrickscfg" title "Logout with --delete — should delete the profile" trace $CLI auth logout --profile dev --auto-approve --delete -title "Backup file should exist\n" +title "Backup file should exist" assert_backup_exists -title "Config after delete — profile should be removed\n" +title "Config after delete — profile should be removed" cat "./home/.databrickscfg" diff --git a/acceptance/cmd/auth/logout/error-cases/script b/acceptance/cmd/auth/logout/error-cases/script index 08803a732f1..cb1a3861c3d 100644 --- a/acceptance/cmd/auth/logout/error-cases/script +++ b/acceptance/cmd/auth/logout/error-cases/script @@ -1,7 +1,7 @@ sethome "./home" -title "Logout of non-existent profile\n" +title "Logout of non-existent profile" musterr $CLI auth logout --profile nonexistent --auto-approve -title "Logout without --profile in non-interactive mode\n" +title "Logout without --profile in non-interactive mode" musterr $CLI auth logout --auto-approve diff --git a/acceptance/cmd/auth/logout/last-non-default/script b/acceptance/cmd/auth/logout/last-non-default/script index d95069a5552..d1a9aa6b8bc 100644 --- a/acceptance/cmd/auth/logout/last-non-default/script +++ b/acceptance/cmd/auth/logout/last-non-default/script @@ -2,16 +2,16 @@ sethome "./home" envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" -title "Initial config\n" +title "Initial config" cat "./home/.databrickscfg" title "Delete the only non-default profile" trace $CLI auth logout --profile only-profile --auto-approve --delete -title "Backup file should exist\n" +title "Backup file should exist" assert_backup_exists -title "Config after logout — DEFAULT section with comment should remain\n" +title "Config after logout — DEFAULT section with comment should remain" cat "./home/.databrickscfg" cp "./home/.databrickscfg" "./out.databrickscfg" diff --git a/acceptance/cmd/auth/logout/ordering-preserved/script b/acceptance/cmd/auth/logout/ordering-preserved/script index 168657a373c..a484c32912e 100644 --- a/acceptance/cmd/auth/logout/ordering-preserved/script +++ b/acceptance/cmd/auth/logout/ordering-preserved/script @@ -2,22 +2,22 @@ sethome "./home" envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" -title "Initial config\n" +title "Initial config" cat "./home/.databrickscfg" title "Delete first non-default profile (alpha)" trace $CLI auth logout --profile alpha --auto-approve --delete -title "Backup file should exist\n" +title "Backup file should exist" assert_backup_exists -title "Config after deleting alpha\n" +title "Config after deleting alpha" cat "./home/.databrickscfg" title "Delete last profile (gamma)" trace $CLI auth logout --profile gamma --auto-approve --delete -title "Config after deleting gamma\n" +title "Config after deleting gamma" cat "./home/.databrickscfg" cp "./home/.databrickscfg" "./out.databrickscfg" diff --git a/acceptance/cmd/auth/logout/stale-account-id-workspace-host/script b/acceptance/cmd/auth/logout/stale-account-id-workspace-host/script index bd477db2e29..a7060c6578f 100644 --- a/acceptance/cmd/auth/logout/stale-account-id-workspace-host/script +++ b/acceptance/cmd/auth/logout/stale-account-id-workspace-host/script @@ -33,16 +33,16 @@ EOF title "Profiles before logout — logfood should be valid" trace $CLI auth profiles -title "Token cache keys before logout\n" +title "Token cache keys before logout" jq -S '.tokens | keys' "./home/.databricks/token-cache.json" title "Logout without --delete" trace $CLI auth logout --profile logfood --auto-approve -title "Config after logout — profile should still exist\n" +title "Config after logout — profile should still exist" cat "./home/.databrickscfg" -title "Token cache keys after logout — both entries should be removed\n" +title "Token cache keys after logout — both entries should be removed" jq -S '.tokens | keys' "./home/.databricks/token-cache.json" title "Profiles after logout — logfood should be invalid" diff --git a/acceptance/cmd/auth/logout/token-only-shared-host/script b/acceptance/cmd/auth/logout/token-only-shared-host/script index da37ff6dbdb..11e591802b6 100644 --- a/acceptance/cmd/auth/logout/token-only-shared-host/script +++ b/acceptance/cmd/auth/logout/token-only-shared-host/script @@ -34,14 +34,14 @@ cat > "./home/.databricks/token-cache.json" <>> [CLI] auth switch --profile profile-a Default profile set to "profile-a". @@ -9,14 +8,12 @@ Default profile set to "profile-a". default_profile = profile-a === Profiles after first switch - >>> [CLI] auth profiles --skip-validate Name Host Valid profile-a (Default) [DATABRICKS_URL] NO profile-b [DATABRICKS_URL] NO === Switch to profile-b - >>> [CLI] auth switch --profile profile-b Default profile set to "profile-b". @@ -25,7 +22,6 @@ Default profile set to "profile-b". default_profile = profile-b === Profiles after second switch - >>> [CLI] auth profiles --skip-validate Name Host Valid profile-a [DATABRICKS_URL] NO diff --git a/acceptance/cmd/auth/switch/nominal/script b/acceptance/cmd/auth/switch/nominal/script index b10cd6c03e7..a96311f5cce 100644 --- a/acceptance/cmd/auth/switch/nominal/script +++ b/acceptance/cmd/auth/switch/nominal/script @@ -3,22 +3,22 @@ sethome "./home" # Two profiles without a [__settings__] section. envsubst < "./home/.databrickscfg.tmpl" > "./home/.databrickscfg" -title "Switch to profile-a\n" +title "Switch to profile-a" trace $CLI auth switch --profile profile-a -title "Settings after first switch\n" +title "Settings after first switch" cat "./home/.databrickscfg" | grep -A1 __settings__ -title "Profiles after first switch\n" +title "Profiles after first switch" trace $CLI auth profiles --skip-validate -title "Switch to profile-b\n" +title "Switch to profile-b" trace $CLI auth switch --profile profile-b -title "Settings after second switch\n" +title "Settings after second switch" cat "./home/.databrickscfg" | grep -A1 __settings__ -title "Profiles after second switch\n" +title "Profiles after second switch" trace $CLI auth profiles --skip-validate # Track the final .databrickscfg to surface changes. diff --git a/acceptance/cmd/auth/token/default-profile/output.txt b/acceptance/cmd/auth/token/default-profile/output.txt index 4b386f69e94..3c486edf747 100644 --- a/acceptance/cmd/auth/token/default-profile/output.txt +++ b/acceptance/cmd/auth/token/default-profile/output.txt @@ -1,6 +1,5 @@ === default_profile is honored when no args, --profile, or env var - >>> errcode [CLI] auth token Warn: [hostmetadata] failed to fetch host metadata for https://myworkspace.test, will skip for 1m0s Error: cache: databricks OAuth is not configured for this host. no cached credentials; run `databricks auth login` to sign in diff --git a/acceptance/cmd/auth/token/default-profile/script b/acceptance/cmd/auth/token/default-profile/script index f5de6231901..0eda54a8a39 100644 --- a/acceptance/cmd/auth/token/default-profile/script +++ b/acceptance/cmd/auth/token/default-profile/script @@ -19,10 +19,10 @@ auth_type = databricks-cli default_profile = myprofile ENDCFG -title "default_profile is honored when no args, --profile, or env var\n" +title "default_profile is honored when no args, --profile, or env var" trace errcode $CLI auth token -title "default_profile pointing at a missing profile falls through to picker\n" +title "default_profile pointing at a missing profile falls through to picker" cat > "./home/.databrickscfg" <<'ENDCFG' [myprofile] host = https://myworkspace.test diff --git a/acceptance/cmd/completion/output.txt b/acceptance/cmd/completion/output.txt index d9e58987459..9a748f68b78 100644 --- a/acceptance/cmd/completion/output.txt +++ b/acceptance/cmd/completion/output.txt @@ -31,7 +31,5 @@ Shell: zsh File: [HOME]/.zshrc Status: not installed # bash completion V2 for databricks -*- shell-script -*- -#compdef databricks -# fish completion for databricks -*- shell-script -*- -# powershell completion for databricks -*- shell-script -*- -# bash completion V2 for databricks -*- shell-script -*- + +Exit code: 141 diff --git a/acceptance/cmd/configure/clears-oauth-on-pat/output.txt b/acceptance/cmd/configure/clears-oauth-on-pat/output.txt index 6142be378ed..e99863d6a55 100644 --- a/acceptance/cmd/configure/clears-oauth-on-pat/output.txt +++ b/acceptance/cmd/configure/clears-oauth-on-pat/output.txt @@ -9,6 +9,7 @@ account_id = acc-123 workspace_id = ws-456 === Run configure with PAT token + >>> [CLI] configure --token --host https://host === Profile after PAT configure diff --git a/acceptance/cmd/configure/clears-oauth-on-pat/script b/acceptance/cmd/configure/clears-oauth-on-pat/script index 6b00490f79a..93efe480cb9 100644 --- a/acceptance/cmd/configure/clears-oauth-on-pat/script +++ b/acceptance/cmd/configure/clears-oauth-on-pat/script @@ -2,11 +2,11 @@ sethome "./home" # home/.databrickscfg is a checked-in input: a profile with OAuth metadata and # unified host fields (as if `auth login` was previously run against a unified host). -title "Initial profile (OAuth with unified host)\n" +title "Initial profile (OAuth with unified host)" cat "./home/.databrickscfg" title "Run configure with PAT token" echo "new-token" | trace $CLI configure --token --host https://host -title "Profile after PAT configure\n" +title "Profile after PAT configure" cat "./home/.databrickscfg" diff --git a/acceptance/cmd/configure/clears-serverless-when-cluster-from-env/output.txt b/acceptance/cmd/configure/clears-serverless-when-cluster-from-env/output.txt index a0ef365e1dc..fe068da62cf 100644 --- a/acceptance/cmd/configure/clears-serverless-when-cluster-from-env/output.txt +++ b/acceptance/cmd/configure/clears-serverless-when-cluster-from-env/output.txt @@ -5,6 +5,7 @@ host = https://host serverless_compute_id = auto === Run configure with cluster from env var + >>> [CLI] configure --token --host https://host === Profile after configure (serverless should be cleared) diff --git a/acceptance/cmd/configure/clears-serverless-when-cluster-from-env/script b/acceptance/cmd/configure/clears-serverless-when-cluster-from-env/script index dcee6ef1209..0be20f66791 100644 --- a/acceptance/cmd/configure/clears-serverless-when-cluster-from-env/script +++ b/acceptance/cmd/configure/clears-serverless-when-cluster-from-env/script @@ -1,7 +1,7 @@ sethome "./home" # home/.databrickscfg is a checked-in input: a profile with serverless_compute_id. -title "Initial profile with serverless_compute_id\n" +title "Initial profile with serverless_compute_id" cat "./home/.databrickscfg" # Set cluster ID via env var (not via --configure-cluster flag). @@ -10,5 +10,5 @@ export DATABRICKS_CLUSTER_ID=env-cluster-789 title "Run configure with cluster from env var" echo "new-token" | trace $CLI configure --token --host https://host -title "Profile after configure (serverless should be cleared)\n" +title "Profile after configure (serverless should be cleared)" cat "./home/.databrickscfg" diff --git a/acceptance/cmd/psql/completions/script b/acceptance/cmd/psql/completions/script index b521c171224..6f859d8e17b 100644 --- a/acceptance/cmd/psql/completions/script +++ b/acceptance/cmd/psql/completions/script @@ -1,2 +1,2 @@ -title "Command should show instances names in autocomplete:\n" +title "Command should show instances names in autocomplete:" $CLI __complete psql "" diff --git a/acceptance/cmd/version/output.txt b/acceptance/cmd/version/output.txt index c34d5ba5254..04d705dcedc 100644 --- a/acceptance/cmd/version/output.txt +++ b/acceptance/cmd/version/output.txt @@ -1,17 +1,14 @@ === version stays lightweight - >>> [CLI] version Databricks CLI v[CLI_VERSION] === version --check - >>> [CLI] version --check Databricks CLI v[CLI_VERSION] This is a development build; skipping the update check. === version --check --output json - >>> [CLI] version --check --output json { "current_version": "[CLI_VERSION]", diff --git a/acceptance/cmd/version/script b/acceptance/cmd/version/script index d4e36422ed0..85f4b5bbd3d 100644 --- a/acceptance/cmd/version/script +++ b/acceptance/cmd/version/script @@ -1,10 +1,10 @@ -title "version stays lightweight\n" +title "version stays lightweight" trace $CLI version # The acceptance binary is a development build, so the check short-circuits # without contacting GitHub. This exercises command wiring and output rendering. -title "version --check\n" +title "version --check" trace $CLI version --check -title "version --check --output json\n" +title "version --check --output json" trace $CLI version --check --output json diff --git a/acceptance/cmd/workspace/apps/run-local-node/output.txt b/acceptance/cmd/workspace/apps/run-local-node/output.txt index e6b0bd0a642..4af53926850 100644 --- a/acceptance/cmd/workspace/apps/run-local-node/output.txt +++ b/acceptance/cmd/workspace/apps/run-local-node/output.txt @@ -11,12 +11,10 @@ Running command: node -e console.log('Hello, world') Hello, world === Proxy forwards to the app - >>> retry --until Hello From App curl -sS http://127.0.0.1:[PROXY_PORT] {"message":"Hello From App"} === Debug mode reports the debugger port, and node listens on it - >>> retry grep -x To debug your app, attach a debugger to port [DEBUG_PORT] LOG.run To debug your app, attach a debugger to port [DEBUG_PORT] @@ -24,5 +22,4 @@ To debug your app, attach a debugger to port [DEBUG_PORT] Debugger listening on ws://127.0.0.1:[DEBUG_PORT]/[UUID] === Shutting the app down - >>> curl -sS -o /dev/null http://127.0.0.1:[PROXY_PORT]/shutdown diff --git a/acceptance/cmd/workspace/apps/run-local-node/script b/acceptance/cmd/workspace/apps/run-local-node/script index 9749e979748..f0af1fe287b 100755 --- a/acceptance/cmd/workspace/apps/run-local-node/script +++ b/acceptance/cmd/workspace/apps/run-local-node/script @@ -8,7 +8,7 @@ add_repl "$DEBUG_PORT" DEBUG_PORT # The app and the proxy start asynchronously; allow up to 15s for them to come up. export RETRY_MAX_ATTEMPTS=30 -title "Prepare environment runs the build script, and the entry point overrides app.yml\n" +title "Prepare environment runs the build script, and the entry point overrides app.yml" # npm reaches no registry here: nothing to install, and app/.npmrc turns off its update check. # The build script runs only if the install succeeded, so the first grep covers both halves. trace $CLI apps run-local --prepare-environment --entry-point test.yml --port "$PREPARE_PORT" &> ../LOG.prepare @@ -31,15 +31,15 @@ PID=$! trap cleanup EXIT cd .. -title "Proxy forwards to the app\n" +title "Proxy forwards to the app" trace retry --until "Hello From App" curl -sS "http://127.0.0.1:$PROXY_PORT" -title "Debug mode reports the debugger port, and node listens on it\n" +title "Debug mode reports the debugger port, and node listens on it" # The CLI prints this only after the proxy accepts connections, so the curl above can beat it. # node's line below needs no retry: it is written before the app listens, so the curl proves it. trace retry grep -x "To debug your app, attach a debugger to port $DEBUG_PORT" LOG.run trace grep "Debugger listening on ws://127.0.0.1:$DEBUG_PORT/" LOG.run -title "Shutting the app down\n" +title "Shutting the app down" trace curl -sS -o /dev/null "http://127.0.0.1:$PROXY_PORT/shutdown" wait $PID diff --git a/acceptance/cmd/workspace/apps/run-local/output.txt b/acceptance/cmd/workspace/apps/run-local/output.txt index 4c8b525b8cc..40cb0097c4a 100644 --- a/acceptance/cmd/workspace/apps/run-local/output.txt +++ b/acceptance/cmd/workspace/apps/run-local/output.txt @@ -1,6 +1,5 @@ === Env var with valueFrom cannot be resolved locally - >>> errcode [CLI] apps run-local --entry-point value-from.yml Error: VALUE_FROM defined in value-from.yml with valueFrom property and can't be resolved locally. Please set VALUE_FROM environment variable in your terminal or using --env flag @@ -15,20 +14,16 @@ Running command: python -c print('Hello, world') Hello, world === Proxy forwards to the app and injects the identity headers - >>> retry --until X-Forwarded-Email curl -sS http://127.0.0.1:[PROXY_PORT] {"Accept": "*/*", "Accept-Encoding": "gzip", "Host": "127.0.0.1:[APP_PORT]", "User-Agent": "curl/(version)", "X-Forwarded-Email": "[USERNAME]", "X-Forwarded-Host": "localhost", "X-Forwarded-Preferred-Username": "", "X-Forwarded-User": "[USERNAME]", "X-Real-Ip": "127.0.0.1", "X-Request-Id": "[UUID]"} === Proxy URL is reported on the port that was asked for - >>> grep -x To access your app go to http://localhost:[PROXY_PORT] LOG.run To access your app go to http://localhost:[PROXY_PORT] === App picked up the env var from app.yml - >>> grep -x Python app has started with: test LOG.run Python app has started with: test === Shutting the app down - >>> curl -sS -o /dev/null http://127.0.0.1:[PROXY_PORT]/shutdown diff --git a/acceptance/cmd/workspace/apps/run-local/script b/acceptance/cmd/workspace/apps/run-local/script index fd8b8b3c23e..780aa3dfc25 100755 --- a/acceptance/cmd/workspace/apps/run-local/script +++ b/acceptance/cmd/workspace/apps/run-local/script @@ -8,10 +8,10 @@ add_repl "$PROXY_PORT" PROXY_PORT # The app and the proxy start asynchronously; allow up to 15s for them to come up. export RETRY_MAX_ATTEMPTS=30 -title "Env var with valueFrom cannot be resolved locally\n" +title "Env var with valueFrom cannot be resolved locally" trace errcode $CLI apps run-local --entry-point value-from.yml 2>&1 -title "Entry point overrides the command from app.yml\n" +title "Entry point overrides the command from app.yml" trace $CLI apps run-local --entry-point test.yml --port "$ENTRY_POINT_PORT" &> ../LOG.entry-point trace grep -x "Running command: python -c print('Hello, world')" ../LOG.entry-point trace grep -x "Hello, world" ../LOG.entry-point @@ -32,15 +32,15 @@ PID=$! trap cleanup EXIT cd .. -title "Proxy forwards to the app and injects the identity headers\n" +title "Proxy forwards to the app and injects the identity headers" trace retry --until X-Forwarded-Email curl -sS "http://127.0.0.1:$PROXY_PORT" -title "Proxy URL is reported on the port that was asked for\n" +title "Proxy URL is reported on the port that was asked for" trace grep -x "To access your app go to http://localhost:$PROXY_PORT" LOG.run -title "App picked up the env var from app.yml\n" +title "App picked up the env var from app.yml" trace grep -x "Python app has started with: test" LOG.run -title "Shutting the app down\n" +title "Shutting the app down" trace curl -sS -o /dev/null "http://127.0.0.1:$PROXY_PORT/shutdown" wait $PID diff --git a/acceptance/cmd/workspace/arg-validation/output.txt b/acceptance/cmd/workspace/arg-validation/output.txt index c4d5c82a00f..82368adfea4 100644 --- a/acceptance/cmd/workspace/arg-validation/output.txt +++ b/acceptance/cmd/workspace/arg-validation/output.txt @@ -1,6 +1,5 @@ === clusters create requires a positional arg (or --json) - >>> musterr [CLI] clusters create Error: accepts 1 arg(s), received 0 @@ -52,6 +51,5 @@ Global Flags: === alerts-legacy create only accepts JSON input - >>> musterr [CLI] alerts-legacy create Error: please provide command input in JSON format by specifying the --json flag diff --git a/acceptance/cmd/workspace/arg-validation/script b/acceptance/cmd/workspace/arg-validation/script index 064065c87ca..e53f8a0bfac 100644 --- a/acceptance/cmd/workspace/arg-validation/script +++ b/acceptance/cmd/workspace/arg-validation/script @@ -1,8 +1,8 @@ # Generated commands validate their input before issuing any request, so these # cases need no workspace. -title "clusters create requires a positional arg (or --json)\n" +title "clusters create requires a positional arg (or --json)" trace musterr $CLI clusters create -title "alerts-legacy create only accepts JSON input\n" +title "alerts-legacy create only accepts JSON input" trace musterr $CLI alerts-legacy create diff --git a/acceptance/cmd/workspace/clusters-list/output.txt b/acceptance/cmd/workspace/clusters-list/output.txt index 3b3bcf763d0..b57cd9619b6 100644 --- a/acceptance/cmd/workspace/clusters-list/output.txt +++ b/acceptance/cmd/workspace/clusters-list/output.txt @@ -1,6 +1,5 @@ === clusters list renders the ID/Name/State columns - >>> [CLI] clusters list ID Name State 4321 some-test-cluster diff --git a/acceptance/cmd/workspace/clusters-list/script b/acceptance/cmd/workspace/clusters-list/script index eee3f5887aa..2c8d0c70c30 100644 --- a/acceptance/cmd/workspace/clusters-list/script +++ b/acceptance/cmd/workspace/clusters-list/script @@ -1,2 +1,2 @@ -title "clusters list renders the ID/Name/State columns\n" +title "clusters list renders the ID/Name/State columns" trace $CLI clusters list diff --git a/acceptance/cmd/workspace/postgres/create-branch/output.txt b/acceptance/cmd/workspace/postgres/create-branch/output.txt index 77a585bc3d0..c7b7853b7e0 100644 --- a/acceptance/cmd/workspace/postgres/create-branch/output.txt +++ b/acceptance/cmd/workspace/postgres/create-branch/output.txt @@ -1,16 +1,28 @@ === Set up the parent project + === create-branch --ttl: API (604800s), Go (168h) and day (7d) forms all go on the wire as seconds + === create-branch --no-expiry + === create-branch --ttl combined with a --json spec: the flag's ttl survives the json merge + === the pre-existing flags still work alongside --ttl: --name (body), --replace-existing (query), --timeout (wait) + === the --no-wait path still works alongside --no-expiry + === An expiration is required: no flag fails before any API call (no request recorded) + === Conflicting flags fail before any API call (no request recorded) + === --no-expiry with a --json that also sets spec.no_expiry is a conflict, not a silent override + === Malformed --json fails client-side + === An empty spec.ttl in --json fails client-side -=== Recorded create-branch request bodies{ + +=== Recorded create-branch request bodies +{ "method": "POST", "path": "/api/2.0/postgres/projects/acc-proj/branches", "q": { diff --git a/acceptance/cmd/workspace/put-secret/output.txt b/acceptance/cmd/workspace/put-secret/output.txt index 84649163a87..51809be17b9 100644 --- a/acceptance/cmd/workspace/put-secret/output.txt +++ b/acceptance/cmd/workspace/put-secret/output.txt @@ -2,7 +2,6 @@ >>> [CLI] secrets create-scope test-scope === --string-value is sent verbatim and read back as-is - >>> [CLI] secrets put-secret test-scope string-key --string-value test-value with-newlines @@ -24,12 +23,10 @@ with-newlines } === the two value flags are mutually exclusive - >>> musterr [CLI] secrets put-secret test-scope k --string-value a --bytes-value b Error: cannot specify both --bytes-value and --string-value === what the CLI actually put on the wire - >>> print_requests.py //api/2.0/secrets/put { "method": "POST", diff --git a/acceptance/cmd/workspace/put-secret/script b/acceptance/cmd/workspace/put-secret/script index a4f41d32b1e..c504a3de5ce 100644 --- a/acceptance/cmd/workspace/put-secret/script +++ b/acceptance/cmd/workspace/put-secret/script @@ -1,7 +1,7 @@ scope="test-scope" trace $CLI secrets create-scope $scope -title "--string-value is sent verbatim and read back as-is\n" +title "--string-value is sent verbatim and read back as-is" trace $CLI secrets put-secret $scope string-key --string-value "test-value with-newlines " @@ -11,13 +11,13 @@ trace $CLI secrets get-secret $scope string-key # kept ASCII on purpose: Git Bash re-encodes non-UTF-8 argv bytes (\xfe becomes # \xc3\xbe), which would make the payload differ on Windows. A null byte is not # usable either, since bash drops it from "$(...)". -title "--bytes-value is base64-encoded by the CLI before it is sent\n" +title "--bytes-value is base64-encoded by the CLI before it is sent" bytes=$(printf '\x01\x02\x03') trace $CLI secrets put-secret $scope bytes-key --bytes-value "$bytes" trace $CLI secrets get-secret $scope bytes-key -title "the two value flags are mutually exclusive\n" +title "the two value flags are mutually exclusive" trace musterr $CLI secrets put-secret $scope k --string-value a --bytes-value b -title "what the CLI actually put on the wire\n" +title "what the CLI actually put on the wire" trace print_requests.py //api/2.0/secrets/put diff --git a/acceptance/fips/output.txt b/acceptance/fips/output.txt index 910a5b8e062..c467f0436be 100644 --- a/acceptance/fips/output.txt +++ b/acceptance/fips/output.txt @@ -1,5 +1,5 @@ >>> go version -m [CLI] build -tags=fips140v1.0 - build DefaultGODEBUG=fips140=on + build DefaultGODEBUG=fips140=on,tracebacklabels=0,x509sslcertoverrideplatform=0 build GOFIPS140=v1.0.0-c2097c7c diff --git a/acceptance/pipelines/deploy/force-lock/output.txt b/acceptance/pipelines/deploy/force-lock/output.txt index 2f538e14332..c90ebfe56e3 100644 --- a/acceptance/pipelines/deploy/force-lock/output.txt +++ b/acceptance/pipelines/deploy/force-lock/output.txt @@ -1,5 +1,6 @@ === upload lock file + >>> [CLI] workspace import /Workspace/Users/[USERNAME]/.bundle/test-pipeline-force-lock/default/state/deploy.lock --format AUTO --file ./deploy.lock === test deployment without force-lock (should fail) diff --git a/acceptance/pipelines/deploy/var-flag/output.txt b/acceptance/pipelines/deploy/var-flag/output.txt index 7346a2e3b22..89dec342f72 100644 --- a/acceptance/pipelines/deploy/var-flag/output.txt +++ b/acceptance/pipelines/deploy/var-flag/output.txt @@ -8,6 +8,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged View your pipeline foo here: [DATABRICKS_URL]/pipelines/[UUID]?w=[NUMID] === Verify: Check that variables were substituted correctly + >>> [CLI] pipelines get [UUID] { "catalog": "custom_catalog", diff --git a/acceptance/pipelines/destroy/destroy-pipeline-cascade-state-divergence/output.txt b/acceptance/pipelines/destroy/destroy-pipeline-cascade-state-divergence/output.txt index c2d79364e2a..ebc8aa8af54 100644 --- a/acceptance/pipelines/destroy/destroy-pipeline-cascade-state-divergence/output.txt +++ b/acceptance/pipelines/destroy/destroy-pipeline-cascade-state-divergence/output.txt @@ -23,6 +23,7 @@ View your pipeline my_pipeline here: [DATABRICKS_URL]/pipelines/[UUID]?w=[NUMID] } === Edit cascade_on_destroy true -> false in YAML WITHOUT deploying (config diverges from state) + === Destroy: banner and DELETE both reflect STATE (cascade=true), not the edited YAML >>> [CLI] pipelines destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/pipelines/destroy/destroy-pipeline-cascade/output.txt b/acceptance/pipelines/destroy/destroy-pipeline-cascade/output.txt index 1dea2437f20..0d0e98030d0 100644 --- a/acceptance/pipelines/destroy/destroy-pipeline-cascade/output.txt +++ b/acceptance/pipelines/destroy/destroy-pipeline-cascade/output.txt @@ -23,6 +23,7 @@ View your pipeline my_pipeline here: [DATABRICKS_URL]/pipelines/[UUID]?w=[NUMID] } === Change only cascade_on_destroy (false -> true): expect a state-only update, no pipeline update API call + >>> [CLI] pipelines deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-pipeline-destroy-cascade/default/files... Updated pipelines.my_pipeline @@ -33,6 +34,7 @@ View your pipeline my_pipeline here: [DATABRICKS_URL]/pipelines/[UUID]?w=[NUMID] >>> print_requests.py //api/2.0/pipelines === Set cascade_on_destroy back to false and deploy so state reflects it before destroy + >>> [CLI] pipelines deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-pipeline-destroy-cascade/default/files... Updated pipelines.my_pipeline @@ -43,6 +45,7 @@ View your pipeline my_pipeline here: [DATABRICKS_URL]/pipelines/[UUID]?w=[NUMID] >>> print_requests.py //api/2.0/pipelines === Unset cascade_on_destroy entirely: expect a state-only update that persists nil to state + >>> [CLI] pipelines deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-pipeline-destroy-cascade/default/files... Updated pipelines.my_pipeline diff --git a/acceptance/pipelines/e2e/output.txt b/acceptance/pipelines/e2e/output.txt index e72dbfeb1fb..9d6d43bed59 100644 --- a/acceptance/pipelines/e2e/output.txt +++ b/acceptance/pipelines/e2e/output.txt @@ -1,5 +1,6 @@ === E2E Test: Complete pipeline lifecycle (init, deploy, run, stop, destroy) + === Initialize pipeline project >>> [CLI] pipelines init --output-dir output Welcome to the template for Lakeflow Spark Declarative Pipelines! @@ -15,6 +16,7 @@ Note that [DATABRICKS_URL] is used for initialization Please refer to the README.md file for "getting started" instructions. === Deploy pipeline + >>> [CLI] pipelines deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lakeflow_project/dev/files... Created jobs.sample_job @@ -40,6 +42,7 @@ Pipeline configurations for this update: • All tables are refreshed === Edit project by creating and running a new second pipeline + >>> [CLI] pipelines deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/lakeflow_project/dev/files... Created pipelines.lakeflow_project_etl_2 @@ -50,6 +53,7 @@ View your pipeline lakeflow_project_etl here: [DATABRICKS_URL]/pipelines/[UUID]? View your pipeline lakeflow_project_etl_2 here: [DATABRICKS_URL]/pipelines/[UUID]?w=[NUMID] === Assert the second pipeline is created + >>> [CLI] pipelines get [UUID] { "creator_user_name": "[USERNAME]", diff --git a/acceptance/pipelines/show/basic/output.txt b/acceptance/pipelines/show/basic/output.txt index 87fe70aeeee..7b7da015e0b 100644 --- a/acceptance/pipelines/show/basic/output.txt +++ b/acceptance/pipelines/show/basic/output.txt @@ -1,6 +1,5 @@ === table output - >>> [CLI] pipelines show main.default.people id name -- ----- @@ -10,7 +9,6 @@ id name 2 rows === json output - >>> [CLI] pipelines show main.default.people --output json [ { @@ -24,12 +22,10 @@ id name ] === invalid table name - >>> [CLI] pipelines show people Error: invalid table name "people": expected catalog.schema.table (Unity Catalog) or schema.table (legacy Hive metastore) === wire SQL pins quoting and default limit - >>> print_requests.py //api/2.0/sql/statements { "method": "POST", diff --git a/acceptance/pipelines/show/basic/script b/acceptance/pipelines/show/basic/script index 04f40545d6c..41340202b9e 100644 --- a/acceptance/pipelines/show/basic/script +++ b/acceptance/pipelines/show/basic/script @@ -1,11 +1,11 @@ -title "table output\n" +title "table output" trace $CLI pipelines show main.default.people -title "json output\n" +title "json output" trace $CLI pipelines show main.default.people --output json -title "invalid table name\n" +title "invalid table name" musterr trace $CLI pipelines show people -title "wire SQL pins quoting and default limit\n" +title "wire SQL pins quoting and default limit" trace print_requests.py //api/2.0/sql/statements diff --git a/acceptance/pipelines/show/rendering/output.txt b/acceptance/pipelines/show/rendering/output.txt index 499332abbba..8781cb257a0 100644 --- a/acceptance/pipelines/show/rendering/output.txt +++ b/acceptance/pipelines/show/rendering/output.txt @@ -1,6 +1,5 @@ === table output: long note truncated, ragged row blank cell - >>> [CLI] pipelines show main.default.people name id note ----- -- ---------------------------------------- @@ -10,7 +9,6 @@ bob 2 2 rows === json output: column order preserved, ragged row padded with null - >>> [CLI] pipelines show main.default.people --output json [ { diff --git a/acceptance/pipelines/show/rendering/script b/acceptance/pipelines/show/rendering/script index 5ae4498b154..96d6c76a6c2 100644 --- a/acceptance/pipelines/show/rendering/script +++ b/acceptance/pipelines/show/rendering/script @@ -1,5 +1,5 @@ -title "table output: long note truncated, ragged row blank cell\n" +title "table output: long note truncated, ragged row blank cell" trace $CLI pipelines show main.default.people -title "json output: column order preserved, ragged row padded with null\n" +title "json output: column order preserved, ragged row padded with null" trace $CLI pipelines show main.default.people --output json diff --git a/acceptance/script.prepare b/acceptance/script.prepare index a53627b231d..810db9df2cc 100644 --- a/acceptance/script.prepare +++ b/acceptance/script.prepare @@ -4,6 +4,11 @@ # or override this in their own script.prepare or script. export DATABRICKS_AUTH_STORAGE=plaintext +# Set by `title`, consumed and cleared by `trace`, to suppress the blank line +# that `trace` otherwise prints before a command when it directly follows a +# section header. +_after_title="" + errcode() { # Temporarily disable 'set -e' to prevent the script from exiting on error set +e @@ -32,7 +37,15 @@ musterr() { } trace() { - >&2 printf "\n>>> %s\n" "$*" + # A section header printed by `title` already ends with a newline, so a + # `trace` immediately following it must not add another blank line. Any + # other preceding command block still gets the usual leading separator. + if [[ -n "$_after_title" ]]; then + >&2 printf ">>> %s\n" "$*" + else + >&2 printf "\n>>> %s\n" "$*" + fi + _after_title="" if [[ "$1" == *"="* ]]; then # If the first argument contains '=', collect all env vars @@ -70,7 +83,10 @@ git-repo-init() { title() { local label="$1" - printf "\n=== %b" "$label" + printf "\n=== %b\n" "$label" + # Mark that the last thing printed was a section header so the next `trace` + # can skip its leading blank line (see trace above). + _after_title=1 } withdir() { @@ -181,3 +197,15 @@ readplanarg() { printf "" fi } + +# Clear _after_title before any top-level command other than a `trace` (possibly +# wrapped in errcode/musterr), so that only a `trace` *immediately* following a +# `title` drops its leading blank line; a `trace` after intervening output still +# gets its usual separator. The main script runs in a subshell (see +# readMergedScriptContents in acceptance_test.go), so `set -T` is required for the +# DEBUG trap to be inherited there. The `FUNCNAME` guard restricts clearing to the +# script's top level, so the trap never interferes with the helpers' own internals +# (where it would otherwise clear the flag before `trace` reads it). bash preserves +# $? across the trap. +set -T +trap '[[ -z "${FUNCNAME:-}" ]] && { case "$BASH_COMMAND" in trace\ *|errcode\ trace\ *|musterr\ trace\ *) ;; *) _after_title="" ;; esac; }' DEBUG diff --git a/acceptance/selftest/record_cloud/pipeline-crud/script b/acceptance/selftest/record_cloud/pipeline-crud/script index 4e6ada990d8..cb85f035483 100644 --- a/acceptance/selftest/record_cloud/pipeline-crud/script +++ b/acceptance/selftest/record_cloud/pipeline-crud/script @@ -6,7 +6,6 @@ print_requests() { # Verify that the entire crud lifecycle of a pipeline works. title "Create a pipeline" export pipeline_id=$($CLI pipelines create --json @pipeline1.json | jq -r .pipeline_id) -echo "" trace print_requests diff --git a/acceptance/selftest/selection/output.txt b/acceptance/selftest/selection/output.txt index 7e2c55b1c1d..4629ea71312 100644 --- a/acceptance/selftest/selection/output.txt +++ b/acceptance/selftest/selection/output.txt @@ -1,32 +1,27 @@ === Changing a test - >>> selection M:acceptance/selftest/basic/script Selected 1 changed tests (limit=50, 0 not selected) 5 ^selftest$/^basic$ === Adding a test - >>> selection A:acceptance/selftest/basic/script Selected 1 changed tests (limit=50, 0 not selected) 10 ^selftest$/^basic$ === A regenerated golden scores below a changed fixture - >>> selection M:acceptance/selftest/basic/output.txt M:acceptance/selftest/diff/script Selected 2 changed tests (limit=50, 0 not selected) 5 ^selftest$/^diff$ 1 ^selftest$/^basic$ === Moving a test scores lowest - >>> selection R100:acceptance/selftest/old/script:acceptance/selftest/basic/script M:acceptance/selftest/diff/script Selected 2 changed tests (limit=50, 0 not selected) 5 ^selftest$/^diff$ 1 ^selftest$/^basic$ === Touching an invariant config runs every invariant test, for that config only - >>> selection M:acceptance/bundle/invariant/configs/job.yml.tmpl Selected 6 changed tests (limit=50, 0 not selected) 5 ^bundle$/^invariant$/^auto-migrate$/^DMS=$/^INPUT_CONFIG=job\.yml\.tmpl$ @@ -38,7 +33,6 @@ Selected 6 changed tests (limit=50, 0 not selected) 5 ^bundle$/^invariant$/^no_drift$/^DMS=true$/^INPUT_CONFIG=job\.yml\.tmpl$ === Adding one invariant config and touching another: only the new variant is new - >>> selection A:acceptance/bundle/invariant/configs/pipeline.yml.tmpl M:acceptance/bundle/invariant/configs/job.yml.tmpl Selected 12 changed tests (limit=50, 0 not selected) 10 ^bundle$/^invariant$/^auto-migrate$/^DMS=$/^INPUT_CONFIG=pipeline\.yml\.tmpl$ @@ -57,7 +51,6 @@ Selected 12 changed tests (limit=50, 0 not selected) 5 ^bundle$/^invariant$/^no_drift$/^DMS=true$/^INPUT_CONFIG=job\.yml\.tmpl$ === A config an invariant test excludes does not select that test - >>> selection M:acceptance/bundle/invariant/configs/vector_search_index.yml.tmpl Selected 3 changed tests (limit=50, 0 not selected) 5 ^bundle$/^invariant$/^delete_idempotent$/^DMS=$/^INPUT_CONFIG=vector_search_index\.yml\.tmpl$ @@ -66,13 +59,11 @@ Selected 3 changed tests (limit=50, 0 not selected) 5 ^bundle$/^invariant$/^no_drift$/^DMS=true$/^INPUT_CONFIG=vector_search_index\.yml\.tmpl$ === Renaming a fixture out of a test selects the test that lost it - >>> selection R100:acceptance/selftest/basic/output.txt:docs/example.txt Selected 1 changed tests (limit=50, 0 not selected) 1 ^selftest$/^basic$ === The limit keeps the highest scoring tests - >>> selection -limit 3 A:acceptance/selftest/basic/script M:acceptance/selftest/diff/script M:acceptance/bundle/invariant/configs/job.yml.tmpl Selected 3 changed tests (limit=3, 5 not selected) 10 ^selftest$/^basic$ diff --git a/acceptance/selftest/selection/script b/acceptance/selftest/selection/script index 122f4f4c8bb..4d7fc146d47 100644 --- a/acceptance/selftest/selection/script +++ b/acceptance/selftest/selection/script @@ -6,31 +6,31 @@ selection() { # Each argument is a changed file: "M:" modified, "A:" added, "R100:old:new" moved. -title "Changing a test\n" +title "Changing a test" trace selection M:acceptance/selftest/basic/script -title "Adding a test\n" +title "Adding a test" trace selection A:acceptance/selftest/basic/script -title "A regenerated golden scores below a changed fixture\n" +title "A regenerated golden scores below a changed fixture" trace selection M:acceptance/selftest/basic/output.txt M:acceptance/selftest/diff/script -title "Moving a test scores lowest\n" +title "Moving a test scores lowest" trace selection R100:acceptance/selftest/old/script:acceptance/selftest/basic/script M:acceptance/selftest/diff/script -title "Touching an invariant config runs every invariant test, for that config only\n" +title "Touching an invariant config runs every invariant test, for that config only" trace selection M:acceptance/bundle/invariant/configs/job.yml.tmpl -title "Adding one invariant config and touching another: only the new variant is new\n" +title "Adding one invariant config and touching another: only the new variant is new" trace selection A:acceptance/bundle/invariant/configs/pipeline.yml.tmpl M:acceptance/bundle/invariant/configs/job.yml.tmpl -title "A config an invariant test excludes does not select that test\n" +title "A config an invariant test excludes does not select that test" # continue_293 pins an old CLI that has no Vector Search support, so it excludes this config; # selecting it would spend the limit on a test whose every variant is skipped. trace selection M:acceptance/bundle/invariant/configs/vector_search_index.yml.tmpl -title "Renaming a fixture out of a test selects the test that lost it\n" +title "Renaming a fixture out of a test selects the test that lost it" trace selection R100:acceptance/selftest/basic/output.txt:docs/example.txt -title "The limit keeps the highest scoring tests\n" +title "The limit keeps the highest scoring tests" trace selection -limit 3 A:acceptance/selftest/basic/script M:acceptance/selftest/diff/script M:acceptance/bundle/invariant/configs/job.yml.tmpl diff --git a/acceptance/ssh/bulk-transfer/script b/acceptance/ssh/bulk-transfer/script index c5b239407d5..b83ef909606 100644 --- a/acceptance/ssh/bulk-transfer/script +++ b/acceptance/ssh/bulk-transfer/script @@ -38,11 +38,11 @@ else CONNECT_FLAGS="--releases-dir=$PWD/releases --known-hosts-dir=known-hosts" fi -title "Download $PAYLOAD_BYTES bytes over the tunnel\n" +title "Download $PAYLOAD_BYTES bytes over the tunnel" errcode $CLI ssh connect $CONNECT_FLAGS -- "$payload_cmd" >received.bin 2>LOG.download echo "received $(wc -c sent.bin errcode $CLI ssh connect $CONNECT_FLAGS -- "wc -c" remote-count.txt 2>LOG.upload # The remote count is empty when the session ended before `wc` could report; say 0 rather than diff --git a/acceptance/ssh/connect-serverless-cpu/script b/acceptance/ssh/connect-serverless-cpu/script index 02b0068f3da..e498d340edf 100644 --- a/acceptance/ssh/connect-serverless-cpu/script +++ b/acceptance/ssh/connect-serverless-cpu/script @@ -1,6 +1,6 @@ if [ -n "${CLOUD_ENV:-}" ]; then # Cloud: real serverless CPU runs the command; dump the run on failure. - title "CLI ssh connect (serverless CPU)\n" + title "CLI ssh connect (serverless CPU)" errcode $CLI ssh connect --releases-dir=$CLI_RELEASES_DIR -- "echo 'Connection successful'" >out.stdout.txt 2>LOG.stderr if ! grep -q "Connection successful" out.stdout.txt; then run_id=$(cat LOG.stderr | grep -o "Job submitted successfully with run ID: [0-9]*" | grep -o "[0-9]*$") @@ -21,7 +21,7 @@ else touch releases/databricks_cli_linux_arm64.zip CLI_RELEASES_DIR="$PWD/releases" - title "CLI ssh connect (local sshd)\n" + title "CLI ssh connect (local sshd)" errcode $CLI ssh connect --releases-dir=$CLI_RELEASES_DIR --known-hosts-dir=known-hosts -- "echo 'Connection successful'" >out.stdout.txt 2>LOG.stderr trace print_requests.py //api/2.2/jobs/runs/submit fi diff --git a/acceptance/ssh/reconnect-reused-name/script b/acceptance/ssh/reconnect-reused-name/script index b07e4304746..83b671f2949 100644 --- a/acceptance/ssh/reconnect-reused-name/script +++ b/acceptance/ssh/reconnect-reused-name/script @@ -27,10 +27,10 @@ echo "reused-name ssh-ed25519 $STALE_KEY" >known-hosts/reused-name # The remote command's output is the assertion (see out.connect-*.txt); the tunnel's own # progress and teardown messages go to stderr, where the order of the last few lines # depends on which side closes the websocket first. -title "CLI ssh connect over a stale host key for the connection name\n" +title "CLI ssh connect over a stale host key for the connection name" errcode $CLI ssh connect --name reused-name --releases-dir=$CLI_RELEASES_DIR --known-hosts-dir=known-hosts -- "echo 'Connection successful'" >out.connect-1.txt 2>LOG.connect-1 -title "The stale key is replaced by the one the workspace published\n" +title "The stale key is replaced by the one the workspace published" if grep -q "$STALE_KEY" known-hosts/reused-name; then echo "stale key still pinned" else @@ -38,5 +38,5 @@ else fi trace grep -c "^reused-name ssh-" known-hosts/reused-name -title "Reconnecting to the running server keeps working\n" +title "Reconnecting to the running server keeps working" errcode $CLI ssh connect --name reused-name --releases-dir=$CLI_RELEASES_DIR --known-hosts-dir=known-hosts -- "echo 'Connection successful'" >out.connect-2.txt 2>LOG.connect-2 diff --git a/acceptance/ssh/setup/script b/acceptance/ssh/setup/script index a04c038ff3d..dc7a65d5d36 100644 --- a/acceptance/ssh/setup/script +++ b/acceptance/ssh/setup/script @@ -7,19 +7,19 @@ $CLI ssh setup --name=my-cluster --cluster=$TEST_DEFAULT_CLUSTER_ID --max-client # The ProxyCommand is the invocation that submits the SSH server job, so --max-clients and # --server-timeout have to appear there or `ssh my-cluster` silently starts a server with the # defaults. -title "ProxyCommand written by setup --max-clients=25 --server-timeout=48h\n" +title "ProxyCommand written by setup --max-clients=25 --server-timeout=48h" sed -n 's/.*\(ssh connect --proxy.*\)/\1/p' "$HOME/.databricks/ssh-tunnel-configs/my-cluster" # A shutdown delay longer than the default 24h lifetime worked before --server-timeout existed, # and `ssh setup` persisted it into the ProxyCommand. OpenSSH runs that ProxyCommand verbatim, so # the delay has to keep raising the lifetime rather than becoming an error the user cannot fix. -title "A shutdown delay beyond the default lifetime raises it, no --server-timeout needed\n" +title "A shutdown delay beyond the default lifetime raises it, no --server-timeout needed" $CLI ssh setup --name=long-delay --cluster=$TEST_DEFAULT_CLUSTER_ID --shutdown-delay=48h &>LOG.long-delay sed -n 's/.*\(ssh connect --proxy.*\)/\1/p' "$HOME/.databricks/ssh-tunnel-configs/long-delay" # Holding the job run open for detached processes is fixed at submission too, so a host # configured through setup can only ask for it here. -title "ProxyCommand written by setup --keep-detached-processes\n" +title "ProxyCommand written by setup --keep-detached-processes" $CLI ssh setup --name=keep-detached --cluster=$TEST_DEFAULT_CLUSTER_ID --keep-detached-processes &>LOG.keep-detached sed -n 's/.*\(ssh connect --proxy.*\)/\1/p' "$HOME/.databricks/ssh-tunnel-configs/keep-detached" @@ -29,5 +29,5 @@ musterr trace $CLI ssh setup --name=broken --cluster=$TEST_DEFAULT_CLUSTER_ID -- title "Rejects a shutdown delay the server can never reach" musterr trace $CLI ssh setup --name=broken --cluster=$TEST_DEFAULT_CLUSTER_ID --shutdown-delay=48h --server-timeout=24h -title "No host config is written for the rejected setups\n" +title "No host config is written for the rejected setups" find.py 'ssh-tunnel-configs' --expect 3 diff --git a/acceptance/workspace/repos/create_with_provider/output.txt b/acceptance/workspace/repos/create_with_provider/output.txt index ad4824ca645..88cee683136 100644 --- a/acceptance/workspace/repos/create_with_provider/output.txt +++ b/acceptance/workspace/repos/create_with_provider/output.txt @@ -2,6 +2,7 @@ >>> [CLI] repos create https://github.com/databricks/databricks-empty-ide-project.git gitHub --path /Repos/me@databricks.com/test-repo === Get by id should work + >>> [CLI] repos get [NUMID] -o json { "branch": "main", @@ -13,6 +14,7 @@ } === Get by path should work + >>> [CLI] repos get /Repos/me@databricks.com/test-repo -o json { "branch": "main", @@ -24,6 +26,7 @@ } === Delete by id should work + >>> [CLI] repos delete [NUMID] >>> print_requests.py --get //repos //workspace/get-status diff --git a/acceptance/workspace/repos/git_cli_folder/output.txt b/acceptance/workspace/repos/git_cli_folder/output.txt index 956b55259d0..71cd271ad6e 100644 --- a/acceptance/workspace/repos/git_cli_folder/output.txt +++ b/acceptance/workspace/repos/git_cli_folder/output.txt @@ -3,6 +3,7 @@ [NUMID] === Get by path resolves a Git CLI folder + >>> [CLI] repos get /Workspace/Users/me@databricks.com/test-repo -o json { "branch": "main", @@ -14,9 +15,11 @@ } === Update by path resolves a Git CLI folder + >>> [CLI] repos update /Workspace/Users/me@databricks.com/test-repo --branch update-by-path === Delete by path resolves a Git CLI folder + >>> [CLI] repos delete /Workspace/Users/me@databricks.com/test-repo >>> print_requests.py --get //repos //workspace/get-status