Skip to content

Add databricks feedback command - #7724

Draft
simonfaltum wants to merge 7 commits into
mainfrom
feedback-command
Draft

simonfaltum wants to merge 7 commits into
mainfrom
feedback-command

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Changes

Users, and agents acting for them, can't report a CLI problem from the CLI. This adds databricks feedback [--command "<command>"] MESSAGE, which sends the message to Databricks from the authenticated workspace. It supersedes #7567 and keeps its behavior.

  • --command must name a real command. Its top-level group picks the owning team: air goes to ModelTraining.AIRuntime, bundle to DeveloperEcosystem.CoreDabs, anything else to DeveloperEcosystem.DatabricksCLI.
  • Each submission is one fast_feedback_log event (the in-product feedback widget's) posted to /telemetry-ext, using existing fields only; the agent and --run-id ride in the user agent.
  • A detected AI agent needs the user to approve at a prompt, or --yes without a terminal. The prompt shows the message, with invisible characters escaped, and every choice sent with it. Humans are not prompted.
  • The message, flags and approval are checked before authenticating. --target is rejected, because the bundle is never loaded.
  • One upload attempt with SDK retries off, bounded by 30 s including any token refresh. Success prints a reference ID (JSON with -o json).
  • Feedback is sent even with DATABRICKS_CLI_DISABLE_TELEMETRY set; the help says so.
  • CommandSpec.NeedsFullTree builds the whole tree before a command runs; only feedback sets it. root.CommandString is exported for origin, and DatabricksCliLog is tagged omitzero so a feedback entry carries only fast_feedback_log (existing events always set it).

Why

Feedback text is retained centrally, so an agent's text is sent only after the user approves it. A retry after an ambiguous failure could file the feedback twice, so the command makes one attempt and reports the ID on failure. Because commands are built lazily, a running command can't otherwise resolve bundle deploy past bundle.

Decisions to review

  • Declining the prompt prints "Feedback not sent." and exits 0. Should it exit non-zero so an agent can tell it from a send?
  • NeedsFullTree over resolving one path on demand: the full build costs about 4 ms, only on feedback, and running commands still can't call into the tree.
  • Text is user-authored, which telemetry normally never carries. That is the point of the event, and an agent's text needs the user's approval first.
  • The prompt needs only stdin to be a terminal (cmdio.IsInputTTY), so it also works with TERM=dumb and MSYS2 pipes.
  • feedback is exempt from the aitools install hint, like other one-shot commands.
  • The single-attempt client repeats the setup in cmd/air/validateconfig.go; sharing it would touch cmd/air and experimental/ssh.

Tests

  • acceptance/cmd/feedback: routing, the JSON receipt, agent refusal and --yes, input errors (including without a login), telemetry disabled, and a broken bundle.
  • TestSendMakesOneAttempt: one request each for success, numProtoSuccess: 0, HTTP 500, HTTP 503 and a TCP reset. TestSendTimeoutBoundsTokenAcquisition: a blocked token source stops at the deadline.
  • Unit tests cover input checks, approval with NO_COLOR and TERM=dumb, and escaping. The full unit and acceptance suites, ./task lint and ./task checks pass locally.
  • Not tested: a submission to a real workspace. The acceptance test stays local because a cloud run would file real feedback on every CI run.

This pull request and its description were written by Isaac.

Adds a CLI-wide command that sends feedback as a fast_feedback_log event
to /telemetry-ext of the authenticated workspace. --command names the
command the feedback is about and selects the owning component; the agent
and run ID ride in the standard user agent. Feedback written by a detected
AI agent requires the user's confirmation.

The upload is a single, bounded attempt so ambiguous failures never file
the same feedback twice. Commands can opt into building the full command
tree so that --command resolves nested commands.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the aitools AI tools (databricks aitools) related changes label Nov 17, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 3d978f722 | Workflow run

Regression test report

Selected 2 changed tests (limit=20, 0 not selected)

2 tests: regression=2 unreleased=0 coverage=0 failing=0
test branch main (bdc5f0e) latest (v1.26.0)
TestAccept/cmd/feedback ✅ ❌ ❌
TestAccept/help ✅ ❌ ❌
TestAccept/cmd/feedback: branch ✅ | main (bdc5f0e) ❌ | latest (v1.26.0) ❌

main (bdc5f0e):

acceptance_test.go:1380: Diff:
        --- cmd/feedback/output.txt
        +++ /tmp/TestAcceptcmdfeedback4214828145/002/output.txt
        @@ -2,202 +2,6 @@
         === 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]
        +Error: unknown command "feedback" for "databricks"
         
        ->>> 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"
        -    }
        -  }
        -}
        -
        -=== Validation errors send nothing
        -
        ->>> [CLI] feedback    
        -Error: feedback message must contain 1 to 10000 characters
        -
        ->>> [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 --command no-such-command hello
        -Error: unknown command "no-such-command"; --command takes a command path such as "bundle deploy", without the databricks prefix, flags or arguments
        -
        ->>> [CLI] feedback --command bundle no-such-command hello
        -Error: unknown command "bundle no-such-command"; --command 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
        -
        -=== General CLI feedback
        -
        ->>> [CLI] feedback the CLI should support ...
        -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": "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 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][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 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][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",
        -      "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][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",
... (10 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.26.0):

acceptance_test.go:1380: Diff:
        --- cmd/feedback/output.txt
        +++ /tmp/TestAcceptcmdfeedback1127424179/002/output.txt
        @@ -2,202 +2,6 @@
         === 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]
        +Error: unknown command "feedback" for "databricks"
         
        ->>> 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"
        -    }
        -  }
        -}
        -
        -=== Validation errors send nothing
        -
        ->>> [CLI] feedback    
        -Error: feedback message must contain 1 to 10000 characters
        -
        ->>> [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 --command no-such-command hello
        -Error: unknown command "no-such-command"; --command takes a command path such as "bundle deploy", without the databricks prefix, flags or arguments
        -
        ->>> [CLI] feedback --command bundle no-such-command hello
        -Error: unknown command "bundle no-such-command"; --command 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
        -
        -=== General CLI feedback
        -
        ->>> [CLI] feedback the CLI should support ...
        -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": "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 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][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 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][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",
        -      "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][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",
... (8 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/help: branch ✅ | main (bdc5f0e) ❌ | latest (v1.26.0) ❌

main (bdc5f0e):

acceptance_test.go:1380: Diff:
        --- help/output.txt
        +++ /tmp/TestAccepthelp3507564790/002/output.txt
        @@ -185,7 +185,6 @@
         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

latest (v1.26.0):

acceptance_test.go:1380: Diff:
        --- help/output.txt
        +++ /tmp/TestAccepthelp228412218/002/output.txt
        @@ -47,7 +47,6 @@
           ai-search                              *Public Preview* **AI Search Endpoint**: Represents the compute resources to host AI Search indexes.
         
         Identity and Access Management
        -  assume-group                           *Beta* Manage the workspace's restricted sharing groups.
           current-user                           *Public Preview* This API allows retrieving information about currently authenticated user or service principal.
           groups                                 Groups simplify identity management, making it easier to assign access to Databricks workspace, data, and other securable objects.
           groups-v2                              *Public Preview* Groups simplify identity management, making it easier to assign access to Databricks workspace, data, and other securable objects.
        @@ -67,7 +66,6 @@
           queries                                The queries API can be used to perform CRUD operations on queries.
           queries-legacy                         These endpoints are used for CRUD operations on query definitions.
           query-history                          A service responsible for storing and retrieving the list of queries run against SQL endpoints and serverless compute.
        -  statement-execution-v2                 *Public Preview* The Statement Execution API v2 can be used to execute SQL statements on a SQL warehouse and fetch the result.
           warehouses                             A SQL warehouse is a compute resource that lets you run SQL commands on data objects within Databricks SQL.
         
         AI/BI
        @@ -97,7 +95,7 @@
           rfa                                    *Public Preview* Request for Access enables users to request access for Unity Catalog securables.
           schemas                                A schema (also called a database) is the second layer of Unity Catalog’s three-level namespace.
           secrets-uc                             A secret is a Unity Catalog securable object that stores sensitive credential data (such as passwords, tokens, and keys) within a three-level namespace (**catalog_name.schema_name.secret_name**).
        -  software-artifacts                     *Public Preview* Manage software artifacts and their versions in Unity Catalog.
        +  software-artifacts                     *Beta* Manage software artifacts and their versions in Unity Catalog.
           storage-credentials                    A storage credential represents an authentication and authorization mechanism for accessing data stored on your cloud tenant.
           system-schemas                         *Public Preview* A system schema is a schema that lives within the system catalog.
           table-constraints                      Primary key and foreign key constraints encode relationships between fields in tables.
        @@ -180,12 +178,11 @@
           environments                           APIs to manage environment resources.
         
         Domains
        -  domains                                *Public Preview* Manage domains for organizing and discovering data assets.
        +  domains                                *Beta* Manage domains for organizing and discovering data assets.
         
         Developer Tools
        -  air                                    Run and manage AI Runtime workloads on serverless GPU compute
        +  air                                    *Public Preview* Run and manage AI Runtime training workloads
           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
         
        @@ -203,11 +197,11 @@
           version                                Retrieve information about the current version of this CLI
         
         Flags:
        -      --debug[=true|false]     enable debug logging
        -  -h, --help[=true|false]      help for databricks
        -  -o, --output type            output type: text or json (default text)
        -  -p, --profile string         ~/.databrickscfg profile
        -  -t, --target string          bundle target to use (if applicable)
        -  -v, --version[=true|false]   version for databricks
        +      --debug            enable debug logging
        +  -h, --help             help for databricks
        +  -o, --output type      output type: text or json (default text)
        +  -p, --profile string   ~/.databrickscfg profile
        +  -t, --target string    bundle target to use (if applicable)
        +  -v, --version          version for databricks
         
         Use "databricks [command] --help" for more information about a command.
        
FAIL

Comment thread cmd/root/command_spec.go

// NeedsFullTree builds every top-level command before running this command,
// for commands that resolve other command paths while they run.
NeedsFullTree bool

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: abccd59

Run: 44101216799

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 17 7:33
💚​ aws-windows-latest-4core-16gb 1 272 15 6:36
💚​ azure linux-2core-8gb 1 269 17 7:41
💚​ azure-windows-latest-4core-16gb 1 271 15 5:43
🔄​ gcp linux-2core-8gb 2 1 268 17 12:47
💚​ gcp-windows-latest-4core-16gb 1 272 15 5:57
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🔄​ TestSyncIncrementalFileSync ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
🔄​ TestSyncIncrementalSyncPythonNotebookDelete ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
Top 5 slowest tests (at least 2 minutes):
duration env testname
3:42 aws-windows-latest-4core-16gb TestAccept
3:27 azure-windows-latest-4core-16gb TestAccept
2:55 gcp-windows-latest-4core-16gb TestAccept
2:24 gcp linux-2core-8gb TestTelemetryEndpoint
2:20 gcp linux-2core-8gb TestImportDirDoesNotOverwrite

simonfaltum and others added 5 commits November 17, 2026 13:30
The fuzz calls RunE without the exec ID that cmd/root always sets, and is
meant for auto-generated commands; hand-written ones are listed in
manualRoots.

Co-authored-by: Isaac <no-reply@databricks.com>
Validate the message, --command and --run-id, and reject --target, before
the workspace client is created, so a mistake is not hidden behind a login
prompt or an auth error. --target is rejected because feedback never loads
the bundle.

The confirmation now shows every field the user approves: the message,
with control characters escaped so none can hide part of it, and the
command, run ID and contact opt-in. --run-id is sent in canonical form.

Co-authored-by: Isaac <no-reply@databricks.com>
An AI agent without --yes and without a terminal is now refused with the
other input checks, before the workspace client is created. The prompt
escapes every non-graphic character except newlines and tabs, so bidi
overrides and zero-width characters cannot reorder or hide the message.

Since main made prompts independent of NO_COLOR, the approval test no
longer asserts how cmdio decides that; it checks that the approval works
with NO_COLOR and TERM=dumb.

Tests now force a real TCP reset for the single-attempt case, and cover
sending with DATABRICKS_CLI_DISABLE_TELEMETRY set. The API client takes a
retries argument instead of two wrapper constructors.

Co-authored-by: Isaac <no-reply@databricks.com>
The prompt also escapes variation selectors and the other code points
Unicode marks as default ignorable, which terminals draw as nothing and
which can carry hidden text. A message made only of such characters is
rejected, so blank-looking feedback cannot be filed.

An acceptance case now checks that an agent without --yes is refused
before authenticating.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aitools AI tools (databricks aitools) related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants