Skip to content

air: never suggest built-in accelerator types - #7520

Merged
stevenchen-db merged 5 commits into
mainfrom
schen/air-invalid-gpu-type-workspace-options
Nov 12, 2026
Merged

stevenchen-db merged 5 commits into
mainfrom
schen/air-invalid-gpu-type-workspace-options

Conversation

@stevenchen-db

@stevenchen-db stevenchen-db commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • An unknown compute.accelerator_type no longer lists the CLI's built-in types. The error is now compute.accelerator_type: "X" is not a recognized accelerator type. Run 'databricks air run -h config.compute' to see the types available in your workspace.
  • databricks air run -h config.compute no longer falls back to the built-in list when the workspace's compute options can't be fetched. It prints a warning and omits the list. This includes the case where the endpoint is disabled, which previously showed the built-in list silently.
  • Removes gpuTypes, validGPUTypesHint, and fallbackComputeOptions.

databricks air run --dry-run with accelerator_type: GPU_4xA100:

Before:

Error: compute.accelerator_type: invalid GPU type "GPU_4xA100": valid types are: GPU_1xA10, GPU_1xH100, GPU_8xH100, GPU_8xB300, GPU_1xRTX6000

After:

Error: compute.accelerator_type: "GPU_4xA100" is not a recognized accelerator type. Run 'databricks air run -h config.compute' to see the types available in your workspace

Why

The built-in list can differ from what a workspace can use. With --dry-run, a mistyped type listed the built-in types (including GPU_1xRTX6000), while a known but unavailable type got the server's list from ValidateConfig (the workspace's real types). Users saw two different sets of accelerators. Which types a workspace can use comes from the server, so the CLI no longer suggests its own.

Tests

  • Updated TestParseGPUTypeInvalid and TestLoadRunConfig_Errors for the new message, and asserted that the error names no types.
  • TestRunCommandHelpComputeOptions: when the fetch fails (404, 500), help warns and omits the list.
  • go test ./cmd/air/, go test ./acceptance -run '^TestAccept/air/' (18 dirs), and ./task fmt && ./task checks && ./task lint pass.

This pull request and its description were written by Isaac.

An unknown compute.accelerator_type listed the CLI's built-in types, which
can differ from what the workspace offers (ValidateConfig lists the
workspace's types from the server). The error now names no types and points
to `databricks air run -h config.compute`, and that help omits the list
with a warning when the workspace's types can't be fetched instead of
falling back to the built-in list.

Co-authored-by: Isaac <no-reply@databricks.com>
@stevenchen-db
stevenchen-db requested review from a team as code owners November 11, 2026 23:04
@github-actions github-actions Bot added the AIR Databricks AI Runtime CLI label Nov 11, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: d27f2ac

Run: 43287107825

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 15 8:30
💚​ aws-windows-latest-4core-16gb 1 272 13 6:32
🔄​ azure linux-2core-8gb 1 1 268 15 14:39
💚​ azure-windows-latest-4core-16gb 1 271 13 8:06
💚​ gcp linux-2core-8gb 1 270 15 9:08
🔄​ gcp-windows-latest-4core-16gb 1 1 271 13 8:01
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
🔄​ TestSyncIncrementalFileSync ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestSyncNestedFolderSync ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
Top 9 slowest tests (at least 2 minutes):
duration env testname
3:56 gcp linux-2core-8gb TestAccept
3:52 azure linux-2core-8gb TestAccept
3:51 aws linux-2core-8gb TestAccept
3:07 azure-windows-latest-4core-16gb TestAccept
3:02 aws-windows-latest-4core-16gb TestAccept
2:55 gcp-windows-latest-4core-16gb TestAccept
2:27 azure linux-2core-8gb TestFilerReadWrite/workspace_files
2:21 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
2:08 azure-windows-latest-4core-16gb TestFilerReadDir/workspace_files

Comment thread cmd/air/compute.go
g, err := parseGPUType(c.AcceleratorType)
if err != nil {
return fmt.Errorf("compute.accelerator_type: %w", err)
return fmt.Errorf("compute.accelerator_type: %w. Run 'databricks air run -h config.compute' to see the types available in your workspace", err)

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.

we can use -h config.compute.accelerator_type instead of -h config.compute here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It looks like -h config.compute already shows the workspace's eligible compute options so I figured why not use a shorter command

Comment thread cmd/air/run.go Outdated
cmd.PrintErrf("Warning: couldn't fetch the accelerator types available in this workspace; showing the built-in list instead: %v\n", err)
}
return fallbackComputeOptions()
cmd.PrintErrf("Warning: couldn't fetch the accelerator types available in this workspace: %v\n", err)

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.

do you think it's important to keep the api error here? wonder if it could be confusing for the user as it wouldn't be actionable on their side (e.g. if they see "ListComputeOptions is not yet enabled").

stevenchen-db and others added 2 commits November 12, 2026 18:52
The ListComputeOptions error (e.g. "not yet enabled") isn't actionable for users.

Co-authored-by: Isaac <no-reply@databricks.com>
@stevenchen-db
stevenchen-db added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 26a75b9 Nov 12, 2026
28 checks passed
@stevenchen-db
stevenchen-db deleted the schen/air-invalid-gpu-type-workspace-options branch November 12, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants