Repository navigation
aitools: add install funnel telemetry #7469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * `databricks aitools install` now rejects an unknown `--agents` name before it shows the scope prompt, instead of after. ([#7469](https://github.com/databricks/cli/pull/7469)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Cloud = false |
66 changes: 66 additions & 0 deletions
66
acceptance/cmd/aitools/telemetry/install-failure/output.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
|
|
||
| === a skill missing from the manifest fails after the plan is confirmed | ||
|
|
||
| >>> [CLI] aitools install --skills-only --scope=global --agents=cursor --skills=nonexistent | ||
| Installing Databricks skills for Cursor... | ||
| Using skills version test-ref | ||
| Fetching skills manifest... | ||
| Error: skill "nonexistent" not found | ||
|
|
||
| >>> print_telemetry | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"FAILURE","error_category":"SKILL_NOT_FOUND","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR"],"scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"SKILL_NOT_FOUND"}} | ||
|
|
||
| === a manifest the server does not have is MANIFEST_NOT_FOUND | ||
|
|
||
| >>> DATABRICKS_SKILLS_REF=missing-ref [CLI] aitools install --skills-only --scope=global --agents=cursor | ||
| Installing Databricks skills for Cursor... | ||
| Using skills version missing-ref | ||
| Fetching skills manifest... | ||
| Error: skills manifest at databricks-agent-skills@missing-ref: not found | ||
|
|
||
| >>> print_telemetry | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"FAILURE","error_category":"MANIFEST_NOT_FOUND","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR"],"scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"MANIFEST_NOT_FOUND"}} | ||
|
|
||
| === any other HTTP error status from the manifest fetch is not classified yet (the error is untyped) | ||
|
|
||
| >>> DATABRICKS_SKILLS_REF=broken-ref [CLI] aitools install --skills-only --scope=global --agents=cursor | ||
| Installing Databricks skills for Cursor... | ||
| Using skills version broken-ref | ||
| Fetching skills manifest... | ||
| Error: failed to fetch manifest: HTTP 500 | ||
|
|
||
| >>> print_telemetry | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"FAILURE","error_category":"UNCATEGORIZED","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR"],"scope":"GLOBAL"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"UNCATEGORIZED"}} | ||
|
|
||
| === a named agent skipped for the scope takes its category from the agent's outcome | ||
|
|
||
| >>> [CLI] aitools install --skills-only --scope=project --agents=cursor | ||
| Skipped Cursor: does not support project-scoped skills | ||
| Error: Cursor: does not support project-scoped skills | ||
|
|
||
| >>> print_telemetry | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"FLAGS_VALIDATED","interactive":false,"install_mode":"SKILLS_ONLY"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"SCOPE_RESOLVED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"PROJECT"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"AGENTS_SELECTED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"PROJECT"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"STEP_COMPLETED","step":"PLAN_CONFIRMED","interactive":false,"install_mode":"SKILLS_ONLY","scope":"PROJECT"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_command_event":{"command":"INSTALL","stage":"FINISHED","outcome":"FAILURE","error_category":"UNSUPPORTED_SCOPE","interactive":false,"install_mode":"SKILLS_ONLY","agents":["CURSOR"],"scope":"PROJECT"}} | ||
| {"command":"aitools_install","exit_code":1,"aitools_install_event":{"agents":["CURSOR"],"scope":"PROJECT","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CURSOR","error_category":"UNSUPPORTED_SCOPE"}]}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Isolate HOME so parallel aitools tests don't race on a shared ~/.databricks. | ||
| sethome home | ||
| mkdir -p "${USERPROFILE:-$HOME}/.cursor" | ||
|
|
||
| # Only runs past the plan confirmation are here: a run that ends earlier (a | ||
| # flag error, an unknown agent, a --path dump) uploads only if auth has already | ||
| # resolved, so whether its events show up depends on timing. The funnel unit | ||
| # tests in cmd/aitools cover those runs. | ||
|
|
||
| title "a skill missing from the manifest fails after the plan is confirmed" | ||
| musterr trace $CLI aitools install --skills-only --scope=global --agents=cursor --skills=nonexistent | ||
| trace print_telemetry | ||
|
|
||
| title "a manifest the server does not have is MANIFEST_NOT_FOUND" | ||
| musterr trace DATABRICKS_SKILLS_REF=missing-ref $CLI aitools install --skills-only --scope=global --agents=cursor | ||
| trace print_telemetry | ||
|
|
||
| title "any other HTTP error status from the manifest fetch is not classified yet (the error is untyped)" | ||
| musterr trace DATABRICKS_SKILLS_REF=broken-ref $CLI aitools install --skills-only --scope=global --agents=cursor | ||
| trace print_telemetry | ||
|
|
||
| title "a named agent skipped for the scope takes its category from the agent's outcome" | ||
| musterr trace $CLI aitools install --skills-only --scope=project --agents=cursor | ||
| trace print_telemetry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [[Server]] | ||
| Pattern = "GET /missing-ref/manifest.json" | ||
| Response.StatusCode = 404 | ||
|
|
||
| [[Server]] | ||
| Pattern = "GET /broken-ref/manifest.json" | ||
| Response.StatusCode = 500 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,36 @@ | ||
| # Telemetry payloads of the install hint. | ||
| # Telemetry payloads of the aitools commands and of the install hint. | ||
| # The mock server replaces raw.githubusercontent.com (skills manifest and files). | ||
| Env.DATABRICKS_SKILLS_BASE_URL = "$DATABRICKS_HOST" | ||
| Env.DATABRICKS_CLI_GITHUB_API_URL = "$DATABRICKS_HOST" | ||
| Env.DATABRICKS_SKILLS_REF = "test-ref" | ||
| RecordRequests = true | ||
|
|
||
| Ignore = [ | ||
| "home", | ||
| ] | ||
|
|
||
| [[Server]] | ||
| Pattern = "GET /test-ref/manifest.json" | ||
| Response.Body = ''' | ||
| { | ||
| "version": "2", | ||
| "updated_at": "2026-01-01T00:00:00Z", | ||
| "skills": { | ||
| "databricks-test": { | ||
| "version": "1.0.0", | ||
| "description": "Test skill", | ||
| "files": ["SKILL.md"], | ||
| "repo_dir": "skills" | ||
| } | ||
| } | ||
| } | ||
| ''' | ||
|
|
||
| [[Server]] | ||
| Pattern = "GET /test-ref/skills/databricks-test/SKILL.md" | ||
| Response.Body = '''--- | ||
| name: databricks-test | ||
| --- | ||
|
|
||
| # Test skill | ||
| ''' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] This parent config now sets
DATABRICKS_SKILLS_BASE_URL/DATABRICKS_SKILLS_REFand servesGET /test-ref/manifest.json, butinstall/test.tomlstill sets the same two variables and serves its own manifest on the same route. The leaf stub wins (acceptance/internal/prepare_server.go:248-251), soinstallruns againsttest-stablewhile its siblings usedatabricks-test, and a change to the parent manifest never reachesinstall..agents/rules/testing.mdasks to put commontest.tomloptions in the parent. Drop the duplicated env lines and stubs frominstall/test.toml(its output only says "Installed 1 skill."), or keep the new stubs in the new leaf directories sohint/andapps-init-tip/don't inherit them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 54514a6. Removed
install/test.toml:installnow uses the parent's env and manifest stubs like its siblings. Its output is unchanged ("Installed 1 skill.").