Skip to content

Apply the not-an-agent header guard to the remaining CLI SDK clients - #8144

Open
simonfaltum wants to merge 6 commits into
skills/noagentsdk-the-sdk-agent-header-follows-databricksfrom
skills/noagentsdk2-apply-the-agent-header-guard-to-the-rema
Open

simonfaltum wants to merge 6 commits into
skills/noagentsdk-the-sdk-agent-header-follows-databricksfrom
skills/noagentsdk2-apply-the-agent-header-guard-to-the-rema

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

This pull request is stacked on #8143 and merges after it. The CLI commands that build their own SDK config still sent the agent/<name> User-Agent token under DATABRICKS_NOT_AN_AGENT, so this change applies the guard to those configs.

Changes

  • Under DATABRICKS_NOT_AN_AGENT, the clients built outside the root command path now drop the agent token: auth login (cluster picker and workspace list), auth describe, auth profiles, auth docker, configure --configure-cluster, aitools mcp (add and serve), the labs entrypoint, installer and login, api, and the experimental SSH upload client.
  • Each site calls agent.ApplyNotAnAgentHeader before its client is built, after any transport the site sets.
  • The transport wrapper forwards SkipRetryOnIO from its base. The SDK checks that method on cfg.HTTPTransport, so fixture transports keep their skip-retry behaviour.
  • Without the variable the helper returns before it touches the config, so headers and configs are unchanged.
  • The picked-profile fallbacks in cmd/root and the bundle workspace test come from the parent pull request. This branch no longer changes them.

Why

The root and bundle clients already drop the token. The other sites build their own config, and the SDK has no per-client option for this, so each site wraps its own config.

Decisions to review

  • guardedClient in cmd/aitools/mcp_serve.go now takes a context.Context, so the guard reads the same environment as the command.
  • Not every site has a test. auth login, auth docker, configure, aitools mcp add, the labs installer and login, and the picked-profile fallbacks get the same call but no check, because they need an interactive prompt or a populated profile store. The checks cover api, auth describe, auth profiles, the labs cluster client, the SSH upload client and mcp serve's client.
  • No changelog fragment. DATABRICKS_NOT_AN_AGENT is read without the preview gate, but it is meant for evals and internal use, so its entry goes in at launch.

Tests

  • TestNoAgentHeaderTransportForwardsSkipRetryOnIO covers the forwarded method for a fixture transport and a plain one.
  • User-Agent checks with the variable set and unset: TestGuardedClientNotAnAgentDropsAgentHeader, TestNewHTTP11WorkspaceClientNotAnAgentDropsAgentHeader, TestEnsureRunningClusterNotAnAgentDropsAgentHeader and TestProfileLoadNotAnAgentDropsAgentHeader.
  • TestWorkspaceClientNotAnAgentWrapsTransport in bundle/config (from the parent) checks the bundle client's transport with the variable set and unset. It has no Windows skip.
  • Acceptance cmd/api/not-an-agent and cmd/auth/describe/not-an-agent record the request User-Agent with and without the variable.
  • Acceptance areas cmd/api, cmd/auth, cmd/aitools, cmd/configure and cmd/skills pass with no existing golden changed. ./task --force fmt-q lint-q reports 0 issues.
  • Not tested on Windows locally. The Windows CI cell is the check for the bundle test without its skip.

This pull request and its description were written by Isaac.

…clients

The root and bundle clients drop the SDK agent token from User-Agent under
DATABRICKS_NOT_AN_AGENT, but the commands that build their own SDK config
still sent it. Call ApplyNotAnAgentHeader on those configs before their
clients are built, after any transport a site sets: auth login, auth
describe, auth profiles, auth docker, configure, aitools mcp, labs, the api
command, the experimental ssh upload client, and the root picked-profile
fallbacks.

The wrapper now forwards SkipRetryOnIO from its base, which the SDK checks on
cfg.HTTPTransport, so fixture transports keep their skip-retry behaviour.

The Windows skip in the bundle config test is dropped. Listener-based tests
such as cmd/root and bundle/generate run on the Windows CI cell without a skip.

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

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: b0d95ed71 | Workflow run

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

3 tests: regression=3 unreleased=0 coverage=0 failing=0
test branch main (e6f3460) latest (v1.28.0)
TestAccept/cmd/aitools/not-an-agent ✅ ❌ ❌
TestAccept/cmd/api/not-an-agent ✅ ❌ ❌
TestAccept/cmd/auth/describe/not-an-agent ✅ ❌ ❌
TestAccept/cmd/aitools/not-an-agent: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌

main (e6f3460):

acceptance_test.go:1406: Diff:
        --- cmd/aitools/not-an-agent/output.txt
        +++ /tmp/TestAcceptcmdaitoolsnot-an-agent1850608986/002/output.txt
        @@ -18,61 +18,35 @@
         === With the variable set, no hint is printed
         
         >>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] jobs list
        +Before you work with Databricks, run: databricks skills list
         
         === Without the variable, the hint still shows on the same session
         
         >>> CLAUDECODE=1 [CLI] jobs list
        -Before you work with Databricks, run: databricks skills list
         
         === With the variable set, the help has no skills footer
         
         >>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] fs --help
        -  -t, --target string        bundle target to use (if applicable)
         
        -Use "databricks fs [command] --help" for more information about a command.
        +Coding agents: read the skills for this command group before you use it.
        +  databricks skills read demo-skill
         
         >>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] --help
         
        -Use "databricks [command] --help" for more information about a command.
        +Coding agents: run `databricks skills list` to find skills for the commands you use.
         
         === With the variable set, quickstart prints the human guide
         
         >>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] quickstart
        -# Welcome to Databricks
        +# Databricks Quickstart
         
         >>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] quickstart
        +contains error: 'databricks skills list' was not expected: "- **Reason, don't refuse.** Before telling the user something can't be done, run `databricks <group> --help` and find the matching skill with `databricks skills list` (below). Almost everything is reachable through the CLI."
        +contains error: 'databricks skills list' was not expected: 'Find the bundle skill in `databricks skills list` and read it for bundle structure, resource schemas, and multi-target setup.'
        +contains error: 'databricks skills list' was not expected: '**Databricks Apps** (full-stack TypeScript + React via AppKit) build on bundles too, with a dedicated scaffolder — see the apps skill in `databricks skills list`:'
        +contains error: 'databricks skills list' was not expected: 'databricks skills list                       # the catalog: each skill with its description'
        +contains error: 'databricks skills list' was not expected: 'databricks skills list-files <name>          # the files a skill has, with their paths'
        +contains error: 'databricks skills list' was not expected: 'Pick the skill whose description fits the task from the `databricks skills list` output. The catalog changes between CLI versions, so run `databricks skills list` rather than relying on a remembered list.'
        +contains error: 'databricks skills list' was not expected: "Re-read `databricks <group> --help`, find the matching skill with `databricks skills list`, and check https://docs.databricks.com. If you truly can't do something yourself, tell the user how they can — don't tell them Databricks can't."
         
        -=== With the variable set, auto-install enable says it is still stopped here
        -
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] aitools auto-install enable
        -Automatic installation of Databricks AI tools is enabled.
        -DATABRICKS_NOT_AN_AGENT still stops it in this environment; unset it to let it run.
        -
        -=== A false value leaves agent detection on
        -
        ->>> DATABRICKS_NOT_AN_AGENT=0 CODEX_CI=1 CODEX_THREAD_ID=thread-1 [CLI] jobs list
        -Before you work with Databricks, run: databricks skills list
        -
        -=== The SDK's User-Agent follows the variable
        -
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] current-user me
        -{
        -  "headers": {
        -    "User-Agent": [
        -      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/current-user_me cmd-exec-id/[UUID][0] interactive/none auth/pat"
        -    ]
        -  },
        -  "method": "GET",
        -  "path": "/api/2.0/preview/scim/v2/Me"
        -}
        -
        ->>> CLAUDECODE=1 [CLI] current-user me
        -{
        -  "headers": {
        -    "User-Agent": [
        -      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/current-user_me cmd-exec-id/[UUID][1] interactive/none aitools-agent/none auth/pat agent/claude-code"
        -    ]
        -  },
        -  "method": "GET",
        -  "path": "/api/2.0/preview/scim/v2/Me"
        -}
        +Exit code: 1
        
    acceptance_test.go:1184: 
        LOG.quickstart-agent: # Databricks Quickstart
        LOG.quickstart-agent: 
        LOG.quickstart-agent: The `databricks` CLI wraps the public Databricks REST API — there's a command for essentially every API endpoint, so almost any Databricks task can be driven from here. If something looks unsupported, it's almost always a command you haven't found yet, not a real gap. The headline workflow: build durable resources as code with **Declarative Automation Bundles (DABs)** and ship them with `databricks bundle deploy` (see Build and deploy below).
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Golden rules
        LOG.quickstart-agent: 
        LOG.quickstart-agent: - **Reason, don't refuse.** Before telling the user something can't be done, run `databricks <group> --help` and find the matching skill with `databricks skills list` (below). Almost everything is reachable through the CLI.
        LOG.quickstart-agent: - **Build with bundles.** For anything durable — jobs, pipelines, dashboards, apps — define it as code in a Declarative Automation Bundle (DABs) and ship with `databricks bundle deploy`, not one-off API calls.
        LOG.quickstart-agent: - **Pick the profile deliberately.** Run `databricks auth profiles`. If only one profile exists, use it. If one is already set as the default (via `databricks auth switch`), assume that one — you can confirm if unsure. Otherwise, show the user the profiles with their workspace URLs and let them choose. Don't invent profile names.
        LOG.quickstart-agent: - **Always pass `--profile <name>`.** Each Bash command runs in its own shell, so a separate `export DATABRICKS_CONFIG_PROFILE=...` line does NOT persist. Use the flag, or chain with `&&`.
        LOG.quickstart-agent: - **OAuth, never PAT.** Authenticate with `databricks auth login`, not personal access tokens.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Step 1 — Authenticate
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks auth profiles                  # already set up? lists profiles + validity
        LOG.quickstart-agent: databricks auth login --profile <name>    # if not — opens login.databricks.com to pick a workspace
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: No host needed: without `--host`, login opens login.databricks.com and the user picks a workspace in the browser. Only pass `--host <url>` if the user already gave you a specific workspace URL. Always pass a descriptive `--profile <name>` (e.g. `dev-aws`, `prod-azure`) so you can target it reliably afterward — ask the user for the name rather than inventing one.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Step 2 — Verify
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks current-user me --profile <name>
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Build and deploy with Declarative Automation Bundles (DABs)
        LOG.quickstart-agent: 
        LOG.quickstart-agent: **DABs are the standard, recommended way to build on Databricks.** A bundle is a project with a `databricks.yml` that declares your resources (jobs, pipelines, dashboards, apps) and its targets (e.g. dev, prod) — one project, one deploy, every resource type:
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks bundle init                     # scaffold a project from a template
        LOG.quickstart-agent: databricks bundle validate                 # check the config
        LOG.quickstart-agent: databricks bundle deploy -t dev            # deploy everything to a target (dev, prod, ...)
        LOG.quickstart-agent: databricks bundle run <resource> -t dev    # run a job or pipeline
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Find the bundle skill in `databricks skills list` and read it for bundle structure, resource schemas, and multi-target setup.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: **Databricks Apps** (full-stack TypeScript + React via AppKit) build on bundles too, with a dedicated scaffolder — see the apps skill in `databricks skills list`:
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks apps init          # scaffold an AppKit app (generates the bundle for you)
        LOG.quickstart-agent: databricks apps deploy        # deploy it to the workspace
        LOG.quickstart-agent: databricks apps run-local     # develop locally (or `dev-remote` against the workspace)
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Common commands
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks jobs list --profile <name>
        LOG.quickstart-agent: databricks pipelines list --profile <name>
        LOG.quickstart-agent: databricks apps list --profile <name>
        LOG.quickstart-agent: databricks warehouses list --profile <name>
        LOG.quickstart-agent: 
        LOG.quickstart-agent: # Unity Catalog data uses POSITIONAL args, NOT flags:
        LOG.quickstart-agent: databricks catalogs list --profile <name>
        LOG.quickstart-agent: databricks schemas list <catalog> --profile <name>
        LOG.quickstart-agent: databricks tables list <catalog> <schema> --profile <name>
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Unsure of a command's shape? Run `databricks <command> --help`.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Find skills for the task
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Skills give you Databricks-specific patterns so you build resources correctly instead of guessing. Find the one that matches the task in the catalog, read it, then read the supporting files it lists:
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks skills list                       # the catalog: each skill with its description
        LOG.quickstart-agent: databricks skills list-files <name>          # the files a skill has, with their paths
        LOG.quickstart-agent: databricks skills read <name>                # a skill's instructions
        LOG.quickstart-agent: databricks skills read-file <name> <path>    # a supporting file that the skill lists
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Pick the skill whose description fits the task from the `databricks skills list` output. The catalog changes between CLI versions, so run `databricks skills list` rather than relying on a remembered list.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Explore data
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Use the built-in tools instead of guessing SQL or navigating by hand:
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks experimental aitools tools discover-schema <catalog>.<schema>.<table> --profile <name>
        LOG.quickstart-agent: databricks experimental aitools tools query "SELECT * FROM <table> LIMIT 10" --profile <name>
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## When you get stuck
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Re-read `databricks <group> --help`, find the matching skill with `databricks skills list`, and check https://docs.databricks.com. If you truly can't do something yourself, tell the user how they can — don't tell them Databricks can't.
    acceptance_test.go:1184: 
        LOG.quickstart-human: # Databricks Quickstart
        LOG.quickstart-human: 
        LOG.quickstart-human: The `databricks` CLI wraps the public Databricks REST API — there's a command for essentially every API endpoint, so almost any Databricks task can be driven from here. If something looks unsupported, it's almost always a command you haven't found yet, not a real gap. The headline workflow: build durable resources as code with **Declarative Automation Bundles (DABs)** and ship them with `databricks bundle deploy` (see Build and deploy below).
        LOG.quickstart-human: 
        LOG.quickstart-human: ## Golden rules
        LOG.quickstart-human: 
        LOG.quickstart-human: - **Reason, don't refuse.** Before telling the user something can't be done, run `databricks <group> --help` and find the matching skill with `databricks skills list` (below). Almost everything is reachable through the CLI.
        LOG.quickstart-human: - **Build with bundles.** For anything durable — jobs, pipelines, dashboards, apps — define it as code in a Declarative Automation Bundle (DABs) and ship with `databricks bundle deploy`, not one-off API calls.
        LOG.quickstart-human: - **Pick the profile deliberately.** Run `databricks auth profiles`. If only one profile exists, use it. If one is already set as the default (via `databricks auth switch`), assume that one — you can confirm if unsure. Otherwise, show the user the profiles with their workspace URLs and let them choose. Don't invent profile names.
        LOG.quickstart-human: - **Always pass `--profile <name>`.** Each Bash command runs in its own shell, so a separate `export DATABRICKS_CONFIG_PROFILE=...` line does NOT persist. Use the flag, or chain with `&&`.
        LOG.quickstart-human: - **OAuth, never PAT.** Authenticate with `databricks auth login`, not personal access tokens.
        LOG.quickstart-human: 
        LOG.quickstart-human: ## Step 1 — Authenticate
        LOG.quickstart-human: 
        LOG.quickstart-human: ```bash
        LOG.quickstart-human: databricks auth profiles                  # already set up? lists profiles + validity
        LOG.quickstart-human: databricks auth login --profile <name>    # if not — opens login.databricks.com to pick a workspace
        LOG.quickstart-human: ```
        LOG.quickstart-human: 
        LOG.quickstart-human: No host needed: without `--host`, login opens login.databricks.com and the user picks a workspace in the browser. Only pass `--host <url>` if the user already gave you a specific workspace URL. Always pass a descriptive `--profile <name>` (e.g. `dev-aws`, `prod-azure`) so you can target it reliably afterward — ask the user for the name rather than inventing one.
        LOG.quickstart-human: 
        LOG.quickstart-human: ## Step 2 — Verify
        LOG.quickstart-human: 
        LOG.quickstart-human: ```bash
        LOG.quickstart-human: databricks current-user me --profile <name>
        LOG.quickstart-human: ```
        LOG.quickstart-human: 
        LOG.quickstart-human: ## Build and deploy with Declarative Automation Bundles (DABs)
        LOG.quickstart-human: 
        LOG.quickstart-human: **DABs are the standard, recommended way to build on Databricks.** A bundle is a project with a `databricks.yml` that declares your resources (jobs, pipelines, dashboards, apps) and its targets (e.g. dev, prod) — one project, one deploy, every resource type:
