Repository navigation
aitools: mention databricks aitools install in version --check - #7471
Conversation
a5568f8 to
2b4b8c6
Compare
2e276b6 to
848f252
Compare
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=1 unreleased=0 coverage=0 failing=0
TestAccept/cmd/version: branch ✅ | main (a572447) ❌ | latest (v1.26.0) ❌main (a572447): latest (v1.26.0): |
✅ Integration test reportCommit: 64f749d
Top 12 slowest tests (at least 2 minutes):
|
simonfaltum
left a comment
There was a problem hiding this comment.
🤖 Automated review from simonfaltum's review agent (pr-review skill) at 848f252. Each finding was verified against the code; simonfaltum may follow up.
Not approving yet: 1 open design question.
This PR adds a line pointing to databricks aitools install to the text output of databricks version --check on every outcome except development builds. JSON output and plain version are unchanged. The template renders correctly in every case, the tests and changelog fragment look right, and CI is green. Two things are open: whether this hint should be gated like the other aitools install suggestions (it also shows to users who already installed and to users with no coding agent), and moving it from stdout to stderr like the other hints. There is also a small note on the PR description format.
Questions
- Should this line be shown unconditionally? The other places that suggest
databricks aitools installall check first:agents.MaybeHint(libs/aitools/agents/hint.go),RecommendSkillsInstall(libs/aitools/agents/recommend.go) andaitools version. They stay quiet when the plugin or skills are already installed, or when no coding agent is present, and the other version notices skip Databricks Runtime. With this change,version --checkalso tells users who already ranaitools installto set it up, and it shows on DBR. Users with no coding agent are sent to a command that replies 'No supported coding agents found on PATH'. Claude Code sessions without tooling get this line plus the separate MaybeHint line on stderr. Options: (a) keep it unconditional and explain in the description why it differs from the other hints, or (b) route it through thelibs/aitools/agentshint helpers so it shows only when an agent is detected and no Databricks plugin or skills are present.
Comments outside the changed lines
- [nit]
.github/PULL_REQUEST_TEMPLATE.md: The description uses## Summary,## Evidenceand## Merge Danger..agents/skills/pr-checklist/SKILL.md(PR description section) asks for the.github/PULL_REQUEST_TEMPLATE.mdheadings (## Changes,## Why,## Tests) in that order, with no invented sections. As a result, the description has no## Whyexplaining the reason for adding this hint. Could you move the content under the template headings (Summary → Changes, Evidence → Tests) and add a short Why?
| {{green "You're on the latest version."}} | ||
| {{- end}} | ||
| {{- if not .DevelopmentBuild}} | ||
| Set up Databricks AI tools for your coding agents: databricks aitools install |
There was a problem hiding this comment.
[nice to have] The hint is part of updateCheckTemplate, so cmdio.RenderWithTemplate writes it to stdout together with the version status. Every other aitools install hint (agents.MaybeHint, PrintSkillsTip) goes to stderr through cmdio.LogString. As a result, a script or agent reading the text result, for example databricks version --check | tail -n1 or a check that the last line is "You're on the latest version.", now gets the aitools line instead, and redirecting stderr can't remove it. Suggest dropping the line from the template and printing it after the render with cmdio.LogString(ctx, ...) (still skipped for development builds), so stdout keeps only the update-check result.
There was a problem hiding this comment.
Done in 90c8726: the line is no longer part of updateCheckTemplate. renderUpdateCheck renders the result and then prints the line with cmdio.LogString (stderr), only in text mode and not for development builds, so stdout keeps only the update-check result. TestRenderUpdateCheckAIToolsHint covers the stdout/stderr split, the dev-build skip and --output json.
848f252 to
90c8726
Compare
2b4b8c6 to
bbc2b80
Compare
90c8726 to
125c8ca
Compare
bbc2b80 to
6cd41f6
Compare
0148734 to
7d1dfc8
Compare
|
Re Question 1: went with (b) in 7d1dfc8. |
simonfaltum
left a comment
There was a problem hiding this comment.
🤖 Automated review from simonfaltum's review agent (pr-review skill) at 7d1dfc8. Each finding was verified against the code; simonfaltum may follow up.
Not approving yet: 1 blocking issue(s), tagged [blocking]; 1 open design question.
This PR prints a databricks aitools install suggestion on stderr after databricks version --check when a coding agent's config dir is found without Databricks tooling. Stdout and JSON output are unchanged, and the tests pass. The check misses plugin installs for Codex CLI and GitHub Copilot, which are recorded only in the CLI's install state, so those users keep seeing the line after they install. That needs fixing before merge. Claude Code sessions also get this line in addition to the existing root hint. There is also an open question about whether this hint should go through the shared hint helpers.
Questions
- This adds a second install-hint path in
cmd/versionalongsideagents.MaybeHintandPrintSkillsTip. UnlikeMaybeHint, it shows to anyone who has a coding agent's config directory, including people at a terminal. It shows on everyversion --checkrun, with no session throttle, CI suppression or opt-out, and it uses new wording, althoughhint.gonotes thathintTextwas tuned for agents. Is that difference intended? Options: (a) keep it incmd/versionand explain in the description why its audience and frequency differ; (b) move it intolibs/aitools/agentsas a helper next toPrintSkillsTip, sharing wording, throttle and dedupe withMaybeHint; (c) drop it and rely onMaybeHint, extending that to other agents if the coverage matters.
Agreeing with existing threads
- [nit] PR description does not use the repo template: #7471 (review)
| if dbr.HasDetection(ctx) && dbr.RunsOnRuntime(ctx) { | ||
| return false | ||
| } | ||
| return !agents.HasDatabricksToolingInstalled(ctx) |
There was a problem hiding this comment.
[blocking] HasDatabricksToolingInstalled only recognizes a plugin through an agent's own manifest reader, and only Claude Code has one. For Codex CLI and GitHub Copilot, databricks aitools install installs the plugin by default, records it only in ~/.databricks/aitools/skills/.state.json and writes no skill dirs. So after a successful install, every version --check still tells the user to run databricks aitools install. I reproduced this with a release build: with ~/.codex and a recorded Codex plugin, databricks aitools version lists Plugin (Codex CLI, global, user scope): v0.2.6 and version --check still prints the line. Could you also count recorded plugin installs? For example, return !agents.HasDatabricksToolingInstalled(ctx) && len(installer.InstalledTools(ctx)) == 0, since InstalledTools already merges the manifests with the recorded state. Please add a test case for a recorded Codex plugin.
There was a problem hiding this comment.
Fixed in b53927b. The tip now also stays quiet when installer.InstalledTools reports a databricks plugin, so plugin installs recorded only in the CLI install state (Codex CLI, GitHub Copilot) count. The check lives in agents.MaybeVersionCheckTip, which takes installer.InstalledTools as a parameter because libs/aitools/installer imports libs/aitools/agents. Tests: TestRenderUpdateCheckAIToolsTip/codex_plugin_recorded_in_the_install_state (cmd/version) writes ~/.codex plus a recorded Codex plugin in .state.json and expects no tip. TestMaybeVersionCheckTip/plugin_recorded_in_install_state covers the same gate in the agents package.
| if output == flags.OutputText && !result.DevelopmentBuild && showAIToolsHint(ctx) { | ||
| cmdio.LogString(ctx, aitoolsHint) |
There was a problem hiding this comment.
[nice to have] In a Claude Code session without the Databricks tooling, agents.MaybeHint (root pre-run, cmd/root/root.go:95) already prints its install recommendation for version. version --check now adds a second, differently worded line for the same command. MaybeHint shows at most once per hour per session, but this line repeats on every check in the session. Agents are sent to this command by UpdateCLIAdvice (libs/genie/agentstream/renderer.go:33). I reproduced both lines with a release build and CLAUDECODE=1. Could you skip this line when MaybeHint covers the caller (Claude Code as the agent provider), for example with a small exported helper in libs/aitools/agents, and add a test case for it?
There was a problem hiding this comment.
Done in b53927b. agents.MaybeVersionCheckTip returns early when Claude Code is the agent provider, because agents.MaybeHint covers that caller in the root pre-run hook with its per-session throttle. A command now prints at most one install hint. Test: TestMaybeVersionCheckTip/claude_code_caller_is_left_to_MaybeHint.
| if dbr.HasDetection(ctx) && dbr.RunsOnRuntime(ctx) { | ||
| return false | ||
| } | ||
| return !agents.HasDatabricksToolingInstalled(ctx) |
There was a problem hiding this comment.
[nice to have] HasDatabricksSkillsInstalled only looks in $HOME/.databricks/aitools/skills and the legacy dir. After databricks aitools install --scope project for a skills-only agent (Kiro, Goose, Pi, Gemini), running version --check in that project still says to install. I reproduced this with ~/.kiro and project-scoped databricks-apps skills under .databricks/aitools/skills/ and .kiro/skills/. Consider also returning false when agents.DetectProjectInstalled(cwd) finds skills in the current project.
There was a problem hiding this comment.
Done in b53927b. The tip also stays quiet when agents.DetectProjectInstalled(cwd) finds Databricks skills in the current project. Test: TestMaybeVersionCheckTip/project_skills sets up ~/.kiro and .kiro/skills/databricks-apps in the working directory and expects no tip. Project-scoped plugin records are already covered by installer.InstalledTools, which reads both the global and the project install state.
| home := t.TempDir() | ||
| t.Setenv("HOME", home) | ||
| t.Setenv("USERPROFILE", home) | ||
| for _, name := range []string{"CLAUDE_CONFIG_DIR", "PI_CODING_AGENT_DIR", "GEMINI_CLI_HOME", "APPDATA", "XDG_CONFIG_HOME", "GOOSE_PATH_ROOT"} { |
There was a problem hiding this comment.
[nit] setupAgentHome hard-codes the config-dir override env vars, duplicating clearAgentDirOverrides in libs/aitools/installer/installer_test.go. If an agent adds a new override, this list goes stale and the "no agent detected" case can start reading the host's real agent dir. testutil.SetAgentEnv(t, "HOME", home, "USERPROFILE", home) (internal/testutil/agent.go, already used in cmd/aitools/funnel_test.go) clears the whole environment and avoids that.
There was a problem hiding this comment.
Done in b53927b. setupAgentHome is gone. Both tests use testutil.SetAgentEnv(t, "HOME", home, "USERPROFILE", home) and t.Chdir(t.TempDir()), so neither the host's agent dirs nor the repo's project dirs leak in.
7d1dfc8 to
b53927b
Compare
|
Re Question 1 (second review): went with (b) in b53927b. The line moved into |
6cd41f6 to
8643a8e
Compare
b53927b to
14f43cd
Compare
8643a8e to
4653c00
Compare
14f43cd to
8e754f4
Compare
4653c00 to
cf15bb3
Compare
9dd6d21 to
7e2cf0e
Compare
e1c95af to
1a67570
Compare
7e2cf0e to
2920789
Compare
1a67570 to
f379423
Compare
2920789 to
66114a4
Compare
simonfaltum
left a comment
There was a problem hiding this comment.
🤖 Approval from simonfaltum's review agent at 66114a4, on Simon's decision.
The design questions from the earlier automated reviews no longer block this PR: your answers are accepted, and any still-open ones are non-blocking. The changes since the last automated review (0aed2cb → 66114a4) address its comments.
rugpanov
left a comment
There was a problem hiding this comment.
[nit] The description says "This change is independent of the telemetry PRs below it in the stack". It is not: agents.HasDatabricksToolingInstalled comes from #7467 and is not on main. Correct the sentence, so that nobody tries to land this PR alone.
Also found by our reviewers, already asked in simonfaltum's review (Question 1): apps init and version --check print the same tip but decide with different checks. Two of our reviewers found the same split.
| # Databricks tooling. The committed codex-home/.codex is a Codex CLI config dir | ||
| # without the databricks plugin or skills. | ||
| title "version --check with a coding agent and no Databricks tooling" | ||
| sethome ./codex-home |
There was a problem hiding this comment.
[nit] sethome changes only HOME. Agent detection also reads CLAUDE_CONFIG_DIR, XDG_CONFIG_HOME, GEMINI_CLI_HOME, PI_CODING_AGENT_DIR, GOOSE_PATH_ROOT and APPDATA. The harness clears only the agent signal variables, such as CLAUDECODE. So on a machine with CLAUDE_CONFIG_DIR set, this case and the one at line 7 can print a different stderr, and the golden file does not match. The script unsets CLAUDE_CONFIG_DIR only before the Claude Code case (line 27). Unset these variables at the top of the script.
There was a problem hiding this comment.
Done in 7cd9908. The script now unsets CLAUDE_CONFIG_DIR, XDG_CONFIG_HOME, GEMINI_CLI_HOME, PI_CODING_AGENT_DIR, GOOSE_PATH_ROOT and APPDATA at the top, so every case sees only the committed homes. This is the same list clearAgentDirOverrides uses in the installer tests. The separate unset CLAUDE_CONFIG_DIR before the Claude Code case is gone. Checked locally with CLAUDE_CONFIG_DIR and XDG_CONFIG_HOME set on the host: the golden output still matches.
66114a4 to
7cd9908
Compare
|
Thanks. Fixed the description: it now says this PR depends on the PRs below it ( |
f379423 to
b7c7065
Compare
7cd9908 to
fdd8c89
Compare
b7c7065 to
0c738aa
Compare
fdd8c89 to
e10129b
Compare
0c738aa to
139cbc2
Compare
e10129b to
5576f2b
Compare
139cbc2 to
d11cd37
Compare
5576f2b to
151571c
Compare
`databricks version --check` (text output) is followed by the `apps init` skills tip on stderr when a coding agent is detected without Databricks tooling. Stdout keeps only the update-check result: ```diff Databricks CLI v0.245.0 You're on the latest version. +Tip: coding agents detected without Databricks skills. Run 'databricks aitools install' to install them. ``` The tip comes from `agents.MaybeVersionCheckTip`. It is not printed when an agent has the databricks plugin (in its own manifest or recorded in the CLI install state) or Databricks skills (in the shared store, in the agent's own skills dir, or in the project dirs up to the repository root), on Databricks Runtime, or when Claude Code drives the CLI (`agents.MaybeHint` already covers that caller). Changelog fragment: `.nextchanges/cli/version-check-aitools-hint.md`. Co-authored-by: Isaac <no-reply@databricks.com>
151571c to
64f749d
Compare
Stacked on databricks#7471. Stacked on: aitools: mention databricks aitools install in version --check ## Summary `databricks aitools install` runs `<agent> plugin --help` to check that the agent's CLI can install plugins. Agent CLIs are large Node/Rust binaries, and a cold start (first run, antivirus scan, slow container disk) can take several seconds. When the probe times out, the agent is reported as unavailable. ```diff // libs/aitools/installer/plugin.go -pluginProbeTimeout = 5 * time.Second +pluginProbeTimeout = 20 * time.Second ``` The same constant also bounds `<agent> plugin marketplace list`. Changelog fragment: `.nextchanges/cli/aitools-plugin-probe-timeout.md`. ## Evidence A temporary test (not committed) points `probePluginCLI` at a fake `claude` script that sleeps 7s and then prints usage. Linux, at this PR's head: - **Before** (constant reverted to 5s): ``` --- FAIL: TestProbePluginCLISlowColdStart (7.13s) claude-code: cli-not-on-path: .../claude plugin --help: signal: killed ``` **After** (20s): ``` --- PASS: TestProbePluginCLISlowColdStart (7.06s) ``` `go test ./libs/aitools/...` passes. No committed test pins the timeout value, because such a test would have to wait out the timeout. ## Merge Danger **Door:** two-way Reverting is a one-line change. **Blast Radius:** small - An agent CLI that hangs now blocks `aitools install` for up to 20s at the probe instead of 5s. The same applies to `plugin marketplace list`, where a timeout makes install assume the marketplace is already registered. - On Windows, an npm-installed agent CLI runs as a `.cmd` shim, and `runAgentCmd` kills only the direct child on timeout. A hung grandchild that keeps stdout/stderr open can make the probe wait past 20s. This predates the PR; bounding it with `process.WithProcessGroup()` is left to a follow-up. - No exit codes or output change. A probe that still times out reports the same `cli-not-on-path` reason as before. - `agents.ProbePlugin` in `libs/aitools/agents/detect.go` has its own copy of the constant, also raised to 20s. It has no non-test callers. - Not tested on Windows or macOS. This pull request and its description were written by Isaac. Co-authored-by: Isaac <no-reply@databricks.com>
## Release v1.27.0 ### Notable Changes * `databricks aitools install`, `update` and `uninstall` now exit with code 1 when they do nothing they were asked to. `install` fails when it sets up nothing: no coding agent is detected, every agent is skipped or fails to install, or no skill in the release can be installed (also with `--path`). `update` fails when every update or check it attempts fails, and `uninstall` when every removal it attempts fails. Scripts that ran these commands as a best-effort step and relied on exit code 0 should handle the new exit code. ([#7481](#7481)) * Add `file:<path>` selectors to `pipelines run` and pipeline `bundle run`. `--refresh` and `--full-refresh` now use space-separated lists, such as `--refresh "orders payments"`, instead of comma-separated lists. Single names containing spaces now require backticks, e.g. ``--refresh 'table:`order details`'``. ([#7184](#7184)) * The Databricks CLI is now available on PyPI as `databricks`: run it with `uvx databricks`, or install it with `uv tool install databricks`, `pipx install databricks` or `pip install databricks`. The package contains only the prebuilt CLI binary. Uninstall the legacy `databricks-cli` package first, since both install a `databricks` command. ([#7704](#7704), [#7777](#7777)) ### CLI * Add `databricks sandbox fs` commands (`cp`, `ls`, `cat`, `mkdir`, `rm`) to transfer files between your local filesystem and sandboxes using `<sandbox-id>:/path`. ([#7372](#7372)) * `databricks fs` commands retry reads (stat, list, open) and deletes on DBFS and Volumes when the server returns a transient error or does not respond within the HTTP timeout. ([#7556](#7556)) * Retry UC Volumes file operations (`fs cp`, `fs ls`, `fs rm`, bundle uploads to Volumes) when the Files API returns HTTP 408, 429, 502, 503 or 504 (for example "AWS S3 is throttling requests"), or on a transient network error; this regressed in v1.10.0. ([#7559](#7559)) * Stop warning when the host metadata request (`/.well-known/databricks-config`) times out; the CLI already falls back to your config, and the message is still shown with `--debug`. ([#7752](#7752)) * Add `databricks aitools auto-install disable` and `enable` to turn off (or back on) the automatic installation of Databricks AI tools on CLI upgrades. A global-scope `databricks aitools uninstall` also turns it off. ([#7701](#7701)) * Stop printing the Databricks AI tooling install hint on `auth`, `configure`, `current-user me`, `version`, `help`, and shell-completion commands. ([#7452](#7452)) * When Codex, Cursor, GitHub Copilot CLI, OpenCode, Gemini CLI, Antigravity, Pi, Goose or Kiro run the CLI without Databricks skills installed for that agent, the CLI now prints a one-line hint to install them with `databricks aitools install --agents <agent> --scope global`, previously shown only to Claude Code. ([#7586](#7586)) * `databricks aitools install` now rejects an unknown `--agents` name before it shows the scope prompt, instead of after. ([#7469](#7469)) * `databricks aitools install` no longer asks "Proceed?" after the agent picker; the picker selection confirms the plan. The picker title now shows the install scope, its hint says Enter installs, `--skills-only` runs label plugin agents "skills" and pre-check every agent whose config dir exists, and the plan summary after it is reduced to the scope line. ([#7478](#7478)) * `databricks aitools install --output json` reports more specific `error_category` values: `SKILLS_FETCH_FAILED`, `RELEASE_LOOKUP_FAILED`, `RATE_LIMITED`, `MANIFEST_INVALID`, `STATE_INVALID` and `PLUGIN_CLI_TIMEOUT`. A coding agent CLI that does not answer in time is now reported as `timed out after <duration>`, followed by any stderr it wrote before it was stopped. ([#7475](#7475)) * `databricks aitools install` no longer prompts when a coding agent runs it, even in a pseudo-terminal; it uses the non-interactive defaults instead and prints a note saying so. ([#7477](#7477)) * `databricks aitools install` now prints the directory it installed skills into (for example `Installed 1 skill in ~/.databricks/aitools/skills.`), so agents can open the installed `SKILL.md` files without searching for them. ([#7668](#7668)) * `databricks aitools install` now ends a failed install with a step to recover, in the text output and in a new `recovery` field of `--output json`. ([#7480](#7480)) * `databricks aitools install` now installs plugins for the other coding agents even when installing skill files fails. ([#7479](#7479)) * `databricks aitools install` now installs skill files for a detected coding agent whose CLI is not on PATH (for example a Claude Code desktop or IDE install), unless it already has the plugin, says how to switch to the plugin later, and warns when the current project also has the plugin. `databricks aitools update` no longer tries to install the plugin for such an agent, and no longer writes skill files next to a plugin that such an agent already has. ([#7482](#7482)) * Fix `databricks aitools install` waiting a long time on an unreachable or slow workspace while it resolves authentication for telemetry; that wait is now limited to a few seconds. ([#7468](#7468)) * `databricks aitools install`, `update` and `list` now refuse a skills manifest that names a skill or file outside the skills directory, before writing any skill files. A skill whose name or file paths are not portable is skipped with a warning, and `update` keeps its installed copy. ([#7722](#7722)) * `databricks aitools install` and `databricks aitools update` refresh only the marketplace the Databricks plugin is listed in, so another unreachable marketplace no longer blocks them. When that refresh fails, both commands warn, install or update the plugin from the local copy of the marketplace, and record the plugin version as unknown. ([#7473](#7473)) * `databricks aitools install` and `databricks aitools update` now wait up to 20 seconds instead of 5 for a coding agent's CLI to answer the plugin capability check, so a slow first start is less likely to report the agent as unavailable. ([#7472](#7472)) * `databricks aitools install` no longer fails a plugin-only install when the lookup of the latest skills release on GitHub fails or is rate-limited. The plugin is installed and its version is recorded as unknown. ([#7474](#7474)) * `databricks aitools` commands now send usage telemetry, and the CLI records when it recommends installing Databricks AI tools. When the configured workspace is slow or unreachable, `aitools install`, `update` and `uninstall` can take up to about 6 seconds longer, and `list`, `version` and runs that stop early up to about 3 seconds. Set `DATABRICKS_CLI_DISABLE_TELEMETRY=1` to opt out. ([#7467](#7467), [#7469](#7469), [#7470](#7470)) * `databricks aitools install` and `databricks aitools update` now report a coding agent CLI shim (`.cmd` or `.bat`) on Windows that prints its plugin help and then exits with an error as `shim-exited-with-error`, with the command to run to see the error, instead of reporting the CLI as not on PATH. ([#7476](#7476)) * `apps init` no longer suggests installing skills when every detected coding agent already has the Databricks plugin. ([#7467](#7467)) * `databricks auth login` now gives up on the optional workspace lookup after about 5 seconds instead of retrying for about 5 minutes, and explains the fallback to the manual workspace ID prompt. ([#7522](#7522)) * Throttle Claude Code's native plugin install hint separately from the text hint: it prints at most once per 10 minutes per session, so the install dialog still comes up when a subagent, a hook, or a command outside a Claude Code subprocess runs the session's first `databricks` command. ([#7692](#7692)) * Print Claude Code's native plugin install hint alongside the text hint, so Claude Code offers a one-click install of the Databricks plugin. Claude Code now counts as having the tooling only when it loads it: skills only in `~/.databricks/aitools/skills` don't count, and a project- or local-scope plugin counts only when the CLI runs inside that project. `auth token`, `auth docker token` and CLI subprocesses no longer print install hints. ([#7585](#7585)) * Interactive prompts and pagers now work in Git for Windows' bash and other MSYS2 shells when they run under ConPTY (the default since Git for Windows 2.47) or directly in a Windows console. ([#7699](#7699)) * Add the `databricks feedback` command to send feedback about the CLI to Databricks. ([#7724](#7724)) * Fix shell completion in `databricks fs` commands for local paths typed with a leading `./` or repeated separators, which previously offered no suggestions. ([#7679](#7679)) * Fix a panic in `databricks labs` commands when a non-string SDK setting such as `DATABRICKS_DEBUG_HEADERS` or `DATABRICKS_RATE_LIMIT` is set in the environment. ([#7673](#7673)) * Fix a panic in `databricks labs install` for projects whose `labs.yml` has no `install` section. ([#7673](#7673)) * `NO_COLOR` no longer disables prompts, spinners or the list pager; they run without color. ([#7700](#7700)) * Add the Beta `databricks pipelines test` command, which runs the tests of a pipeline, and the `testing` property of pipelines in bundles. ([#7429](#7429)) * Add `databricks sandbox forward`, which serves an app running in a sandbox at a local URL. ([#7395](#7395)) * Bound the whole telemetry upload at exit, including config resolution and authentication, by its timeout, so a stalled auth or telemetry endpoint no longer keeps a command from exiting. ([#7467](#7467)) * `databricks version --check` now suggests `databricks aitools install` on stderr when a coding agent is detected without the Databricks plugin or skills. ([#7471](#7471)) ### AI Runtime * `air get -o json` now reports `PENDING` while the run waits for compute, matching `air list`, and includes the run's `status_message`. ([#7455](#7455)) * Wrap long failure reasons and log lines in the `air list` info and logs panes, keep the MLflow link (labeled with its retry) when a run's last retry failed before starting, and point `air logs` at earlier retries when the last one has no logs. ([#7456](#7456)) * `databricks air logs --node` now reports an out-of-range node index when it can determine the run's node count, instead of looking like a successful run with no logs. ([#7516](#7516)) * Add experiment, duration, accelerator, and dashboard metadata to `air list --output json`. For retried runs, `started_at` now reports the latest attempt, matching `air get`. ([#7568](#7568)) * `air list` shortens MLflow run names and unnamed-run IDs by keeping their end behind a leading `…`, and its columns no longer overflow on wide (for example CJK) text; `air get` shows an unnamed run's full MLflow run ID. ([#7582](#7582)) * Shrink the Experiment and User columns of the interactive `air list` table to fit the terminal width, keeping the end of a shortened experiment name. ([#7583](#7583)) * Show the experiment, accelerators and configuration in the `air list` info pane for runs where it showed `N/A`. ([#7587](#7587)) * Strip terminal control characters from the MLflow run, experiment and user names shown by `air list` and `air get`, so a run name cannot clear or retitle the terminal of whoever lists it. ([#7601](#7601)) * `air logs`, `air get`, and `air run --watch` no longer make an extra credential-check request before fetching the run, and `air get` reuses the configured workspace ID instead of looking it up. ([#7613](#7613)) * `air list` no longer waits on extra current-user requests before listing runs, which makes the default list about 150ms faster. ([#7615](#7615)) * `air list --all-status` requests larger index pages, so it makes far fewer round trips once the server supports `page_size`. ([#7616](#7616)) * Fit the interactive `air list` table to narrow terminals: when the Experiment and User columns are at their floors, shorten Started to `MM-DD HH:MM` and size the MLflow column to its labels, then hide Accelerators, User, MLflow and Progress in that order, naming the hidden columns in the hint line. ([#7629](#7629)) * `air get -o json` now includes `mlflow_run_id` and `mlflow_experiment_id`, so a run can be handed to MLflow-based steps without parsing `mlflow_url`. They identify the MLflow run `mlflow_url` links to, including one from an earlier retry that `mlflow_retry` names. ([#7636](#7636)) * `air get` and the `air list` info pane now show the environment of runs on the Databricks AI environment (`databricks_ai_v*`) instead of `N/A`. ([#7637](#7637)) * `air run` now rejects a `code_source.include_paths` path that selects no files instead of uploading a snapshot without it; glob patterns and pathspec magic are left to git. ([#7643](#7643)) * `air convert-to-dabs` now suggests the `--output-dir` that converts a working-tree workload whose `code_source.root_path` is outside the bundle directory, instead of suggesting `sync.paths`. ([#7644](#7644)) * `air run` now lists a `code_source.root_path` outside a git repository relative to `root_path`, so running from a subdirectory of `root_path` no longer uploads an empty or partial snapshot. ([#7646](#7646)) * `air list --all-status` now fills `--limit` past purged or inaccessible indexed runs. ([#7743](#7743)) * `air run` now warns about missing PyTorch when a pinned snapshot's `include_paths` selects a Python file. ([#7744](#7744)) * `air cancel JOB_RUN_ID` now rejects run IDs that are not AI Runtime runs instead of cancelling unrelated Jobs runs. In `-o json` output, the `failed[].error` text for a run that does not exist or that you cannot view now starts with `failed to get run <id>:` instead of the cancel API error. ([#7569](#7569)) * `air get -o json` now reports `mlflow_retry` when the MLflow link comes from an earlier retry because the run's last retry never reached MLflow. ([#7620](#7620)) * `databricks air run --help` now shows how to install the databricks-ai-runtime coding agent skill. ([#7652](#7652)) * `air run --watch -o json` now reports each lifecycle `STATUS` transition once and never reports a non-terminal state after the run has ended, including when logs are served from MLflow artifacts. ([#7621](#7621)) * `air convert-to-dabs` now explains the `--output-dir` workaround when `code_source.root_path` resolves to the bundle root, and notes when the generated job carries the default `max_retries`. ([#7579](#7579)) * `air run` now refuses to upload a `code_source` snapshot that selects no files (for example when `root_path` is git-ignored) and explains the cause, and `--dry-run` runs the snapshot file selection and reports the file count. ([#7570](#7570)) * Repeat the Jobs run link after live log streaming ends. ([#7571](#7571)) * `air get -o json` includes run details including flat `accelerator_type` and `num_accelerators`. Use `--include-config` to include stored config, which may contain plaintext `env_variables` and parameters; downloads over 1 MiB are omitted, and config-dependent `max_retries` is otherwise null. ([#7624](#7624)) * `air get` and the `air list` info pane no longer show `Max Retries 0` when the Jobs API leaves the task's retry limit out. For a run submitted with `air run`, the limit now comes from the run's uploaded config, shown as `3 (CLI default)` when the config doesn't set `max_retries`; it shows `N/A` when the limit can't be known (job runs, multi-container runs, legacy runs with no explicit value, or an unreadable config). ([#7623](#7623)) * Reorganize `databricks air` help: subcommands are grouped by task, `air run` has examples, and YAML fields are listed under headings, with pool fields marked optional and `command`, `compute.num_accelerators`, and `compute.accelerator_type` correctly marked required. ([#7512](#7512)) * `air run -h config` now lists the environment variables AI Runtime sets on every node (such as `MLFLOW_RUN_ID` and `CODE_SOURCE_PATH`), and `air logs --help` notes that `--download-to` cannot be combined with `--tail` or `--minutes`. ([#7655](#7655)) * Support full workspace accelerator types in `air list` filters while preserving family matching, and reject invalid filter values. ([#7515](#7515)) * `databricks air list --all-status` now warns when the AI Runtime run index is unavailable and it falls back to scanning Jobs runs. That fallback scan is capped at 250 runs, and a stuck index request fails after 15 seconds instead of retrying for minutes. `--all-status --filter user=<your email>` now uses the run index instead of scanning the workspace's full run history. ([#7619](#7619)) * Return structured JSON errors for invalid `air list --filter` values when `-o json` is used. ([#7612](#7612)) * `air list --all-status` no longer fails when a listed run has been purged. ([#7523](#7523)) * **Behavior change:** `databricks air logs` now prints the logs available now and exits, also for an active run, matching `kubectl logs`, `docker logs` and `databricks apps logs`. Pass `--follow` (`-f`) to stream new lines until the run completes; `--tail N --follow` prints the last N lines first. `databricks air run --watch` still submits and streams. ([#7658](#7658)) * `databricks air logs -o json` and `databricks air run --watch -o json` now emit a `WAITING` event, for example `{"type":"WAITING","message":"Waiting for accelerator compute capacity..."}`, when the reported waiting status changes. ([#7695](#7695)) * `databricks air logs` on a run that ended in the last two minutes now waits for the log index to settle before printing, instead of sometimes dropping lines that were indexed late. ([#7663](#7663)) * `air logs` and `air run --watch` now print the waiting status (for example `Waiting for accelerator compute capacity...`) as a line on stderr when stderr is not a terminal, instead of printing nothing until the run produces logs. ([#7657](#7657)) * Route AIR log links to the MLflow Logs page instead of the hidden artifact path. ([#7491](#7491)) * Invalid `compute.accelerator_type` errors and `air run -h config.compute` no longer list the CLI's built-in accelerator types, which could differ from the workspace's. ([#7520](#7520)) * `databricks air --help` now notes that GPU pools are not required to run workloads. ([#7581](#7581)) * `air run` now prints the job run URL with the `?o=<workspace-id>` suffix, matching `air get` and `air list`; `dashboard_url` in `air run -o json` and the `--watch` events gains it too. When `air list` cannot resolve the workspace ID, its links now omit `?o=` instead of ending in `?o=0`. ([#7573](#7573)) * `databricks air run` now reports an unknown workload YAML key by its field path, suggests the closest valid field, and points to `-h config` instead of naming an internal Go type. ([#7574](#7574)) * `air run` (including `--dry-run`) now warns before submitting when the `code_source` imports `torch` but PyTorch is not declared: the environment is the Standard environment (version 5 or later) with no `torch` dependency, so the run may fail after it waits for a GPU. ([#7656](#7656)) ### Bundles * Add `isolation_mode` to the `catalogs` resource, so a catalog can be deployed as `OPEN` or `ISOLATED`. ([#7463](#7463)) * `bundle validate` no longer warns when resource permissions and top-level or target permissions name the same principal. ([#7291](#7291)) * Retry bundle file uploads, reads and deletes when the server does not respond within the HTTP timeout ("request timed out after ... of inactivity"). ([#7521](#7521)) * Show how to recover when `bundle deploy` fails because an app's service principal does not exist or was deleted. ([#7533](#7533)) * Retry transient server errors when creating Lakebase (`postgres_*`) resources in the direct deployment engine. ([#7557](#7557)) * Fix `bundle plan` reporting the `spark_conf` and `custom_tags` the backend derives from `is_single_node: true` as drift on clusters. ([#7577](#7577)) * Stop planning a spurious update for Lakeflow Connect pipelines whose `ingestion_definition.data_staging_options` is filled in by the backend. ([#7603](#7603)) * Retry the root path check in `bundle destroy` on transient errors, so a dropped connection no longer fails the destroy. ([#7597](#7597)) * Use the Lakebase branch when its create request times out but the branch was created, instead of failing the deploy, in the direct deployment engine. ([#7602](#7602)) * Retry transient server errors when deleting resources in the direct deployment engine. ([#7708](#7708)) * Use the Lakebase project when its create request times out but the project was created, instead of failing the deploy with "already exists", in the direct deployment engine. ([#7747](#7747)) * Use the feature, model serving endpoint or dashboard that a create request created despite timing out, instead of failing the deploy, in the direct deployment engine. ([#7757](#7757)) * Use the Lakebase role when its create request fails with a transient error but the role was created, instead of failing the deploy, in the direct deployment engine. ([#7767](#7767)) * Use the MCP service, model service or model provider service that a create request created despite failing with a timeout, a 499 or a reset stream, instead of failing the deploy, in the direct deployment engine. Create recovery for features, serving endpoints and dashboards now also covers 499 and reset streams. ([#7782](#7782)) * Retry app updates and deletes in the direct deployment engine when they fail with 400 BAD_REQUEST because the app compute is `UPDATING`, after waiting for the compute to settle. ([#7606](#7606)) * Enable drift detection for `source_code_path` and `git_source` on apps. ([#6399](#6399)) * `bundle destroy` and `bundle deploy` no longer fail with "internal error, missing in state" when the state holds an empty-ID entry left by an interrupted recreate in an older CLI. ([#7676](#7676)) * Fix a feature whose `full_name` contains uppercase letters being recreated on every deploy. ([#7398](#7398)) * Fix `bundle deployment bind` (and `bundle generate --bind`) failing with `no such node "resources.internal_immutable_snapshots.immutable"` when `workspace.sync_mode` is `immutable`, as reported in [#7306](#7306). ([#7329](#7329)) * Retry creating the deployment lock (without `--force-lock`) when the request fails with a transient server error, times out ("request timed out after ... of inactivity") or loses its connection ("unexpected EOF"). ([#7594](#7594)) * Fix a materialization set member whose `feature_name` contains uppercase letters failing to deploy, or recreating the set on every deploy. ([#7398](#7398)) * Delete the old resource when its name follows a renamed schema. ([#7718](#7718)) * Fix `pipelines dry-run` starting a real run when given a job KEY, and a crash in its shell completion. ([#7672](#7672)) * Rename schemas in place; schemas and volumes follow a renamed catalog or schema. ([#7343](#7343)) * Fix a panic when validating or deploying jobs with local libraries and serverless job clusters. ([#7725](#7725)) * Fix `tgz` artifacts with `git` set producing an empty tarball or failing when the bundle is in a subdirectory of the git repository. ([#7674](#7674)) * Apply `presets.trigger_pause_status` and the development mode pause default to `triggers[]` entries on jobs. ([#7450](#7450)) ### Dependency Updates * Bump dependencies with known vulnerabilities. ([#7750](#7750)) * Update the Go SDK to [v0.198.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.198.0). ([#7530](#7530)) * Update the Go SDK to [v0.199.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.199.0). ([#7584](#7584)) * Update the Go SDK to [v0.200.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.200.0). ([#7653](#7653)) * Update the Go SDK to [v0.201.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.201.0). ([#7769](#7769))
Stacked on #7470.
Stacked on: aitools: add funnel telemetry to update, list, version and uninstall
This change depends on the PRs below it in the stack:
agents.HasDatabricksToolingInstalledcomes from #7467 and is not on main, so land this PR after them, not on its own.Summary
databricks version --check(text output) is followed on stderr by theapps initskills tip when a coding agent is detected without Databricks tooling. Stdout keeps only the update-check result:Databricks CLI v0.245.0 You're on the latest version. +Tip: coding agents detected without Databricks skills. Run 'databricks aitools install' to install them.The same tip follows "A new version is available ...", the download link, "Could not reach GitHub ..." and the development-build line. It comes from
agents.MaybeVersionCheckTip(next toPrintSkillsTip) and is not printed:installer.InstalledTools, which covers Codex CLI and GitHub Copilot), or Databricks skills in the shared store, in the agent's own skills dir, or in the project dirs up to the repository root ((*Agent).DatabricksTooling);agents.MaybeHintalready covers that caller with its per-session throttle, so a command prints at most one install hint;--output json.It logs no hint telemetry, because
databricks versionnever resolves auth and the event would not be uploaded. Changelog fragment:.nextchanges/cli/version-check-aitools-hint.md.Evidence
TestMaybeVersionCheckTipinlibs/aitools/agents/recommend_test.gocovers the shown case and each hidden case: no agent, plugin in the agent manifest, plugin recorded in the install state, global skills, project skills, project skills at the repository root when run from a subdirectory, skills only in the agent's own skills dir, Databricks Runtime, Claude Code caller.TestRenderUpdateCheckAIToolsTipincmd/version/version_test.gochecks that the tip goes to stderr (development builds included), that a Codex plugin recorded in.state.jsonsuppresses it end to end, and that--output jsonprints none.acceptance/cmd/versionruns the real command: a committedcodex-home/.codexshows the tip on stderr,--output jsondoes not, andCLAUDECODE=1prints only the rootMaybeHintline.TestUpdateCheckTemplatechecks that stdout is unchanged for all update-check outcomes.MaybeVersionCheckTipdisabled in turn, tests kept):go test ./libs/aitools/agents ./cmd/version→--- FAILfor the matching cases (recorded plugin, project and agent skills, Claude Code caller, Databricks Runtime)ok github.com/databricks/cli/libs/aitools/agents,ok github.com/databricks/cli/cmd/version,go test ./acceptance -run TestAccept/cmd/version→okMerge Danger
Door: two-way
Adds one stderr line after the text-mode update check; reverting removes it.
Blast Radius: small
version --checkis unchanged; the extra line is on stderr.--output jsonis unchanged.databricks versionwithout--checkis unchanged.This pull request and its description were written by Isaac.