Skip to content

Add databricks feedback command - #7567

Draft
tedjt wants to merge 1 commit into
databricks:mainfrom
tedjt:feedback-command
Draft

tedjt wants to merge 1 commit into
databricks:mainfrom
tedjt:feedback-command

Conversation

@tedjt

@tedjt tedjt commented Nov 12, 2026 •

Copy link
Copy Markdown

Changes

Add databricks feedback [--command "<command>"] MESSAGE, a single CLI-wide command for sending feedback to Databricks. --command names the command the feedback is about. Its top-level command group decides where the feedback is filed:

  • --command "air ..." goes to ModelTraining.AIRuntime.
  • --command "bundle ..." goes to DeveloperEcosystem.CoreDabs.
  • Any other command, or no --command, goes to DeveloperEcosystem.DatabricksCLI.

Adding a product means adding one entry to productComponents. --command must name a real CLI command.

Each submission is one fast_feedback_log event sent to /telemetry-ext in the authenticated workspace. This is the event the in-product feedback widget records, and the change uses only the fields the schema has today:

Field Value
parent_ui ES component for the --command group (see above)
origin Command the feedback is about, e.g. air_run or bundle_deploy; cli for general feedback
reference_event_id Command execution ID, so triagers can find the matching requests in http_access_log
user_agent The standard CLI user agent: CLI version, OS, cmd/..., interactive/..., plus agent/<name> when an AI agent is detected and run-id/<id> when --run-id is set
ui_versions cli:<version>
can_be_contacted --can-be-contacted (default false)
text The message, 1 to 10,000 characters

Confirmation for AI agents. When an agent is detected (useragent.AgentProvider), the command asks the user to confirm. When no terminal is attached, it refuses unless --yes is passed, and the error includes a note telling the agent to show the user the exact message first. Feedback from a human is sent without a prompt.

Receipt. On success the command prints a reference ID, or {"received": true, "feedback_id": ...} with -o json. It makes one upload attempt with a 30s timeout and no retries, because a retry after an ambiguous failure could file the same feedback twice.

Supporting changes:

  • Adds telemetry.Send for a single, synchronous upload.
  • FrontendLogEntry.DatabricksCliLog is now tagged omitzero (it was omitempty, which has no effect on struct values), so a feedback event carries only fast_feedback_log, matching the proto oneof.
  • Exports root.CommandString so origin uses the same command naming as telemetry.

Why

Users, and agents acting for them, have no way to report CLI issues from the CLI itself. This builds on the goals of #7254 (AIR feedback with agent attribution, run context and a receipt), with three differences:

  • It is one general entry point rather than a command per product; --command routes the feedback to the owning team.
  • It uses only the existing fast-feedback schema; the extra context goes in the standard user agent.
  • It asks for the user's confirmation when an AI agent submits.

Tests

  • Acceptance test acceptance/cmd/feedback covers:
    • routing for --command (a product subcommand, a command group, a CLI-owned command) and no --command
    • the JSON receipt
    • an agent without --yes (refused) and with --yes (agent/ recorded)
    • validation of the message, --command and --run-id
  • Unit test for telemetry.Send.
  • Updated help goldens.

This pull request and its description were written by Isaac.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! This pull request was opened from a fork.

If you're a member of the Databricks organization, please request access to the cli-contrib team and open your pull request from a branch in this repository instead of a fork — fork PRs don't run integration tests automatically and have reduced CI access.

If you're an external contributor, no action is needed; a maintainer will review your pull request.

@github-actions github-actions Bot added DABs DABs related issues AIR Databricks AI Runtime CLI labels Nov 12, 2026
Adds a CLI-wide feedback command. Feedback is sent as a fast_feedback_log
event to /telemetry-ext using only existing schema fields: --command goes
in origin and selects the owning ES component for parent_ui, and the
agent, run ID and CLI version go in the standard user agent. Feedback from
a detected AI agent requires user confirmation.

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

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 7567
  • Commit SHA: 2f69b13a3203a516fe97bc465ec64dbf068381d6

Checks will be approved automatically on success.

@simonfaltum

Copy link
Copy Markdown
Member

@tedjt, this was just a quick agentic review. I'll look into how we can do this.

Findings from 2f69b13:

  1. [P2] Feedback is blocked by bundle configuration — feedback.go:77. MustWorkspaceClient loads the current bundle, so malformed YAML or multiple targets without a default stop feedback even with workspace credentials supplied through the environment. Skip bundle loading before initializing the workspace client.

  2. [P2] SDK retries can send feedback twice — logger.go:324. Calling attempt once still allows the default SDK client to retry. A local server received two POSTs for one event after resetting the connection following the first upload, and Send returned success. Disable SDK retries for this explicit upload, following validateConfigOnce's client configuration.

  3. [P2] OAuth refresh can exceed the send deadline — feedback.go:129. If the token expires while the user reads the confirmation, the SDK refreshes it with context.Background(), so the 30-second send context cannot interrupt it. A local reproduction with a 20 ms deadline took about 301 ms. Reuse or adapt telemetry.Upload's bounded authentication path.

  4. [P2] The changelog fragment fails PR-link validation — feedback.md:1. The validator requires the PR-link group at the end, after the sentence's period. Move the period before the link: …to Databricks. ([#7567](https://github.com/databricks/cli/pull/7567)).

  5. [P3, non-blocking] Plain confirmation fails in colorless terminals — feedback.go:165. IsPromptSupported requires color/TUI support, so a real terminal with NO_COLOR=1 or TERM=dumb is refused even though AskYesOrNo only needs plain terminal I/O. Use the relevant input/output capability check for this confirmation.

The affected unit tests and new feedback acceptance test passed. The cases above were verified locally using fake endpoints, terminal repros, and the repository's changelog validator.


This comment was generated with GitHub MCP.

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

AIR Databricks AI Runtime CLI DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants