Skip to content

Add interactive pickers to aitools mcp add and remove - #7552

Merged
simonfaltum merged 1 commit into
mainfrom
aitools-mcp/09-pickers
Nov 19, 2026
Merged

simonfaltum merged 1 commit into
mainfrom
aitools-mcp/09-pickers

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

This pull request is part of the stack that adds the hidden databricks aitools mcp command group. It sits on #7595, which adds and removes agent MCP entries through each agent's own CLI.

databricks aitools mcp add and remove stopped in a terminal with "interactive selection is not available yet" when a flag was missing. This PR replaces that stopgap with pickers. Runs without a terminal keep their flags and output.

Changes

  • In a terminal, add asks for the profile, the services and the agents that the flags do not give. The profile resolves as it does without a terminal, so the picker runs only where that stops with several profiles.
  • add has its own agent picker rather than install's. Like the other mcp pickers, Esc cancels it, and its help says enter confirms.
  • At the catalog and schema prompt, Esc stops listing, as an empty answer does, and keeps the picks of the pages already shown. Ctrl-C still aborts the add.
  • A picker cancelled with Esc leaves nothing on screen.
  • A run that picks its services checks the profile and chooses the agents before it connects. A missing profile or no agent is refused without a request. A picked service whose recorded entry points at another host is refused after the pick, before anything is written.
  • The service picker marks services the profile already has as (installed), unchecked. "Another schema..." lists another catalog and schema and keeps the checks.
  • The profile picker rows have no [default] mark.
  • The plan says add, re-assert (only when the write leaves the entry as it is), update or replace. An agent whose config cannot be read is shown with the reason.
  • add asks Proceed? only when a picker made a choice. For each sign-in-required server it installed, it asks "Sign in now?" unless the caller is already signed in. Ctrl-C stops the remaining questions and prints the login command of each server still to sign in.
  • In a terminal, remove with none of --names, --profile or --all shows the installed servers and asks Proceed? before removing the picked ones.
  • add --no-login skips the sign-in question that a terminal asks for each sign-in-required server it installed. It cannot be combined with --login. Without a terminal, add already does not sign in.
  • An empty pick in the service picker prints No servers selected. and exits 0 without writing anything. It used to fail with INVALID_FLAGS.
  • The pickers share install's picker model, from aitools install: cancel the agent picker on Esc #7721: runPicker runs a built picker, newPicker takes the search func (nil for none), and the model gains an onKey hook and a search check that allows none.

Why

Choosing servers needs their descriptions and sign-in requirements, which the workspace knows and the flags do not show.

Decisions to review

  • Agents are chosen before the services, so a missing agent or a broken profile is reported before any request. Cost: the agent question comes first.
  • Esc at the catalog and schema prompt stops listing instead of aborting the add, so the picks already shown are kept. Cost: an Esc meant to abort keeps those picks; Ctrl-C aborts.
  • add has its own agent picker, so the two copies can drift apart.
  • A picked service is checked against its recorded entry only after the pick, so one stale entry of another service does not stop the picker.
  • Installed services are checkable rows, not disabled rows, because the picker library has no disabled options. Checking one re-asserts its entry, as add --names does.
  • --name without --names is refused rather than offered a single-select picker.

Tests

  • mcp_pickers_test.go covers the service and profile pickers, the agent picker's failed check and Esc, the location prompt's Esc, and the remove picker's refusal. mcp_add_test.go runs an interactive add through the prompt seams: refusals make no request, a changed host is refused after the pick, and a fully specified run asks only the sign-in question. TestMcpAddPickerEmptyPickAddsNothing covers the empty pick, and TestValidateMCPAddFlags the --login and --no-login conflict.
  • mcp_remove_test.go runs the remove picker end to end, including a declined confirmation.
  • ./task test-exp-aitools passes. go test -race ./cmd/aitools/ ./libs/aitools/... ./libs/cmdio/ and GOOS=windows vet pass.
  • Not tested: a real terminal and a live workspace. The prompts are covered through their seams.

How to review

Small edits outside the feature, about 15 lines in libs/cmdio/ (io.go, prompt.go, select.go), cmd/aitools/mcp.go, uninstall.go, and the moved multiSelectHelp constant in install.go. Read closely: cmd/aitools/mcp_pickers.go, the add flow in cmd/aitools/mcp_add.go (agent choice at its interactive branch, before the service pick), and cmd/aitools/mcp_remove.go.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Commit: be36588f3 | 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 (fd2f501) latest (v1.27.0)
TestAccept/cmd/aitools/mcp/help ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/hidden ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/help: branch ✅ | main (fd2f501) ❌ | latest (v1.27.0) ❌

main (fd2f501):

acceptance_test.go:1400: Diff:
        --- cmd/aitools/mcp/help/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcphelp1985821139/002/output.txt
        @@ -48,8 +48,7 @@
         last part of a service name, such as github, is enough when only one schema has it), --profile
         (every server of one profile), or --all. --profile also narrows --names or --all to one profile, and
         --agents narrows any of them to some agents.
        -In a terminal, with none of --names, --profile or --all, the command shows the installed servers to
        -choose from. Without a terminal, one of them is required.
        +Interactive selection is not available yet, so one of --names, --profile or --all is required.
         With --profile or --all and nothing installed to remove, the command succeeds and removes nothing.
         
         Only entries this CLI wrote are removed. An entry that this CLI did not write, and that is not a Databricks

latest (v1.27.0):

acceptance_test.go:1400: Diff:
        --- cmd/aitools/mcp/help/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcphelp2529351073/002/output.txt
        @@ -2,38 +2,27 @@
         === list and remove help show their examples
         
         >>> [CLI] aitools mcp list --help
        -List Databricks managed MCP servers installed by this CLI, grouped by profile, with the
        -coding agents each one is in. Entries that drifted from their profile or from the agent config are
        -reported. Entries in agent configs that this CLI did not write are listed as unmanaged and never changed.
        -Entries that run 'aitools mcp serve' but have no install record are listed as unmanaged too.
        +Install Databricks skills and plugins into your coding agent so it can work
        +effectively with Databricks resources (bundles, jobs, SQL, and more).
         
        -Each agent of a server has one of these statuses. The JSON output uses the same names, with underscores:
        -  installed        the entry is the one this CLI wrote
        -  changed          the entry still serves the server, but differs from what 'add' writes, for example in
        -                   an argument; running 'add' again repairs it
        -  modified         the entry was changed outside this CLI, so it no longer serves the server
        -  missing on disk  the entry is not in the agent config
        -  path changed     the agent now reads its config from another file
        -  unknown          the entry or the config could not be checked
        +Supported agents: Claude Code, Cursor, Codex CLI, OpenCode, GitHub Copilot, Antigravity, Pi, Gemini CLI, Goose, Kiro.
         
        ---profile lists the servers of that profile only. Unmanaged entries have no profile, so they are not
        -listed then.
        +Skills and plugins are sourced from
        +https://github.com/databricks/databricks-agent-skills
         
        -Without --check this command makes no network calls. With --check, a token is requested for each profile,
        -the sign-in state of each sign-in-required server is read, and the recorded binary is checked. It always exits 0
        -when entries have drifted or cannot be checked; an entry or agent config that cannot be checked is a warning.
        -
         Usage:
        -  databricks aitools mcp list [flags]
        +  databricks aitools [command]
         
        -Examples:
        -  databricks aitools mcp list
        -  databricks aitools mcp list --profile logfood
        -  databricks aitools mcp list --output json
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
         Flags:
        -      --check[=true|false]   Also check tokens, sign-in state and the recorded binary (uses the network)
        -  -h, --help[=true|false]    help for list
        +  -h, --help[=true|false]   help for aitools
         
         Global Flags:
               --debug[=true|false]   enable debug logging
        @@ -41,41 +23,35 @@
           -p, --profile string       ~/.databrickscfg profile
           -t, --target string        bundle target to use (if applicable)
         
        +Use "databricks aitools [command] --help" for more information about a command.
        +
         >>> [CLI] aitools mcp remove --help
        -Remove Databricks managed MCP servers that this CLI installed.
        +Install Databricks skills and plugins into your coding agent so it can work
        +effectively with Databricks resources (bundles, jobs, SQL, and more).
         
        -Choose servers with --names (server names as listed by 'aitools mcp list', or service names; the
        -last part of a service name, such as github, is enough when only one schema has it), --profile
        -(every server of one profile), or --all. --profile also narrows --names or --all to one profile, and
        ---agents narrows any of them to some agents.
        -In a terminal, with none of --names, --profile or --all, the command shows the installed servers to
        -choose from. Without a terminal, one of them is required.
        -With --profile or --all and nothing installed to remove, the command succeeds and removes nothing.
        +Supported agents: Claude Code, Cursor, Codex CLI, OpenCode, GitHub Copilot, Antigravity, Pi, Gemini CLI, Goose, Kiro.
         
        -Only entries this CLI wrote are removed. An entry that this CLI did not write, and that is not a Databricks
        -entry, is left in place, and the install record for its agent is dropped. A Databricks entry that was changed outside
        -this CLI is left in place and reported, and a --names run that names its server is refused. When an agent's config
        -moved, the entry is removed from the file it was written to and from the file the agent reads now.
        -Entries that run 'aitools mcp serve' without an install record are not chosen by any flag;
        -'aitools mcp list' shows them as unmanaged. Your sign-ins to services are kept; 'aitools mcp logout'
        -removes one.
        +Skills and plugins are sourced from
        +https://github.com/databricks/databricks-agent-skills
         
         Usage:
        -  databricks aitools mcp remove [flags]
        +  databricks aitools [command]
         
        -Examples:
        -  databricks aitools mcp remove --names github-logfood
        -  databricks aitools mcp remove --profile logfood --agents cursor
        -  databricks aitools mcp remove --all
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
         Flags:
        -      --agents string       Agents to remove from, comma-separated (default: every agent the server is installed for)
        -      --all[=true|false]    Remove every server this CLI installed
        -  -h, --help[=true|false]   help for remove
        -      --names string        Servers to remove: server names or service names, comma-separated
        +  -h, --help[=true|false]   help for aitools
         
         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)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