... (60 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.28.0):

acceptance_test.go:1406: Diff:
        --- cmd/aitools/not-an-agent/output.txt
        +++ /tmp/TestAcceptcmdaitoolsnot-an-agent4150822106/002/output.txt
        @@ -2,77 +2,18 @@
         === Claude Code is hinted, and its help and quickstart are the agent ones
         
         >>> CLAUDECODE=1 [CLI] jobs list
        -Before you work with Databricks, run: databricks skills list
        +Databricks skills are not installed. To work with Databricks reliably, first run: databricks aitools install
         
         >>> CLAUDECODE=1 [CLI] fs --help
        -
        -Coding agents: read the skills for this command group before you use it.
        -  databricks skills read demo-skill
        -
        ->>> CLAUDECODE=1 [CLI] --help
        -
        -Coding agents: run `databricks skills list` to find skills for the commands you use.
        -
        ->>> CLAUDECODE=1 [CLI] quickstart
        -
        -=== With the variable set, no hint is printed
        -
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] jobs list
        -
        -=== Without the variable, the hint still shows on the same session
        -
        ->>> CLAUDECODE=1 [CLI] jobs list
        -Before you work with Databricks, run: databricks skills list
        -
        -=== With the variable set, the help has no skills footer
        -
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] fs --help
           -t, --target string        bundle target to use (if applicable)
         
         Use "databricks fs [command] --help" for more information about a command.
         
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] --help
        +>>> CLAUDECODE=1 [CLI] --help
         
         Use "databricks [command] --help" for more information about a command.
         
        -=== With the variable set, quickstart prints the human guide
        +>>> CLAUDECODE=1 [CLI] quickstart
        +contains error: 'databricks skills list' not found in the output.
         
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] quickstart
        -# Welcome to Databricks
        -
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] quickstart
        -
        -=== With the variable set, auto-install enable says it is still stopped here
        -
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] aitools auto-install enable
        -Automatic installation of Databricks AI tools is enabled.
        -DATABRICKS_NOT_AN_AGENT still stops it in this environment; unset it to let it run.
        -
        -=== A false value leaves agent detection on
        -
        ->>> DATABRICKS_NOT_AN_AGENT=0 CODEX_CI=1 CODEX_THREAD_ID=thread-1 [CLI] jobs list
        -Before you work with Databricks, run: databricks skills list
        -
        -=== The SDK's User-Agent follows the variable
        -
        ->>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] current-user me
        -{
        -  "headers": {
        -    "User-Agent": [
        -      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/current-user_me cmd-exec-id/[UUID][0] interactive/none auth/pat"
        -    ]
        -  },
        -  "method": "GET",
        -  "path": "/api/2.0/preview/scim/v2/Me"
        -}
        -
        ->>> CLAUDECODE=1 [CLI] current-user me
        -{
        -  "headers": {
        -    "User-Agent": [
        -      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/current-user_me cmd-exec-id/[UUID][1] interactive/none aitools-agent/none auth/pat agent/claude-code"
        -    ]
        -  },
        -  "method": "GET",
        -  "path": "/api/2.0/preview/scim/v2/Me"
        -}
        +Exit code: 1
        
    acceptance_test.go:1184: 
        LOG.quickstart-agent: # Databricks Quickstart
        LOG.quickstart-agent: 
        LOG.quickstart-agent: The `databricks` CLI wraps the public Databricks REST API — there's a command for essentially every API endpoint, so almost any Databricks task can be driven from here. If something looks unsupported, it's almost always a command you haven't found yet, not a real gap. The headline workflow: build durable resources as code with **Declarative Automation Bundles (DABs)** and ship them with `databricks bundle deploy` (see Build and deploy below).
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Golden rules
        LOG.quickstart-agent: 
        LOG.quickstart-agent: - **Reason, don't refuse.** Before telling the user something can't be done, run `databricks <group> --help` and install the matching skill (below). Almost everything is reachable through the CLI.
        LOG.quickstart-agent: - **Build with bundles.** For anything durable — jobs, pipelines, dashboards, apps — define it as code in a Declarative Automation Bundle (DABs) and ship with `databricks bundle deploy`, not one-off API calls.
        LOG.quickstart-agent: - **Pick the profile deliberately.** Run `databricks auth profiles`. If only one profile exists, use it. If one is already set as the default (via `databricks auth switch`), assume that one — you can confirm if unsure. Otherwise, show the user the profiles with their workspace URLs and let them choose. Don't invent profile names.
        LOG.quickstart-agent: - **Always pass `--profile <name>`.** Each Bash command runs in its own shell, so a separate `export DATABRICKS_CONFIG_PROFILE=...` line does NOT persist. Use the flag, or chain with `&&`.
        LOG.quickstart-agent: - **OAuth, never PAT.** Authenticate with `databricks auth login`, not personal access tokens.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Step 1 — Authenticate
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks auth profiles                  # already set up? lists profiles + validity
        LOG.quickstart-agent: databricks auth login --profile <name>    # if not — opens login.databricks.com to pick a workspace
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: No host needed: without `--host`, login opens login.databricks.com and the user picks a workspace in the browser. Only pass `--host <url>` if the user already gave you a specific workspace URL. Always pass a descriptive `--profile <name>` (e.g. `dev-aws`, `prod-azure`) so you can target it reliably afterward — ask the user for the name rather than inventing one.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Step 2 — Verify
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks current-user me --profile <name>
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Build and deploy with Declarative Automation Bundles (DABs)
        LOG.quickstart-agent: 
        LOG.quickstart-agent: **DABs are the standard, recommended way to build on Databricks.** A bundle is a project with a `databricks.yml` that declares your resources (jobs, pipelines, dashboards, apps) and its targets (e.g. dev, prod) — one project, one deploy, every resource type:
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks bundle init                     # scaffold a project from a template
        LOG.quickstart-agent: databricks bundle validate                 # check the config
        LOG.quickstart-agent: databricks bundle deploy -t dev            # deploy everything to a target (dev, prod, ...)
        LOG.quickstart-agent: databricks bundle run <resource> -t dev    # run a job or pipeline
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Read the `databricks-dabs` skill for bundle structure, resource schemas, and multi-target setup.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: **Databricks Apps** (full-stack TypeScript + React via AppKit) build on bundles too, with a dedicated scaffolder — see `databricks-apps`:
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks apps init          # scaffold an AppKit app (generates the bundle for you)
        LOG.quickstart-agent: databricks apps deploy        # deploy it to the workspace
        LOG.quickstart-agent: databricks apps run-local     # develop locally (or `dev-remote` against the workspace)
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Common commands
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks jobs list --profile <name>
        LOG.quickstart-agent: databricks pipelines list --profile <name>
        LOG.quickstart-agent: databricks apps list --profile <name>
        LOG.quickstart-agent: databricks warehouses list --profile <name>
        LOG.quickstart-agent: 
        LOG.quickstart-agent: # Unity Catalog data uses POSITIONAL args, NOT flags:
        LOG.quickstart-agent: databricks catalogs list --profile <name>
        LOG.quickstart-agent: databricks schemas list <catalog> --profile <name>
        LOG.quickstart-agent: databricks tables list <catalog> <schema> --profile <name>
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Unsure of a command's shape? Run `databricks <command> --help`.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Install skills for the task
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Skills give you Databricks-specific patterns so you build resources correctly instead of guessing. They install into your coding agent (auto-detected):
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks aitools install                 # stable skills
        LOG.quickstart-agent: databricks aitools install --experimental  # broader coverage: more areas, lower quality bar
        LOG.quickstart-agent: databricks aitools list                    # available + installed skills — check this for the latest
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: The set evolves, so run `databricks aitools list` rather than relying on a fixed list. Common ones: `databricks-core` (CLI/auth), `databricks-jobs`, `databricks-pipelines`, `databricks-dabs` (deploy as code), `databricks-apps`. Experimental skills reach further (Unity Catalog, vector search, dashboards, AI functions, and more) — worth a look depending on the prompt.
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## Explore data
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Use the built-in tools instead of guessing SQL or navigating by hand:
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ```bash
        LOG.quickstart-agent: databricks experimental aitools tools discover-schema <catalog>.<schema>.<table> --profile <name>
        LOG.quickstart-agent: databricks experimental aitools tools query "SELECT * FROM <table> LIMIT 10" --profile <name>
        LOG.quickstart-agent: ```
        LOG.quickstart-agent: 
        LOG.quickstart-agent: ## When you get stuck
        LOG.quickstart-agent: 
        LOG.quickstart-agent: Re-read `databricks <group> --help`, install the matching skill, and check https://docs.databricks.com. If you truly can't do something yourself, tell the user how they can — don't tell them Databricks can't.
TestAccept/cmd/api/not-an-agent: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌

main (e6f3460):

acceptance_test.go:1406: Diff:
        --- cmd/api/not-an-agent/output.txt
        +++ /tmp/TestAcceptcmdapinot-an-agent3566431510/002/output.txt
        @@ -2,25 +2,6 @@
         === With the variable set, the request has no agent token
         
         >>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] api get /api/2.0/clusters/list
        -{
        -  "headers": {
        -    "Authorization": [
        -      "Bearer [DATABRICKS_TOKEN]"
        -    ],
        -    "User-Agent": [
        -      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/api_get cmd-exec-id/[UUID][0] interactive/none auth/pat"
        -    ],
        -    "X-Databricks-Workspace-Id": [
        -      "[WORKSPACE_ID]"
        -    ]
        -  },
        -  "method": "GET",
        -  "path": "/api/2.0/clusters/list"
        -}
        -
        -=== With the variable unset, the request carries the agent token
        -
        ->>> CLAUDECODE=1 [CLI] api get /api/2.0/clusters/list
         Databricks skills are not installed. To work with Databricks reliably, first run: databricks aitools install
         {
           "headers": {
        @@ -28,7 +9,8 @@
               "Bearer [DATABRICKS_TOKEN]"
             ],
             "User-Agent": [
        -      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/api_get cmd-exec-id/[UUID][1] interactive/none aitools-agent/none auth/pat agent/claude-code"
        +      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/api_get cmd-exec-id/[UUID] interactive/none aitools-agent/none auth/pat agent/claude-code"
        +contains error: 'agent/claude-code' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/api_get cmd-exec-id/[UUID] interactive/none aitools-agent/none auth/pat agent/claude-code"'
             ],
             "X-Databricks-Workspace-Id": [
               "[WORKSPACE_ID]"
        @@ -37,3 +19,5 @@
           "method": "GET",
           "path": "/api/2.0/clusters/list"
         }
        +
        +Exit code: 1

latest (v1.28.0):

acceptance_test.go:1406: Diff:
        --- cmd/api/not-an-agent/output.txt
        +++ /tmp/TestAcceptcmdapinot-an-agent3678167329/002/output.txt
        @@ -2,25 +2,6 @@
         === With the variable set, the request has no agent token
         
         >>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] api get /api/2.0/clusters/list
        -{
        -  "headers": {
        -    "Authorization": [
        -      "Bearer [DATABRICKS_TOKEN]"
        -    ],
        -    "User-Agent": [
        -      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/api_get cmd-exec-id/[UUID][0] interactive/none auth/pat"
        -    ],
        -    "X-Databricks-Workspace-Id": [
        -      "[WORKSPACE_ID]"
        -    ]
        -  },
        -  "method": "GET",
        -  "path": "/api/2.0/clusters/list"
        -}
        -
        -=== With the variable unset, the request carries the agent token
        -
        ->>> CLAUDECODE=1 [CLI] api get /api/2.0/clusters/list
         Databricks skills are not installed. To work with Databricks reliably, first run: databricks aitools install
         {
           "headers": {
        @@ -28,7 +9,8 @@
               "Bearer [DATABRICKS_TOKEN]"
             ],
             "User-Agent": [
        -      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/api_get cmd-exec-id/[UUID][1] interactive/none aitools-agent/none auth/pat agent/claude-code"
        +      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/api_get cmd-exec-id/[UUID] interactive/none aitools-agent/none auth/pat agent/claude-code"
        +contains error: 'agent/claude-code' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/api_get cmd-exec-id/[UUID] interactive/none aitools-agent/none auth/pat agent/claude-code"'
             ],
             "X-Databricks-Workspace-Id": [
               "[WORKSPACE_ID]"
        @@ -37,3 +19,5 @@
           "method": "GET",
           "path": "/api/2.0/clusters/list"
         }
        +
        +Exit code: 1
        
FAIL
TestAccept/cmd/auth/describe/not-an-agent: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌

main (e6f3460):

acceptance_test.go:1406: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1406
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1147
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:690
        	Error:      	Not equal: 
        	            	expected: "\n=== With the variable set, the verification request has no agent token\n\n>>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] auth describe\n{\n  \"headers\": {\n    \"User-Agent\": [\n      \"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/auth_describe cmd-exec-id/[UUID][0] interactive/none auth/pat\"\n    ]\n  },\n  \"method\": \"GET\",\n  \"path\": \"/api/2.0/preview/scim/v2/Me\"\n}\n\n=== With the variable unset, the verification request carries the agent token\n\n>>> CLAUDECODE=1 [CLI] auth describe\n{\n  \"headers\": {\n    \"User-Agent\": [\n      \"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/auth_describe cmd-exec-id/[UUID][1] interactive/none aitools-agent/none auth/pat agent/claude-code\"\n    ]\n  },\n  \"method\": \"GET\",\n  \"path\": \"/api/2.0/preview/scim/v2/Me\"\n}\n"
        	            	actual  : "\n=== With the variable set, the verification request has no agent token\n\n>>> DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1 [CLI] auth describe\n{\n  \"headers\": {\n    \"User-Agent\": [\n      \"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/auth_describe cmd-exec-id/[UUID] interactive/none aitools-agent/none auth/pat agent/claude-code\"\ncontains error: 'agent/claude-code' was not expected: '\"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/auth_describe cmd-exec-id/[UUID] interactive/none aitools-agent/none auth/pat agent/claude-code\"'\n    ]\n  },\n  \"method\": \"GET\",\n  \"path\": \"/api/2.0/preview/scim/v2/Me\"\n}\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -7,3 +7,4 @@
        	            	     "User-Agent": [
        	            	-      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/auth_describe cmd-exec-id/[UUID][0] interactive/none auth/pat"
        	            	+      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/auth_describe cmd-exec-id/[UUID] interactive/none aitools-agent/none auth/pat agent/claude-code"
        	            	+contains error: 'agent/claude-code' was not expected: '"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/auth_describe cmd-exec-id/[UUID] interactive/none aitools-agent/none auth/pat agent/claude-code"'
        	            	     ]
        	            	@@ -14,14 +15,3 @@
        	            	 
        	            	-=== With the variable unset, the verification request carries the agent token
        	            	+Exit code: 1
        	            	 
        	            	->>> CLAUDECODE=1 [CLI] auth describe
        	            	-{
        	            	-  "headers": {
        	            	-    "User-Agent": [
        	            	-      "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/auth_describe cmd-exec-id/[UUID][1] interactive/none aitools-agent/none auth/pat agent/claude-code"
        	            	-    ]
        	            	-  },
        	            	-  "method": "GET",
        	            	-  "path": "/api/2.0/preview/scim/v2/Me"
        	            	-}
        	            	-
        	Test:       	TestAccept/cmd/auth/describe/not-an-agent
        	Messages:   	cmd/auth/describe/not-an-agent/output.txt vs /tmp/TestAcceptcmdauthdescribenot-an-agent4281515752/002/output.txt

latest (v1.28.0): same output as main (e6f3460)

Take the base's profileConfig helper for the picked-profile prompt paths in
cmd/root/auth.go, and its TestWorkspaceClientNotAnAgentWrapsTransport in
bundle/config/workspace_test.go, which runs on Windows. Keep the SkipRetryOnIO
forwarding on the header wrapper and the remaining SDK call sites.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: b0d95ed

Run: 46095558858

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 173 20 4:14
💚​ aws-windows-latest-4core-16gb 1 173 20 2:44
💚​ azure linux-2core-8gb 1 172 20 3:51
💚​ azure-windows-latest-4core-16gb 1 172 20 3:00
💚​ gcp linux-2core-8gb 1 173 20 3:23
💚​ gcp-windows-latest-4core-16gb 1 173 20 2:58
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 6 slowest tests (at least 2 minutes):
duration env testname
3:28 aws linux-2core-8gb TestAccept
3:24 azure linux-2core-8gb TestAccept
3:13 gcp linux-2core-8gb TestAccept
2:58 azure-windows-latest-4core-16gb TestAccept
2:57 gcp-windows-latest-4core-16gb TestAccept
2:43 aws-windows-latest-4core-16gb TestAccept

Git Bash rewrote the leading slash of /api/2.0/clusters/list into a Windows
path, so the mock server got no handler. Set MSYS_NO_PATHCONV=1 on both
api calls, as the other api acceptance scripts do.

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

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at 4089a20. Each finding was verified against the code.

No blocking issues found. 4 non-blocking comment(s) below.

This PR extends the DATABRICKS_NOT_AN_AGENT User-Agent guard to the CLI commands that build their own SDK config, and makes the transport wrapper forward SkipRetryOnIO. The production wiring is mostly sound. A few things are worth fixing before merge: the auth describe hunk duplicates a wrap that root already applies, and the acceptance test meant to cover it never reaches it. In auth profiles the wrap lands after the config's metadata fetch. The new unit tests also don't isolate the agent environment, and the new acceptance test stubs a route the testserver already models.

Comment thread cmd/auth/describe.go Outdated
// pointer (config.Config must not be copied by value), without any profile
// prompting.
func verifyWorkspaceAuth(ctx context.Context, cfg *config.Config) (*iam.User, error) {
agent.ApplyNotAnAgentHeader(ctx, cfg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] verifyWorkspaceAuth has one caller, the account branch at line 142, and it passes a.Config. MustAccountClient (cmd/root/auth.go:243) has already wrapped that config, so this line only puts a second noAgentHeaderTransport around the first. The new acceptance/cmd/auth/describe/not-an-agent test uses a workspace PAT profile. It gets its Me request from the root workspace client at line 150 and would still pass with this hunk reverted. Can we drop this line? If it should stay, the test needs an account profile whose Workspaces.List fails, so that it actually reaches this function.

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.

Done in 8283226: dropped the guard from verifyWorkspaceAuth. Its caller passes the account client config, which MustAccountClient already guards, and a profile picked at a prompt goes through profileConfig, which guards too. So the second wrap is gone and the describe acceptance test no longer needs an account profile.

Comment thread cmd/auth/profiles.go Outdated
callCtx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()

agent.ApplyNotAnAgentHeader(ctx, cfg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] The wrap runs after cfg.EnsureResolved() at line 73. The comment above that call says it fetches /.well-known/databricks-config through the SDK. So with DATABRICKS_NOT_AN_AGENT=1 CLAUDECODE=1, that request can go out on the unwrapped transport, and only the later Me/Workspaces.List call drops the token. The new test can't see this because its server answers every other path with a 404 and doesn't record it. cmd/labs/project/entrypoint.go:128 has the same ordering: validLogin has already called cfg.EnsureResolved() by then. Can we apply the guard right after cfg is built, before EnsureResolved, the way MustWorkspaceClient does?

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.

Done in 8283226: the guard now runs before EnsureResolved in profile Load, as MustWorkspaceClient does. The labs validLogin guards its login config before EnsureResolved as well, and the replacement account config before its own EnsureResolved. The SDK host metadata fetch uses an internal client without the agent header visitors, so in v0.204.0 that request never carried the token, with or without the guard. The move keeps the guard ahead of any resolve-time request anyway. The profile test now records the well-known request too and checks it has no agent token with the variable set.

Comment thread cmd/aitools/mcp_serve_test.go Outdated
// TestGuardedClientNotAnAgentDropsAgentHeader checks that the serve's client leaves the agent token out of User-Agent
// under DATABRICKS_NOT_AN_AGENT, and keeps it without the variable.
func TestGuardedClientNotAnAgentDropsAgentHeader(t *testing.T) {
t.Setenv("CLAUDECODE", "1")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] This test sets CLAUDECODE=1 with t.Setenv and calls useragent.ClearCache itself, so the runner's environment still leaks in. If the suite runs with DATABRICKS_NOT_AN_AGENT=1, or inside another agent that sets its own variable (the SDK then reports agent/multiple), the "variable unset" case fails its Contains "agent/claude-code" assertion. The same setup is in cmd/auth/profiles_test.go:335, cmd/labs/project/entrypoint_test.go:20 and experimental/ssh/internal/client/releases_test.go:417. Can these use testutil.SetAgentEnv(t, "CLAUDECODE", "1") from internal/testutil/agent.go, as the parent's tests do? Note that it clears HOME, which the profiles test already sets itself.

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.

Done in 8283226: the four tests (aitools mcp serve, auth profiles, labs entrypoint, ssh releases) now call testutil.SetAgentEnv(t, "CLAUDECODE", "1") in place of t.Setenv plus ClearCache. The profile test still sets HOME itself, as before.

New = ""

[[Server]]
Pattern = "GET /api/2.0/preview/scim/v2/Me"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] .agents/rules/testing.md says to reserve [[Server]] for routes the testserver doesn't model. GET /api/2.0/preview/scim/v2/Me is already handled in libs/testserver/handlers.go:247, which also sets X-Databricks-Org-Id. This stub replaces that with a fixed body and no header. The test only checks the request's User-Agent, so can we drop the [[Server]] block and regenerate the output?

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.

Done in 8283226: dropped the [[Server]] stub from the describe not-an-agent test. The testserver answers the Me call, and the regenerated output is unchanged.

simonfaltum and others added 3 commits November 28, 2026 01:19
Co-authored-by: Isaac <no-reply@databricks.com>
Guard the profile validation and labs login config before EnsureResolved, so
the host metadata fetch goes through the guarded transport too. Drop the
guard in auth describe's workspace check: the account client it receives is
already guarded.

Tests that set the agent environment use testutil.SetAgentEnv, so the
runner's own environment does not leak into the variable-unset case. The
auth describe acceptance test drops its Me stub, since the testserver
already answers that call.

Co-authored-by: Isaac <no-reply@databricks.com>
The Windows CI cells panicked in httptest.NewServer while listening on
loopback, which aborted the whole cmd/labs/project test run. The test only
needs one cluster response, so it now uses a fixture transport on
cfg.HTTPTransport. The not-an-agent wrapper still sits on that transport, so
the User-Agent the test checks is the one the guard leaves.

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

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants