Repository navigation
air: never suggest built-in accelerator types - #7520
Merged
stevenchen-db merged 5 commits intoNov 12, 2026
Merged
Conversation
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>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: d27f2ac
Top 9 slowest tests (at least 2 minutes):
|
…-type-workspace-options
caroline-db
reviewed
Nov 12, 2026
| 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) |
Contributor
There was a problem hiding this comment.
we can use -h config.compute.accelerator_type instead of -h config.compute here
Contributor
Author
There was a problem hiding this comment.
It looks like -h config.compute already shows the workspace's eligible compute options so I figured why not use a shorter command
| 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) |
Contributor
There was a problem hiding this comment.
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").
…-type-workspace-options
The ListComputeOptions error (e.g. "not yet enabled") isn't actionable for users. Co-authored-by: Isaac <no-reply@databricks.com>
caroline-db
approved these changes
Nov 12, 2026
stevenchen-db
enabled auto-merge
November 12, 2026 19:18
stevenchen-db
deleted the
schen/air-invalid-gpu-type-workspace-options
branch
November 12, 2026 19:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
compute.accelerator_typeno longer lists the CLI's built-in types. The error is nowcompute.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.computeno 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.gpuTypes,validGPUTypesHint, andfallbackComputeOptions.databricks air run --dry-runwithaccelerator_type: GPU_4xA100:Before:
After:
Why
The built-in list can differ from what a workspace can use. With
--dry-run, a mistyped type listed the built-in types (includingGPU_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
TestParseGPUTypeInvalidandTestLoadRunConfig_Errorsfor 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 lintpass.This pull request and its description were written by Isaac.