TestAccept/cmd/aitools/mcp/hidden: branch ✅ | main (fd2f501) ❌ | latest (v1.27.0) ❌

main (fd2f501):

acceptance_test.go:1400: Diff:
        --- cmd/aitools/mcp/hidden/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcphidden4245819854/002/output.txt
        @@ -39,12 +39,10 @@
         
         Services come from --names: full names such as system.ai.github, or leaf names such as github. Leaf names
         resolve in --location, which defaults to system.ai, or to the one schema that the full names in --names share when there are no leaf names.
        -Agents come from --agents.
        +Agents come from --agents. Without it, every detected MCP-capable agent is used.
         
        -In a terminal, the command asks for whatever is not given: the profile, the servers and the agents (detected
        -agents are pre-checked). It confirms the plan when it asked for any of them, and it asks before each sign-in unless
        ---login or --no-login is given. Without a terminal, --names is required and the agents default to every detected
        -MCP-capable agent. With --output json, --names and --agents are required.
        +Interactive selection is not available yet: in a terminal, pass both --names and --agents.
        +With --output json, both are required.
         
         Supported agents: claude-code, cursor, codex, opencode, copilot, antigravity, gemini
         
        @@ -56,14 +53,13 @@
           databricks aitools mcp add --names github,web_search --agents claude-code,cursor --profile dogfood
         
         Flags:
        -      --agents string           Agents to install for, comma-separated (default: a picker in a terminal; otherwise every detected MCP-capable agent)
        -      --force[=true|false]      Overwrite an existing server with the same name that this CLI did not write
        -  -h, --help[=true|false]       help for add
        -      --location string         Schema to resolve leaf names in, as <catalog>.<schema> (default: system.ai, or the one schema that the full names in --names share when there are no leaf names)
        -      --login[=true|false]      Sign in to each sign-in-required server that was installed, after the installs
        -      --name string             Server name to use instead of the generated one; only with exactly one service
        -      --names string            Services to install: full names (system.ai.github) or leaf names (github), comma-separated
        -      --no-login[=true|false]   Do not sign in; print the login commands for sign-in-required servers (default without a terminal; in a terminal, the default asks for each one)
        +      --agents string        Agents to install for, comma-separated (default: every detected MCP-capable agent)
        +      --force[=true|false]   Overwrite an existing server with the same name that this CLI did not write
        +  -h, --help[=true|false]    help for add
        +      --location string      Schema to resolve leaf names in, as <catalog>.<schema> (default: system.ai, or the one schema that the full names in --names share when there are no leaf names)
        +      --login[=true|false]   Sign in to each sign-in-required server that was installed, after the installs
        +      --name string          Server name to use instead of the generated one; only with exactly one service
        +      --names string         Services to install: full names (system.ai.github) or leaf names (github), comma-separated
         
         Global Flags:
               --debug[=true|false]   enable debug logging
        
    acceptance_test.go:1178: 
        LOG.aitools-help: Install Databricks skills and plugins into your coding agent so it can work
        LOG.aitools-help: effectively with Databricks resources (bundles, jobs, SQL, and more).
        LOG.aitools-help: 
        LOG.aitools-help: Supported agents: Claude Code, Cursor, Codex CLI, OpenCode, GitHub Copilot, Antigravity, Pi, Gemini CLI, Goose, Kiro.
        LOG.aitools-help: 
        LOG.aitools-help: Skills and plugins are sourced from
        LOG.aitools-help: https://github.com/databricks/databricks-agent-skills
        LOG.aitools-help: 
        LOG.aitools-help: Usage:
        LOG.aitools-help:   databricks aitools [command]
        LOG.aitools-help: 
        LOG.aitools-help: Available Commands:
        LOG.aitools-help:   auto-install Turn the automatic installation of Databricks AI tools on or off
        LOG.aitools-help:   install      Install Databricks skills and plugins for coding agents
        LOG.aitools-help:   list         List installed skills and plugins
        LOG.aitools-help:   uninstall    Uninstall Databricks skills and plugins
        LOG.aitools-help:   update       Update installed skills and plugins
        LOG.aitools-help:   version      Show installed skills and plugins version
        LOG.aitools-help: 
        LOG.aitools-help: Flags:
        LOG.aitools-help:   -h, --help[=true|false]   help for aitools
        LOG.aitools-help: 
        LOG.aitools-help: Global Flags:
        LOG.aitools-help:       --debug[=true|false]   enable debug logging
        LOG.aitools-help:   -o, --output type          output type: text or json (default text)
        LOG.aitools-help:   -p, --profile string       ~/.databrickscfg profile
        LOG.aitools-help:   -t, --target string        bundle target to use (if applicable)
        LOG.aitools-help: 
        LOG.aitools-help: Use "databricks aitools [command] --help" for more information about a command.
FAIL

latest (v1.27.0):

