Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
36a493c
Add `databricks feedback` command
simonfaltum Nov 17, 2026
18318ee
Link the feedback changelog entry to its PR
simonfaltum Nov 17, 2026
d6cb2af
Exclude `feedback` from the count fuzz of generated commands
simonfaltum Nov 17, 2026
abccd59
Check feedback input before authenticating and show all sent fields
simonfaltum Nov 17, 2026
193a4cf
Merge remote-tracking branch 'origin/main' into feedback-command
simonfaltum Nov 17, 2026
3d978f7
Refuse unapproved agent feedback before authenticating
simonfaltum Nov 17, 2026
b2fe980
Escape hidden Unicode in the feedback prompt and require visible text
simonfaltum Nov 17, 2026
e5a2f40
Exit non-zero when the user declines agent feedback
simonfaltum Nov 17, 2026
a15b53b
Merge remote-tracking branch 'origin/main' into feedback-command
simonfaltum Nov 17, 2026
e9c6366
Fix the feedback test on Windows and explain an unquoted message
simonfaltum Nov 17, 2026
73781ba
Point at an unquoted --command and show the workspace in the prompt
simonfaltum Nov 17, 2026
0fca192
Say what to quote instead of printing a command to paste
simonfaltum Nov 17, 2026
128e8fb
Say when feedback was definitely not sent
simonfaltum Nov 17, 2026
2177e5f
Merge remote-tracking branch 'origin/main' into feedback-command
simonfaltum Nov 17, 2026
bfe01ad
Route --command by its first word instead of building the command tree
simonfaltum Nov 17, 2026
4c0c9fd
Check --command against the top-level commands and command-name chara…
simonfaltum Nov 17, 2026
d0b1d43
Report feedback that never left as not sent
simonfaltum Nov 17, 2026
2092b57
Ask for approval only when stderr shows the prompt
simonfaltum Nov 17, 2026
f396f85
Report feedback that failed before connecting as not sent
simonfaltum Nov 17, 2026
61214bf
Limit --command to 200 characters
simonfaltum Nov 17, 2026
f9899f0
Keep the not-accepted error internal to telemetry
simonfaltum Nov 17, 2026
19591b3
Keep the not-sent test off the host metadata lookup
simonfaltum Nov 17, 2026
66f0fa6
Stop checking --command against the top-level commands
simonfaltum Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nextchanges/cli/feedback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Add the `databricks feedback` command to send feedback about the CLI to Databricks. ([#7724](https://github.com/databricks/cli/pull/7724))
10 changes: 10 additions & 0 deletions acceptance/cmd/feedback/broken-bundle/databricks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bundle:
name: broken-bundle

# Two targets both marked default is an invalid bundle. Feedback does not use
# the bundle, so this error must not stop it.
targets:
dev:
default: true
dev2:
default: true
1 change: 1 addition & 0 deletions acceptance/cmd/feedback/out.test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cloud = false
232 changes: 232 additions & 0 deletions acceptance/cmd/feedback/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@

=== Feedback about a product command is routed to its team

>>> [CLI] feedback --command air run --run-id 123 --can-be-contacted logs omitted the failure reason
Thank you! Your feedback was sent. Reference: [UUID][0]

>>> print_requests.py //telemetry-ext
{
"frontend_log_event_id": "[UUID][0]",
"entry": {
"fast_feedback_log": {
"reference_event_id": "[UUID][1]",
"parent_ui": "ModelTraining.AIRuntime",
"origin": "air_run",
"can_be_contacted": true,
"ui_versions": "cli:[CLI_VERSION]",
"user_agent": "cli/[CLI_VERSION] cmd/feedback run-id/123",
"text": "logs omitted the failure reason"
}
}
}

=== A command group, with a JSON receipt

>>> [CLI] feedback --command bundle deploy should print which resources changed -o json
{
"received": true,
"feedback_id": "[UUID][2]"
}

>>> print_requests.py //telemetry-ext
{
"frontend_log_event_id": "[UUID][2]",
"entry": {
"fast_feedback_log": {
"reference_event_id": "[UUID][3]",
"parent_ui": "DeveloperEcosystem.CoreDabs",
"origin": "bundle",
"can_be_contacted": false,
"ui_versions": "cli:[CLI_VERSION]",
"user_agent": "cli/[CLI_VERSION] cmd/feedback",
"text": "deploy should print which resources changed"
}
}
}

=== Feedback can name a nested command

>>> [CLI] feedback --command bundle deploy deploy is slow
Thank you! Your feedback was sent. Reference: [UUID][4]

>>> print_requests.py //telemetry-ext
{
"frontend_log_event_id": "[UUID][4]",
"entry": {
"fast_feedback_log": {
"reference_event_id": "[UUID][5]",
"parent_ui": "DeveloperEcosystem.CoreDabs",
"origin": "bundle_deploy",
"can_be_contacted": false,
"ui_versions": "cli:[CLI_VERSION]",
"user_agent": "cli/[CLI_VERSION] cmd/feedback",
"text": "deploy is slow"
}
}
}

=== A command without a product team goes to the CLI team

>>> [CLI] feedback --command no-such-command hello
Thank you! Your feedback was sent. Reference: [UUID][6]

>>> print_requests.py //telemetry-ext
{
"frontend_log_event_id": "[UUID][6]",
"entry": {
"fast_feedback_log": {
"reference_event_id": "[UUID][7]",
"parent_ui": "DeveloperEcosystem.DatabricksCLI",
"origin": "no-such-command",
"can_be_contacted": false,
"ui_versions": "cli:[CLI_VERSION]",
"user_agent": "cli/[CLI_VERSION] cmd/feedback",
"text": "hello"
}
}
}

=== Validation errors send nothing

>>> [CLI] feedback
Error: feedback message must contain 1 to 10000 characters, including a visible one

>>> [CLI] feedback
Error: accepts 1 arg(s), received 0

Usage:
databricks feedback MESSAGE [flags]

Examples:
databricks feedback --command "bundle deploy" "deploy should print which resources changed"
databricks feedback --command "air run" --run-id 123 "logs omitted the failure reason"

Flags:
--can-be-contacted[=true|false] Allow Databricks to contact you about this feedback
--command string CLI command the feedback is about, for example "bundle deploy"
-h, --help[=true|false] help for feedback
--run-id string ID of the job run the feedback is about
-y, --yes[=true|false] Confirm sending feedback written by an AI agent

Global Flags:
--debug[=true|false] enable debug logging
-o, --output type output type: text or json (default text)
-p, --profile string ~/.databrickscfg profile
-t, --target string bundle target to use (if applicable)


>>> [CLI] feedback deploy is slow
Error: the message must be one argument, but received 3; put quotes around the whole message, and around --command if it has several words

>>> [CLI] feedback --command bundle deploy deploy is slow
Error: the message must be one argument, but received 2; put quotes around the whole message, and around --command if it has several words

>>> [CLI] feedback --command bundle deploy -t dev hello
Error: invalid --command "bundle deploy -t dev"; it takes a command path such as "bundle deploy", without the databricks prefix, flags or arguments

>>> [CLI] feedback --run-id abc hello
Error: --run-id must be a positive job run ID

>>> [CLI] feedback --target dev hello
Error: --target selects a bundle target, which feedback does not use; use --profile to choose the workspace

=== Input errors are reported before authenticating

>>> env -u DATABRICKS_HOST -u DATABRICKS_TOKEN [CLI] feedback
Error: feedback message must contain 1 to 10000 characters, including a visible one

>>> env -u DATABRICKS_HOST -u DATABRICKS_TOKEN AGENT=test-agent [CLI] feedback hello
Error: feedback from an AI agent must be confirmed by the user; run with --yes once the user approves the message

Note for AI agents (test-agent): show the user the exact feedback message and the flags you pass with it, such as --can-be-contacted, and pass --yes only after the user approves sending it

=== General CLI feedback

>>> [CLI] feedback the CLI should support ...
Thank you! Your feedback was sent. Reference: [UUID][8]

>>> print_requests.py //telemetry-ext
{
"frontend_log_event_id": "[UUID][8]",
"entry": {
"fast_feedback_log": {
"reference_event_id": "[UUID][9]",
"parent_ui": "DeveloperEcosystem.DatabricksCLI",
"origin": "cli",
"can_be_contacted": false,
"ui_versions": "cli:[CLI_VERSION]",
"user_agent": "cli/[CLI_VERSION] cmd/feedback",
"text": "the CLI should support ..."
}
}
}

=== An AI agent needs the user's confirmation

>>> AGENT=test-agent [CLI] feedback hello
Error: feedback from an AI agent must be confirmed by the user; run with --yes once the user approves the message

Note for AI agents (test-agent): show the user the exact feedback message and the flags you pass with it, such as --can-be-contacted, and pass --yes only after the user approves sending it

=== An AI agent with --yes

>>> AGENT=test-agent [CLI] feedback --yes hello
Thank you! Your feedback was sent. Reference: [UUID][10]

>>> print_requests.py //telemetry-ext
{
"frontend_log_event_id": "[UUID][10]",
"entry": {
"fast_feedback_log": {
"reference_event_id": "[UUID][11]",
"parent_ui": "DeveloperEcosystem.DatabricksCLI",
"origin": "cli",
"can_be_contacted": false,
"ui_versions": "cli:[CLI_VERSION]",
"user_agent": "cli/[CLI_VERSION] cmd/feedback agent/test-agent",
"text": "hello"
}
}
}

=== Feedback is sent even with telemetry disabled

>>> DATABRICKS_CLI_DISABLE_TELEMETRY=1 [CLI] feedback telemetry is disabled
Thank you! Your feedback was sent. Reference: [UUID][12]

>>> print_requests.py //telemetry-ext
{
"frontend_log_event_id": "[UUID][12]",
"entry": {
"fast_feedback_log": {
"reference_event_id": "[UUID][13]",
"parent_ui": "DeveloperEcosystem.DatabricksCLI",
"origin": "cli",
"can_be_contacted": false,
"ui_versions": "cli:[CLI_VERSION]",
"user_agent": "cli/[CLI_VERSION] cmd/feedback",
"text": "telemetry is disabled"
}
}
}

=== A broken bundle does not block feedback

>>> withdir broken-bundle [CLI] feedback bundle config does not block feedback
Thank you! Your feedback was sent. Reference: [UUID][14]

>>> print_requests.py //telemetry-ext
{
"frontend_log_event_id": "[UUID][14]",
"entry": {
"fast_feedback_log": {
"reference_event_id": "[UUID][15]",
"parent_ui": "DeveloperEcosystem.DatabricksCLI",
"origin": "cli",
"can_be_contacted": false,
"ui_versions": "cli:[CLI_VERSION]",
"user_agent": "cli/[CLI_VERSION] cmd/feedback",
"text": "bundle config does not block feedback"
}
}
}
54 changes: 54 additions & 0 deletions acceptance/cmd/feedback/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Print the feedback event, keeping only user agent entries that carry feedback
# context; the rest depend on the runner.
print_feedback() {
trace print_requests.py //telemetry-ext | jq '.body.protoLogs[] | fromjson
| .entry.fast_feedback_log.user_agent |= (split(" ") | map(select(test("^(cli|cmd|run-id|agent)/"))) | join(" "))'
}

title "Feedback about a product command is routed to its team"
trace $CLI feedback --command "air run" --run-id 123 --can-be-contacted " logs omitted the failure reason "
print_feedback

title "A command group, with a JSON receipt"
trace $CLI feedback --command bundle "deploy should print which resources changed" -o json
print_feedback

title "Feedback can name a nested command"
trace $CLI feedback --command "bundle deploy" "deploy is slow"
print_feedback

title "A command without a product team goes to the CLI team"
trace $CLI feedback --command "no-such-command" "hello"
print_feedback

title "Validation errors send nothing"
musterr trace $CLI feedback " "
musterr trace $CLI feedback
musterr trace $CLI feedback deploy is slow
musterr trace $CLI feedback --command bundle deploy "deploy is slow"
musterr trace $CLI feedback --command "bundle deploy -t dev" "hello"
musterr trace $CLI feedback --run-id abc "hello"
musterr trace $CLI feedback --target dev "hello"

title "Input errors are reported before authenticating"
musterr trace env -u DATABRICKS_HOST -u DATABRICKS_TOKEN $CLI feedback " "
musterr trace env -u DATABRICKS_HOST -u DATABRICKS_TOKEN AGENT=test-agent $CLI feedback "hello"

title "General CLI feedback"
trace $CLI feedback "the CLI should support ..."
print_feedback

title "An AI agent needs the user's confirmation"
musterr trace AGENT=test-agent $CLI feedback "hello"

title "An AI agent with --yes"
trace AGENT=test-agent $CLI feedback --yes "hello"
print_feedback

title "Feedback is sent even with telemetry disabled"
trace DATABRICKS_CLI_DISABLE_TELEMETRY=1 $CLI feedback "telemetry is disabled"
print_feedback

title "A broken bundle does not block feedback"
trace withdir broken-bundle $CLI feedback "bundle config does not block feedback"
print_feedback
1 change: 1 addition & 0 deletions acceptance/cmd/feedback/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RecordRequests = true
1 change: 1 addition & 0 deletions acceptance/help/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ Domains
Developer Tools
air Run and manage AI Runtime workloads on serverless GPU compute
bundle Declarative Automation Bundles let you express data/AI/analytics projects as code.
feedback Send feedback about the Databricks CLI to Databricks
sandbox *Beta* Manage Databricks Sandbox environments
sync Synchronize a local directory to a workspace directory

Expand Down
2 changes: 2 additions & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/databricks/cli/cmd/completion"
"github.com/databricks/cli/cmd/configure"
"github.com/databricks/cli/cmd/experimental"
"github.com/databricks/cli/cmd/feedback"
"github.com/databricks/cli/cmd/fs"
"github.com/databricks/cli/cmd/labs"
"github.com/databricks/cli/cmd/pipelines"
Expand Down Expand Up @@ -102,6 +103,7 @@ func topLevelSpecs() []root.CommandSpec {
bundle.Spec,
cache.Spec,
experimental.Spec,
feedback.Spec,
psql.Spec,
configure.Spec,
fs.Spec,
Expand Down
Loading
Loading