Skip to content

Commit 01cd7e0

Browse files
Make sure warnings asking for approval are understood by agents (#5239)
## Changes This improves warnings like "current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed" for better understandability by agents. Right now there's risk they dismiss any warnings and proceed without human consent. ## Tests * Agentic validation * Acceptance tests
1 parent da3374c commit 01cd7e0

28 files changed

Lines changed: 111 additions & 32 deletions

File tree

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
### CLI
88

99
### Bundles
10+
* Make sure warnings asking for approval are understood by agents ([#5239](https://github.com/databricks/cli/pull/5239))
1011

1112
### Dependency updates

acceptance/bundle/deployment/bind/dashboard/recreation/output.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQU
1818
This action will result in the deletion or recreation of the following dashboards.
1919
This will result in changed IDs and permanent URLs of the dashboards that will be recreated:
2020
recreate resources.dashboards.dashboard1
21-
Error: the deployment requires destructive actions, but current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed
21+
Error: the deployment requires destructive actions, but the current console does not support prompting.
22+
Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
23+
To proceed, use --auto-approve after reviewing the plan above.
2224

2325

2426
Exit code: 1

acceptance/bundle/deployment/bind/job/job-abort-bind/output.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
Created job with ID: [JOB_ID]
44

55
=== Expect binding to fail without an auto-approve flag:
6-
Error: This bind operation requires user confirmation, but the current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed.
6+
Error: this bind operation requires user confirmation, but the current console does not support prompting.
7+
To proceed, use --auto-approve after reviewing the plan above.
8+
9+
10+
Exit code: 1
711

812
=== Deploy bundle:
913
>>> [CLI] bundle deploy --force-lock

acceptance/bundle/deployment/bind/job/job-abort-bind/script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ trap cleanup EXIT
3636

3737
title "Expect binding to fail without an auto-approve flag:\n"
3838
trace errcode $CLI bundle deployment bind foo $JOB_ID &> out.bind-result.txt
39-
grep "^Error:" out.bind-result.txt
39+
sed -n '/^Error:/,$p' out.bind-result.txt
4040
rm out.bind-result.txt
4141

4242
title "Deploy bundle:"

acceptance/bundle/deployment/bind/pipelines/recreate/out.bind-fail.direct.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ Changes detected:
1111
~ root_path: "/Workspace/Users/someuser@databricks.com/lakeflow_pipeline" -> null
1212
~ storage: "/Shared/old_storage" -> "/Shared/new_storage"
1313

14-
Error: This bind operation requires user confirmation, but the current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed.
14+
Error: this bind operation requires user confirmation, but the current console does not support prompting.
15+
To proceed, use --auto-approve after reviewing the plan above.
1516

acceptance/bundle/deployment/bind/pipelines/recreate/out.bind-fail.terraform.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ Terraform will perform the following actions:
5858
Plan: 1 to add, 0 to change, 1 to destroy.
5959

6060

61-
Error: This bind operation requires user confirmation, but the current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed.
61+
Error: this bind operation requires user confirmation, but the current console does not support prompting.
62+
To proceed, use --auto-approve after reviewing the plan above.
6263

acceptance/bundle/deployment/bind/pipelines/recreate/output.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ Streaming Tables (STs) and Materialized Views (MVs) managed by them. Recreating
1616
restore the defined STs and MVs through full refresh. Note that recreation is necessary when pipeline
1717
properties such as the 'catalog' or 'storage' are changed:
1818
recreate resources.pipelines.foo
19-
Error: the deployment requires destructive actions, but current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed
19+
Error: the deployment requires destructive actions, but the current console does not support prompting.
20+
Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
21+
To proceed, use --auto-approve after reviewing the plan above.
2022

2123

2224
>>> [CLI] bundle deploy --auto-approve

acceptance/bundle/deployment/bind/pipelines/update/out.bind-fail.direct.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ Changes detected:
1111
~ name: "lakeflow-pipeline" -> "test-pipeline"
1212
~ root_path: "/Workspace/Users/[USERNAME]/lakeflow_pipeline" -> null
1313

14-
Error: This bind operation requires user confirmation, but the current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed.
14+
Error: this bind operation requires user confirmation, but the current console does not support prompting.
15+
To proceed, use --auto-approve after reviewing the plan above.
1516

acceptance/bundle/deployment/bind/pipelines/update/out.bind-fail.terraform.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ Terraform will perform the following actions:
4343
Plan: 0 to add, 1 to change, 0 to destroy.
4444

4545

46-
Error: This bind operation requires user confirmation, but the current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed.
46+
Error: this bind operation requires user confirmation, but the current console does not support prompting.
47+
To proceed, use --auto-approve after reviewing the plan above.
4748

acceptance/bundle/resources/dashboards/detect-change/output.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ These modifications are untracked and will be overwritten on deploy.
6060
Make sure that the local dashboard definition matches what you intend to deploy
6161
before proceeding with the deployment.
6262

63-
Run `databricks bundle deploy --force` to bypass this error.
63+
To overwrite the remote changes with your local version, use --force.
64+
The remote modifications will be lost.
6465

6566
update dashboards.file_reference
6667

@@ -77,7 +78,8 @@ These modifications are untracked and will be overwritten on deploy.
7778
Make sure that the local dashboard definition matches what you intend to deploy
7879
before proceeding with the deployment.
7980

80-
Run `databricks bundle deploy --force` to bypass this error.
81+
To overwrite the remote changes with your local version, use --force.
82+
The remote modifications will be lost.
8183

8284

8385
>>> errcode [CLI] bundle deploy
@@ -91,7 +93,8 @@ These modifications are untracked and will be overwritten on deploy.
9193
Make sure that the local dashboard definition matches what you intend to deploy
9294
before proceeding with the deployment.
9395

94-
Run `databricks bundle deploy --force` to bypass this error.
96+
To overwrite the remote changes with your local version, use --force.
97+
The remote modifications will be lost.
9598

9699

97100
Exit code: 1

0 commit comments

Comments
 (0)