acceptance_test.go:1400: Diff:
        --- cmd/aitools/mcp/hidden/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcphidden422961597/002/output.txt
        @@ -7,23 +7,27 @@
         === The hidden group still answers help for its subcommands
         
         >>> [CLI] aitools mcp --help
        -Databricks managed MCP servers give coding agents tools for Databricks services, such as GitHub or web search.
        -Use 'add' to install them into coding agents, bound to a Databricks profile, 'list' to see what is installed,
        -and 'remove' to uninstall them. Some services use your account with an external provider, such as GitHub:
        -'login' signs you in to one and 'logout' removes the sign-in.
        +Install Databricks skills and plugins into your coding agent so it can work
        +effectively with Databricks resources (bundles, jobs, SQL, and more).
         
        +Supported agents: Claude Code, Cursor, Codex CLI, OpenCode, GitHub Copilot, Antigravity, Pi, Gemini CLI, Goose, Kiro.
        +
        +Skills and plugins are sourced from
        +https://github.com/databricks/databricks-agent-skills
        +
         Usage:
        -  databricks aitools mcp [command]
        +  databricks aitools [command]
         
         Available Commands:
        -  add         Install Databricks managed MCP servers into coding agents
        -  list        List Databricks managed MCP servers installed by this CLI
        -  login       Sign in to a Databricks managed MCP service with your account
        -  logout      Remove your sign-in to a Databricks managed MCP service
        -  remove      Remove Databricks managed MCP servers from coding agents
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
         Flags:
        -  -h, --help[=true|false]   help for mcp
        +  -h, --help[=true|false]   help for aitools
         
         Global Flags:
               --debug[=true|false]   enable debug logging
        @@ -31,42 +29,35 @@
           -p, --profile string       ~/.databrickscfg profile
           -t, --target string        bundle target to use (if applicable)
         
        -Use "databricks aitools mcp [command] --help" for more information about a command.
        +Use "databricks aitools [command] --help" for more information about a command.
         
         >>> [CLI] aitools mcp add --help
        -Install Databricks managed MCP servers into coding agents, bound to a Databricks profile.
        -Each server runs through 'databricks aitools mcp serve' with that profile's credentials.
        +Install Databricks skills and plugins into your coding agent so it can work
        +effectively with Databricks resources (bundles, jobs, SQL, and more).
         
        -Services come from --names: full names such as system.ai.github, or leaf names such as github. Leaf names
        -resolve in --location, which defaults to system.ai, or to the one schema that the full names in --names share when there are no leaf names.
        -Agents come from --agents.
        +Supported agents: Claude Code, Cursor, Codex CLI, OpenCode, GitHub Copilot, Antigravity, Pi, Gemini CLI, Goose, Kiro.
         
        -In a terminal, the command asks for whatever is not given: the profile, the servers and the agents (detected
        -agents are pre-checked). It confirms the plan when it asked for any of them, and it asks before each sign-in unless
        ---login or --no-login is given. Without a terminal, --names is required and the agents default to every detected
        -MCP-capable agent. With --output json, --names and --agents are required.
        +Skills and plugins are sourced from
        +https://github.com/databricks/databricks-agent-skills
         
        -Supported agents: claude-code, cursor, codex, opencode, copilot, antigravity, gemini
        -
         Usage:
        -  databricks aitools mcp add [flags]
        +  databricks aitools [command]
         
        -Examples:
        -  # Install GitHub and web search for Claude Code and Cursor, bound to the dogfood profile
        -  databricks aitools mcp add --names github,web_search --agents claude-code,cursor --profile dogfood
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
         Flags:
        -      --agents string           Agents to install for, comma-separated (default: a picker in a terminal; otherwise every detected MCP-capable agent)
        -      --force[=true|false]      Overwrite an existing server with the same name that this CLI did not write
        -  -h, --help[=true|false]       help for add
        -      --location string         Schema to resolve leaf names in, as <catalog>.<schema> (default: system.ai, or the one schema that the full names in --names share when there are no leaf names)
        -      --login[=true|false]      Sign in to each sign-in-required server that was installed, after the installs
        -      --name string             Server name to use instead of the generated one; only with exactly one service
        -      --names string            Services to install: full names (system.ai.github) or leaf names (github), comma-separated
        -      --no-login[=true|false]   Do not sign in; print the login commands for sign-in-required servers (default without a terminal; in a terminal, the default asks for each one)
        +  -h, --help[=true|false]   help for aitools
         
         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)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        
    acceptance_test.go:1178: 
        LOG.aitools-help: Install Databricks skills and plugins into your coding agent so it can work
        LOG.aitools-help: effectively with Databricks resources (bundles, jobs, SQL, and more).
        LOG.aitools-help: 
        LOG.aitools-help: Supported agents: Claude Code, Cursor, Codex CLI, OpenCode, GitHub Copilot, Antigravity, Pi, Gemini CLI, Goose, Kiro.
        LOG.aitools-help: 
        LOG.aitools-help: Skills and plugins are sourced from
        LOG.aitools-help: https://github.com/databricks/databricks-agent-skills
        LOG.aitools-help: 
        LOG.aitools-help: Usage:
        LOG.aitools-help:   databricks aitools [command]
        LOG.aitools-help: 
        LOG.aitools-help: Available Commands:
        LOG.aitools-help:   auto-install Turn the automatic installation of Databricks AI tools on or off
        LOG.aitools-help:   install      Install Databricks skills and plugins for coding agents
        LOG.aitools-help:   list         List installed skills and plugins
        LOG.aitools-help:   uninstall    Uninstall Databricks skills and plugins
        LOG.aitools-help:   update       Update installed skills and plugins
        LOG.aitools-help:   version      Show installed skills and plugins version
        LOG.aitools-help: 
        LOG.aitools-help: Flags:
        LOG.aitools-help:   -h, --help[=true|false]   help for aitools
        LOG.aitools-help: 
        LOG.aitools-help: Global Flags:
        LOG.aitools-help:       --debug[=true|false]   enable debug logging
        LOG.aitools-help:   -o, --output type          output type: text or json (default text)
        LOG.aitools-help:   -p, --profile string       ~/.databrickscfg profile
        LOG.aitools-help:   -t, --target string        bundle target to use (if applicable)
        LOG.aitools-help: 
        LOG.aitools-help: Use "databricks aitools [command] --help" for more information about a command.
FAIL

@simonfaltum
simonfaltum changed the base branch from aitools-mcp/07-login to aitools-mcp/08-challenge November 12, 2026 13:02
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from f9ffc67 to 2dd54b7 Compare November 12, 2026 13:02
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: be36588

Run: 44573635041

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 21 15:09
💚​ aws-windows-latest-4core-16gb 1 274 19 9:37
💚​ azure linux-2core-8gb 1 271 21 11:49
💚​ azure-windows-latest-4core-16gb 1 273 19 12:44
💚​ gcp linux-2core-8gb 1 272 21 13:05
💚​ gcp-windows-latest-4core-16gb 1 274 19 8:34
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
Top 27 slowest tests (at least 2 minutes):
duration env testname
5:11 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
4:33 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsStat
4:23 azure-windows-latest-4core-16gb TestAccept
4:07 azure-windows-latest-4core-16gb TestFilerReadWrite/workspace_files_extensions
3:58 aws linux-2core-8gb TestImportDirDoesNotOverwrite
3:42 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
3:31 gcp-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files
3:24 aws linux-2core-8gb TestImportDir
3:23 gcp-windows-latest-4core-16gb TestAccept
3:18 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
3:14 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
3:13 aws-windows-latest-4core-16gb TestAccept
3:02 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
2:52 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
2:49 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:47 azure-windows-latest-4core-16gb TestSyncIncrementalFileSync
2:43 aws-windows-latest-4core-16gb TestExportDir
2:39 azure linux-2core-8gb TestImportDirDoesNotOverwrite
2:30 aws-windows-latest-4core-16gb TestSyncFullFileSync
2:30 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
2:30 azure-windows-latest-4core-16gb TestSyncNestedFolderDoesntFailOnNonEmptyDirectory
2:24 aws-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
2:23 azure linux-2core-8gb TestImportDirWithOverwriteFlag
2:22 aws-windows-latest-4core-16gb TestImportDirDoesNotOverwrite
2:09 azure-windows-latest-4core-16gb TestExportDir
2:06 aws linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
2:00 aws-windows-latest-4core-16gb TestSyncIncrementalFileSync

@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 38cdd13 to 1d8e6b3 Compare November 12, 2026 14:42
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from 2dd54b7 to a1fd867 Compare November 12, 2026 14:44
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 1d8e6b3 to 7b98424 Compare November 12, 2026 17:14
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from a1fd867 to b90afff Compare November 12, 2026 17:15
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch 2 times, most recently from 1c6aee6 to 7a9dca9 Compare November 13, 2026 07:25
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch 2 times, most recently from 0aa2ee4 to 2dbdfe3 Compare November 13, 2026 12:28
@simonfaltum
simonfaltum changed the base branch from aitools-mcp/08-challenge to aitools-mcp/08b-agent-clis November 13, 2026 12:28
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from 1fff1da to e9bad5b Compare November 13, 2026 13:28
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 3ed1398 to 8cca61b Compare November 13, 2026 15:06
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from b30caa0 to 43a64fd Compare November 13, 2026 15:06
@pietern pietern added the aitools AI tools (databricks aitools) related changes label Nov 16, 2026
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from 43a64fd to b12f2bf Compare November 16, 2026 12:47
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch 2 times, most recently from 50318b1 to f46d6a0 Compare November 16, 2026 13:19
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from b12f2bf to 1ee83b9 Compare November 16, 2026 13:19
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from f46d6a0 to d049189 Compare November 16, 2026 13:32
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch 2 times, most recently from 29624cd to a7c5766 Compare November 16, 2026 14:49
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch 2 times, most recently from 6955d59 to 84abb41 Compare November 16, 2026 15:14
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch 2 times, most recently from 52a1885 to e652cdf Compare November 16, 2026 15:53
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 190f3cb to fdc9d71 Compare November 17, 2026 10:52
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 10594fe to b4386f3 Compare November 17, 2026 19:58
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch 2 times, most recently from 201f9a7 to ffc760f Compare November 17, 2026 22:17
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from b4386f3 to 114dcaf Compare November 17, 2026 22:17
@simonfaltum
simonfaltum marked this pull request as ready for review November 18, 2026 16:21
@simonfaltum
simonfaltum requested review from a team and lennartkats-db as code owners November 18, 2026 16:21
// login hint of each server not signed in, and returns the abort.
// TestSignedInGivesUpOnAHungCredentialRead checks that a credential read that never answers ends at profileCheckTimeout,
// so the sign-in question is asked, instead of holding it for the SDK's whole retry budget.
func TestSignedInGivesUpOnAHungCredentialRead(t *testing.T) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The doc comment for TestSignInInstalledAbortPrintsTheRestOfTheHints (line 2106-2107) is concatenated above TestSignedInGivesUpOnAHungCredentialRead, so godoc ascribes both descriptions to this function. TestSignInInstalledAbortPrintsTheRestOfTheHints at line 2131 ends up with no comment. Split the two blocks to their respective functions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved it above its own function in 5236316.

@anton-107 anton-107 left a comment

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.

Reviewed the diff against the base merge point (114dcaf5f). It's a two-way door: the command group is hidden, the state format doesn't change, and the only exported addition is cmdio.ErrCtrlC.

I checked the order in runMcpAdd: profile, then CheckProfile/checkBindings, then the agent pick, then the refusals, then connect, the service pick, the post-pick checkBindings, the plan and the writes. Nothing reaches the workspace before the agent and profile refusals, and nothing is written before the post-pick binding check. Unit tests (-race) and TestAccept/cmd/aitools pass locally. I also ran mcp remove in a real PTY (80x24): Esc at the picker and at Proceed? both end with "user aborted", the plan prints before the confirm, and Enter removes only the picked server.

Non-blocking notes:

  • In mcp add, the agent picker is install's defaultPromptAgentSelection. It still ignores Esc (huh's default Quit is ctrl+c only) and says "enter to install". The profile, service, location, sign-in and Proceed prompts all cancel on Esc, so one run mixes both behaviours.
  • Esc in the "Another schema..." location prompt aborts the whole add, which drops the picks from earlier pages, although the title says "leave empty to stop".
  • profilePickerActive/profilePickerInactive render [default] through IsDefault, but promptProfile never sets SelectConfig.Default, and the picker only runs when there is no default profile. That branch never runs.
  • The doc comment on multiSelectHelp (install.go) says install uses it, but install's agent picker has its own "space to toggle, enter to install". The constant is only used by the mcp pickers, so it could live in mcp_pickers.go.

@simonfaltum

Copy link
Copy Markdown
Member Author

Thanks! All four are in ed5d9ce:

  • mcp add has its own agent picker now, built like the other mcp pickers: Esc cancels it, and the help says enter confirms.
  • Esc at the location prompt stops listing, as an empty answer does, so the picks on earlier pages are kept. Ctrl+C still aborts.
  • The [default] branch is gone from the profile picker rows.
  • multiSelectHelp moved to mcp_pickers.go.

A picker cancelled with Esc also leaves nothing on screen now, as in #7721.

@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 686894a to 8898daf Compare November 19, 2026 11:42
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from b32f61f to 9cb89d5 Compare November 19, 2026 11:42
@simonfaltum

Copy link
Copy Markdown
Member Author

Heads-up after the restack onto main. #7721 added its own pickerModel, newPicker and runPicker in install.go, so this PR now uses that model instead of defining a second one: runPicker takes a built picker, newPicker takes the search func (nil for none), and the model gains this PR's onKey hook and a search check that allows none. The mcp pickers and install's picker behave as before, and their tests pass unchanged.

@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 8898daf to 03d0647 Compare November 19, 2026 16:25
Base automatically changed from aitools-mcp/08b-agent-clis to main November 19, 2026 17:04
One commit for the restack onto main. The individual commits, up to b32f61f, are in the pull request's history.

Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum
simonfaltum force-pushed the aitools-mcp/09-pickers branch from 9cb89d5 to be36588 Compare November 19, 2026 17:06
@simonfaltum
simonfaltum added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit ae033ef Nov 19, 2026
28 checks passed
@simonfaltum
simonfaltum deleted the aitools-mcp/09-pickers branch November 19, 2026 17:42
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

❌ Integration test report

Commit: ae033ef

Run: 44580284624

Env 💥​PANIC ❌​FAIL 🟨​KNOWN 🤯​MISS 💚​RECOVERED ✅​pass 🙈​skip Time
💥​ aws linux-2core-8gb 1 255 20 1354 1416 320:00
🤯​ aws-windows-latest-4core-16gb 222 26 1298 1444 320:00
💥​ azure linux-2core-8gb 1 12 149 14 1434 1424 320:00
💥​ azure-windows-latest-4core-16gb 1 9 106 17 1393 1452 320:00
💥​ gcp linux-2core-8gb 1 197 26 1393 1422 320:00
💥​ gcp-windows-latest-4core-16gb 1 2 197 20 1313 1450 320:00
778 interesting tests: 745 MISS, 14 RECOVERED, 12 KNOWN, 5 PANIC, 2 FAIL
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 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/apps/job_permissions 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/apps/job_permissions/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/apps/job_permissions/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_doesnot_exist 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_doesnot_exist/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_doesnot_exist/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_not_deployed 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_not_deployed/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_not_deployed/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cli_defaults 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/cli_defaults/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/cli_defaults/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_permissions 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_permissions/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_permissions/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/config_edits 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/config_edits/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/config_edits/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/dashboard_etag 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/dashboard_etag/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/dashboard_etag/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/external_cluster_policy_cross_target 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/external_cluster_policy_cross_target/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/external_cluster_policy_cross_target/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/flushed_cache 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/flushed_cache/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/flushed_cache/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/formatting_preserved 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/formatting_preserved/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/formatting_preserved/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/job_fields 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/job_fields/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/job_fields/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/job_multiple_tasks 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/job_multiple_tasks/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/job_multiple_tasks/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/job_params_variables 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/job_params_variables/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/job_params_variables/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/job_pipeline_task 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/job_pipeline_task/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/job_pipeline_task/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/json_status_missing_state 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/json_status_missing_state/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/json_status_missing_state/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/json_status_selectors 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/json_status_selectors/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/json_status_selectors/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/multiple_files 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/multiple_files/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/multiple_files/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/multiple_resources 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/multiple_resources/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/output_json 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/output_json/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/output_json/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/output_no_changes 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/output_no_changes/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/output_no_changes/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/pipeline_fields 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/pipeline_fields/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/pipeline_fields/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/resolve_variables 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/resolve_variables/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/resolve_variables/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/select_basic 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/select_basic/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/select_basic/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/select_multiple 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/select_multiple/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/select_multiple/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/skip_deployment 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/skip_deployment/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/skip_deployment/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/skip_permissions 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/skip_permissions/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/skip_permissions/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/target_override 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/target_override/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/target_override/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/task_rename_revert 🤯​M 🙈​s ✅​p 🙈​s ✅​p 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/task_rename_revert/DMS= 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/config-remote-sync/task_rename_revert/DMS=true 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/debug/fetch-repository-info 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/debug/fetch-repository-info/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/debug/fetch-repository-info/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle 🤯​M ✅​p ✅​p 🤯​M ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=/DMS= 🤯​M ✅​p ✅​p 🤯​M ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=/DMS=true 🤯​M ✅​p ✅​p 🤯​M ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=true/DMS= 🤯​M ✅​p ✅​p 🤯​M ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=true/DMS=true 🤯​M ✅​p ✅​p 🤯​M ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/files/no-snapshot-sync 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/files/no-snapshot-sync/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/files/no-snapshot-sync/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/basic 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/basic/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/breakglass 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/breakglass/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/can-manage 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/can-manage/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/destroy-redeploy 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/destroy-redeploy/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/dev-mode 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/dev-mode/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/legacy-state 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/legacy-state/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/missing-snapshot 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/missing-snapshot/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/no-artifacts 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/no-artifacts/DMS=/READPLAN= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/no-artifacts/DMS=/READPLAN=1 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/permissions-change 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/permissions-change/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/select 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/select/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/mlops-stacks 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/mlops-stacks/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/mlops-stacks/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/spark-jar-task 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/spark-jar-task/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deploy/spark-jar-task/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🟨​ TestAccept/bundle/deployment/bind/alert 🤯​M 💚​R 🟨​K 🟨​K 💚​R 🤯​M
🟨​ TestAccept/bundle/deployment/bind/alert/DMS= 🤯​M 💚​R 🟨​K 🟨​K 💚​R 🤯​M
🟨​ TestAccept/bundle/deployment/bind/alert/DMS=true 🤯​M 💚​R 🟨​K 🟨​K 💚​R 🤯​M
🤯​ TestAccept/bundle/deployment/bind/catalog 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/catalog/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/catalog/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/cluster 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/cluster/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/cluster/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/DMS=/READPLAN= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/DMS=/READPLAN=1 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/DMS=true/READPLAN= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/DMS=true/READPLAN=1 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/recreation 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=1 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=1 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/experiment 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/experiment/DMS= 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
🤯​ TestAccept/bundle/deployment/bind/experiment/DMS=true 🤯​M ✅​p ✅​p ✅​p ✅​p 🤯​M
Top 50 slowest tests (at least 2 minutes):
duration env testname
16:31 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
16:29 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
15:17 aws linux-2core-8gb TestAccept/bundle/resources/materialization_sets/immutable/DMS=
13:22 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
12:13 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
12:12 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
12:05 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
11:29 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
11:05 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
11:03 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:28 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
10:22 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:10 gcp-windows-latest-4core-16gb TestAccept/bundle/templates/default-python/integration_classic/DMS=/UV_PYTHON=3.13
10:04 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
10:03 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
9:48 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=true
9:39 azure linux-2core-8gb TestAccept/bundle/quiet-levels/DMS=
9:35 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
9:21 gcp linux-2core-8gb TestAccept/bundle/resources/materialization_sets/immutable/DMS=true
9:10 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=
8:56 gcp linux-2core-8gb TestAccept/bundle/resources/materialization_sets/immutable/DMS=
8:37 azure-windows-latest-4core-16gb TestAccept/pipelines/run/refresh-flags
8:28 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
8:26 aws-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/immutable/DMS=
8:25 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=true
8:23 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=
8:18 aws-windows-latest-4core-16gb TestAccept/bundle/resources/jobs/fail-on-active-runs/DMS=
8:17 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:15 aws linux-2core-8gb TestAccept/bundle/resources/materialization_sets/batch/DMS=
8:12 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=true
8:10 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:05 gcp-windows-latest-4core-16gb TestAccept/bundle/templates/default-python/combinations/serverless/DLT=yes/DMS=/NBOOK=yes/PY=yes/READPLAN=
8:05 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:03 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:00 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
8:00 aws-windows-latest-4core-16gb TestAccept/bundle/quiet-levels/DMS=true
7:58 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:55 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:52 aws-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/immutable/DMS=true
7:48 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:38 gcp-windows-latest-4core-16gb TestAccept/bundle/templates/default-python/combinations/classic/DLT=no/DMS=/NBOOK=no/PY=yes/READPLAN=1
7:32 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:28 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:22 azure linux-2core-8gb TestAccept/bundle/quiet-levels/DMS=true
7:18 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:12 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/no_drift/DMS=true/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
7:11 gcp-windows-latest-4core-16gb TestAccept/bundle/templates/default-python/combinations/serverless/DLT=yes/DMS=/NBOOK=no/PY=yes/READPLAN=1
7:07 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
7:06 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=
7:06 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
(624 table rows omitted to keep the report under 60000 bytes)

