From acddd9afca0c2141f14b3e55be75ce43de438552 Mon Sep 17 00:00:00 2001 From: Steven Chen Date: Thu, 12 Nov 2026 22:41:02 +0000 Subject: [PATCH 1/3] [air] Link the YAML reference and agent skill from `air run --help` Also say in the `air --help` listing that GPU pools are not required. Co-authored-by: Isaac --- acceptance/air/config-help/output.txt | 7 +++++++ acceptance/air/help/output.txt | 2 +- cmd/air/air_test.go | 18 ++++++++++++++++++ cmd/air/pools.go | 2 +- cmd/air/run.go | 12 +++++++++++- 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/acceptance/air/config-help/output.txt b/acceptance/air/config-help/output.txt index 1fae9e919f3..6902830b20e 100644 --- a/acceptance/air/config-help/output.txt +++ b/acceptance/air/config-help/output.txt @@ -11,6 +11,10 @@ field, pass its path to -h as a separate argument: databricks air run -h config.compute one section databricks air run -h config.compute.accelerator_type one field +YAML reference: + AWS: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/yaml-config + Azure: https://learn.microsoft.com/azure/databricks/machine-learning/ai-runtime/connecting/cli/yaml-config + Usage: databricks air run [flags] @@ -38,6 +42,9 @@ Global Flags: -p, --profile string ~/.databrickscfg profile -t, --target string bundle target to use (if applicable) +Learn more: + Coding agent skill databricks aitools install --skills-only --skills databricks-ai-runtime + === schema overview >>> [CLI] air run -h config diff --git a/acceptance/air/help/output.txt b/acceptance/air/help/output.txt index 29ab1a40dbe..3610cd2d8dd 100644 --- a/acceptance/air/help/output.txt +++ b/acceptance/air/help/output.txt @@ -25,7 +25,7 @@ Package and deploy: images Push container images for custom environments Provisioned capacity: - pools View GPU pools provisioned for your workspace + pools View provisioned GPU pools, if any (not required to run) Flags: -h, --help help for air diff --git a/cmd/air/air_test.go b/cmd/air/air_test.go index 11e4546d21d..2e8158f3ab3 100644 --- a/cmd/air/air_test.go +++ b/cmd/air/air_test.go @@ -8,6 +8,7 @@ import ( "github.com/spf13/cobra" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // TestNewRegistersAllSubcommands asserts the `air` command wires up every @@ -117,3 +118,20 @@ func TestRunErrorOmitsDebugTipWhenDebugEnabled(t *testing.T) { assert.Same(t, originalErr, err) assert.NotContains(t, err.Error(), "use the --debug flag") } + +func TestRunHelpLinksYAMLReferenceAndSkill(t *testing.T) { + run := findSubcommand(t, New(), "run") + var out bytes.Buffer + run.SetOut(&out) + run.HelpFunc()(run, nil) + help := out.String() + + reference := strings.Index(help, "YAML reference:\n"+ + " AWS: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/yaml-config\n"+ + " Azure: https://learn.microsoft.com/azure/databricks/machine-learning/ai-runtime/connecting/cli/yaml-config\n") + require.NotEqual(t, -1, reference) + assert.Less(t, reference, strings.Index(help, "Usage:"), "the YAML reference belongs with the description") + + assert.True(t, strings.HasSuffix(help, "Learn more:\n Coding agent skill databricks aitools install --skills-only --skills databricks-ai-runtime\n")) + assert.Equal(t, 1, strings.Count(help, "Learn more:"), "the air footer must not also print") +} diff --git a/cmd/air/pools.go b/cmd/air/pools.go index 59a1f507be0..bdfd4488786 100644 --- a/cmd/air/pools.go +++ b/cmd/air/pools.go @@ -184,7 +184,7 @@ func getPool(ctx context.Context, w *databricks.WorkspaceClient, id string) (*pr func newPoolsCommand() *cobra.Command { cmd := &cobra.Command{ Use: "pools", - Short: "View GPU pools provisioned for your workspace", + Short: "View provisioned GPU pools, if any (not required to run)", Long: `View GPU pools provisioned for your workspace. A GPU pool is dedicated accelerator capacity that your Databricks account team diff --git a/cmd/air/run.go b/cmd/air/run.go index 4184e5ed25b..18a053927e0 100644 --- a/cmd/air/run.go +++ b/cmd/air/run.go @@ -73,6 +73,11 @@ func validateDryRunInWorkspace(ctx context.Context, cmd *cobra.Command, args []s return ctx, validateDryRunConfig(ctx, w, cfg, commandPath, submittedContainers(cfg, funcDir), idempotencyToken, timeout) } +const runHelpFooter = ` +Learn more: + Coding agent skill databricks aitools install --skills-only --skills databricks-ai-runtime +` + func newRunCommand() *cobra.Command { return newRunCommandWithValidationTimeout(dryRunValidationTimeout) } @@ -97,7 +102,11 @@ field, pass its path to -h as a separate argument: databricks air run -h config all fields databricks air run -h config.compute one section - databricks air run -h config.compute.accelerator_type one field`, + databricks air run -h config.compute.accelerator_type one field + +YAML reference: + AWS: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/yaml-config + Azure: https://learn.microsoft.com/azure/databricks/machine-learning/ai-runtime/connecting/cli/yaml-config`, Example: ` # Submit and stream logs until the run finishes databricks air run -f workload.yaml --watch @@ -116,6 +125,7 @@ field, pass its path to -h as a separate argument: // Parent() is nil for a detached command (unit tests). if parent := c.Parent(); parent != nil { parent.HelpFunc()(c, args) + fmt.Fprint(c.OutOrStdout(), runHelpFooter) return } _ = c.Usage() From dee46a760e3b274982375e4142b5a4e9d507674a Mon Sep 17 00:00:00 2001 From: Steven Chen Date: Thu, 12 Nov 2026 22:41:19 +0000 Subject: [PATCH 2/3] Add changelog entry Co-authored-by: Isaac --- .nextchanges/air/run-help-links.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nextchanges/air/run-help-links.md diff --git a/.nextchanges/air/run-help-links.md b/.nextchanges/air/run-help-links.md new file mode 100644 index 00000000000..5541e613763 --- /dev/null +++ b/.nextchanges/air/run-help-links.md @@ -0,0 +1 @@ +* `databricks air run --help` now links the workload YAML reference and the `databricks-ai-runtime` agent skill, and `databricks air --help` notes that GPU pools are not required. ([#7581](https://github.com/databricks/cli/pull/7581)) From 9c033ee4ef6fcdebcfdb8bbbc57b473b83d24e08 Mon Sep 17 00:00:00 2001 From: Steven Chen Date: Thu, 12 Nov 2026 22:50:22 +0000 Subject: [PATCH 3/3] [air] Drop the run help links; keep only the pools wording `air run -h config` already documents the YAML fields, so the run help doesn't need separate docs or skill links. Co-authored-by: Isaac --- .nextchanges/air/pools-not-required.md | 1 + .nextchanges/air/run-help-links.md | 1 - acceptance/air/config-help/output.txt | 7 ------- cmd/air/air_test.go | 18 ------------------ cmd/air/run.go | 12 +----------- 5 files changed, 2 insertions(+), 37 deletions(-) create mode 100644 .nextchanges/air/pools-not-required.md delete mode 100644 .nextchanges/air/run-help-links.md diff --git a/.nextchanges/air/pools-not-required.md b/.nextchanges/air/pools-not-required.md new file mode 100644 index 00000000000..610332113ca --- /dev/null +++ b/.nextchanges/air/pools-not-required.md @@ -0,0 +1 @@ +* `databricks air --help` now notes that GPU pools are not required to run workloads. ([#7581](https://github.com/databricks/cli/pull/7581)) diff --git a/.nextchanges/air/run-help-links.md b/.nextchanges/air/run-help-links.md deleted file mode 100644 index 5541e613763..00000000000 --- a/.nextchanges/air/run-help-links.md +++ /dev/null @@ -1 +0,0 @@ -* `databricks air run --help` now links the workload YAML reference and the `databricks-ai-runtime` agent skill, and `databricks air --help` notes that GPU pools are not required. ([#7581](https://github.com/databricks/cli/pull/7581)) diff --git a/acceptance/air/config-help/output.txt b/acceptance/air/config-help/output.txt index 6902830b20e..1fae9e919f3 100644 --- a/acceptance/air/config-help/output.txt +++ b/acceptance/air/config-help/output.txt @@ -11,10 +11,6 @@ field, pass its path to -h as a separate argument: databricks air run -h config.compute one section databricks air run -h config.compute.accelerator_type one field -YAML reference: - AWS: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/yaml-config - Azure: https://learn.microsoft.com/azure/databricks/machine-learning/ai-runtime/connecting/cli/yaml-config - Usage: databricks air run [flags] @@ -42,9 +38,6 @@ Global Flags: -p, --profile string ~/.databrickscfg profile -t, --target string bundle target to use (if applicable) -Learn more: - Coding agent skill databricks aitools install --skills-only --skills databricks-ai-runtime - === schema overview >>> [CLI] air run -h config diff --git a/cmd/air/air_test.go b/cmd/air/air_test.go index 2e8158f3ab3..11e4546d21d 100644 --- a/cmd/air/air_test.go +++ b/cmd/air/air_test.go @@ -8,7 +8,6 @@ import ( "github.com/spf13/cobra" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) // TestNewRegistersAllSubcommands asserts the `air` command wires up every @@ -118,20 +117,3 @@ func TestRunErrorOmitsDebugTipWhenDebugEnabled(t *testing.T) { assert.Same(t, originalErr, err) assert.NotContains(t, err.Error(), "use the --debug flag") } - -func TestRunHelpLinksYAMLReferenceAndSkill(t *testing.T) { - run := findSubcommand(t, New(), "run") - var out bytes.Buffer - run.SetOut(&out) - run.HelpFunc()(run, nil) - help := out.String() - - reference := strings.Index(help, "YAML reference:\n"+ - " AWS: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/yaml-config\n"+ - " Azure: https://learn.microsoft.com/azure/databricks/machine-learning/ai-runtime/connecting/cli/yaml-config\n") - require.NotEqual(t, -1, reference) - assert.Less(t, reference, strings.Index(help, "Usage:"), "the YAML reference belongs with the description") - - assert.True(t, strings.HasSuffix(help, "Learn more:\n Coding agent skill databricks aitools install --skills-only --skills databricks-ai-runtime\n")) - assert.Equal(t, 1, strings.Count(help, "Learn more:"), "the air footer must not also print") -} diff --git a/cmd/air/run.go b/cmd/air/run.go index 18a053927e0..4184e5ed25b 100644 --- a/cmd/air/run.go +++ b/cmd/air/run.go @@ -73,11 +73,6 @@ func validateDryRunInWorkspace(ctx context.Context, cmd *cobra.Command, args []s return ctx, validateDryRunConfig(ctx, w, cfg, commandPath, submittedContainers(cfg, funcDir), idempotencyToken, timeout) } -const runHelpFooter = ` -Learn more: - Coding agent skill databricks aitools install --skills-only --skills databricks-ai-runtime -` - func newRunCommand() *cobra.Command { return newRunCommandWithValidationTimeout(dryRunValidationTimeout) } @@ -102,11 +97,7 @@ field, pass its path to -h as a separate argument: databricks air run -h config all fields databricks air run -h config.compute one section - databricks air run -h config.compute.accelerator_type one field - -YAML reference: - AWS: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/yaml-config - Azure: https://learn.microsoft.com/azure/databricks/machine-learning/ai-runtime/connecting/cli/yaml-config`, + databricks air run -h config.compute.accelerator_type one field`, Example: ` # Submit and stream logs until the run finishes databricks air run -f workload.yaml --watch @@ -125,7 +116,6 @@ YAML reference: // Parent() is nil for a detached command (unit tests). if parent := c.Parent(); parent != nil { parent.HelpFunc()(c, args) - fmt.Fprint(c.OutOrStdout(), runHelpFooter) return } _ = c.Usage()