idelafuente-oc pushed a commit to idelafuente-oc/cli that referenced this pull request Nov 20, 2026
…cks#7804)

## Changes

Fix a race in the interactive list pager (`libs/cmdio/pager.go`) that
could drop or reorder a page of rows, and the macOS flake it caused in
`TestPagedTemplateRespectsLimit`.

A non-final page was printed by returning a bare `tea.Println` cmd.
bubbletea runs every returned cmd on its own goroutine, so nothing
ordered that print before later messages. When ENTER (or SPACE) started
the next fetch and that page was the last one, its `tea.Sequence(print,
tea.Quit)` could reach the event loop first, and the program quit before
the earlier page was printed. In the test (page size 5, limit 7) that
leaves only the last 2 rows: `expected: 7, actual: 2`.

A non-final page is now followed by a `pagePrintedMsg` in the same
`tea.Sequence` as its print. `tea.Sequence` delivers each message before
running the next cmd, and `p.Send` is unbuffered, so when
`pagePrintedMsg` arrives the page's lines are already queued. Until then
a new `printing` flag holds keys back: SPACE is ignored, ENTER sets
`drainAll`, and `q`/`esc`/Ctrl+C set `quitPending`. The `pagePrintedMsg`
handler then quits or chains the next fetch, replacing the old
`Sequence(print, fetch)` branch. `View` is unchanged: the prompt shows
as soon as the batch arrives.

Also in the tests: `countContentLines` and
`TestPagedTemplateMatchesNonPagedForSmallList` now read the output the
way a terminal shows it, keeping only the text after each line's last
`\r`. tea redraws its spinner and prompt in place, so plain ANSI
stripping left that text glued to real rows (`"\r⣽ loading...\r1 1"`).
`TestPagedTemplateMatchesNonPagedForSmallList` failed once that way, and
`countContentLines` would skip a row that lands on the prompt's line.

Introduced with the pager in databricks#5015.

## Why

Users can lose rows of `list` output in the pager. It is rare at human
typing speed, but it fails CI on unrelated PRs (macOS runners).

## Tests

- New `TestPagerModelKeysWaitForPagePrint` and
`TestPagerModelQuitWaitsForPagePrint` fail without the fix (SPACE/ENTER
fetch, q quits, before the page is printed).
`TestPagedTemplateDrainsFullIterator` now checks row order, not just
presence. Updated `TestPagerModelBatchPromptsWhenMore` and
`TestPagerModelBatchDrainingChainsFetch` to the new message flow.
- Reproduced the flake deterministically by adding a 20ms sleep to the
page print cmd: before the fix, `TestPagedTemplateDrainsFullIterator`
got 18 of 23 rows and `TestPagedTemplateRespectsLimit` 2 of 7. With the
fix, every `TestPagedTemplate*` passes with the sleep in place.
- `go test -race ./libs/cmdio/ -count=200`, `go test ./libs/cmdio/
-count=1000` and `GOMAXPROCS=1 ... -count=200` pass.

## Dashboard

| error / test | failure |
|---|---|
|
[error/3590](http://go/cli/dashboard/error/3590?main=1&pr=1&end=2026-11-19T12:00:00Z&last=7d)
| `paged_template_test.go:90: Not equal: expected: 7 actual : 2` (3
failures in 3 days, macOS, PRs databricks#4738, databricks#7552, databricks#7780) |
|
[libs/cmdio.TestPagedTemplateRespectsLimit](http://go/cli/dashboard/test/libs/cmdio.TestPagedTemplateRespectsLimit?main=1&pr=1&end=2026-11-19T12:00:00Z&last=7d)
| same |
|
[libs/cmdio.TestPagedTemplateMatchesNonPagedForSmallList](http://go/cli/dashboard/test/libs/cmdio.TestPagedTemplateMatchesNonPagedForSmallList?main=1&pr=1&end=2026-11-19T12:00:00Z&last=7d)
| `expected: "1 1" actual : "\r⣽ loading...\r1 1"` (1 failure,
2026-11-16, Windows) |

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
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.

4 participants