From a56db69ac046a5f170aa43b0af25520fe7ad8d15 Mon Sep 17 00:00:00 2001 From: Jan Rose Date: Fri, 12 Jun 2026 22:39:33 +0200 Subject: [PATCH 1/2] Remove non-functional hidden alias flags from bundle generate The hidden --existing-dashboard-id, --existing-dashboard-path, --existing-alert-id, and --existing-genie-space-id flags aliased the canonical --existing-id/--existing-path flags by binding the same variable, but were never included in the cobra requirement wiring (MarkFlagsOneRequired / MarkFlagRequired). Cobra validates those groups on the named flags' Changed state, so alias-only invocations always failed flag validation. The aliases never worked in any release; with this change an alias invocation gets cobra's honest 'unknown flag' error instead of a misleading requirement-group error. Co-authored-by: Isaac --- NEXT_CHANGELOG.md | 1 + cmd/bundle/generate/alert.go | 5 ----- cmd/bundle/generate/dashboard.go | 7 ------- cmd/bundle/generate/genie_space.go | 4 ---- 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 9c5ce923dd5..f5da037eff0 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -12,6 +12,7 @@ * direct: Fix resolving a resource reference that is used more than once within the same field ([#5558](https://github.com/databricks/cli/pull/5558)). * Bundle variable references now accept Unicode letters in path segments (e.g. `${var.变量}`). ([#5532](https://github.com/databricks/cli/pull/5532)) * Ignore remote changes for vector search direct_access_index_spec.schema_json to prevent drift when the backend normalizes the schema ([#5481](https://github.com/databricks/cli/pull/5481)). +* Remove hidden, never-functional `--existing-dashboard-id`, `--existing-dashboard-path`, `--existing-alert-id`, and `--existing-genie-space-id` alias flags from `bundle generate`; use the documented `--existing-id` / `--existing-path` flags instead ([#XXXX](https://github.com/databricks/cli/pull/XXXX)). ### Dependency updates diff --git a/cmd/bundle/generate/alert.go b/cmd/bundle/generate/alert.go index f8c0cc2f409..e80e559f319 100644 --- a/cmd/bundle/generate/alert.go +++ b/cmd/bundle/generate/alert.go @@ -57,11 +57,6 @@ After generation, you can deploy this alert to other targets using: cmd.Flags().StringVar(&alertID, "existing-id", "", `ID of the alert to generate configuration for`) cmd.MarkFlagRequired("existing-id") - // Alias lookup flag that includes the resource type name. - // Included for symmetry with the other generate commands, but we prefer the shorter flag. - cmd.Flags().StringVar(&alertID, "existing-alert-id", "", `ID of the alert to generate configuration for`) - cmd.Flags().MarkHidden("existing-alert-id") - cmd.Flags().StringVarP(&configDir, "config-dir", "d", "resources", `directory to write the configuration to`) cmd.Flags().StringVarP(&sourceDir, "source-dir", "s", "src", `directory to write the alert definition to`) cmd.Flags().BoolVarP(&force, "force", "f", false, `force overwrite existing files in the output directory`) diff --git a/cmd/bundle/generate/dashboard.go b/cmd/bundle/generate/dashboard.go index b6b01e8c528..5d387bca4eb 100644 --- a/cmd/bundle/generate/dashboard.go +++ b/cmd/bundle/generate/dashboard.go @@ -525,13 +525,6 @@ bundle files automatically, useful during active dashboard development.`, cmd.Flags().StringVar(&d.existingID, "existing-id", "", `ID of the dashboard to generate configuration for`) cmd.Flags().StringVar(&d.resource, "resource", "", `resource key of dashboard to watch for changes`) - // Alias lookup flags that include the resource type name. - // Included for symmetry with the other generate commands, but we prefer the shorter flags. - cmd.Flags().StringVar(&d.existingPath, "existing-dashboard-path", "", `workspace path of the dashboard to generate configuration for`) - cmd.Flags().StringVar(&d.existingID, "existing-dashboard-id", "", `ID of the dashboard to generate configuration for`) - cmd.Flags().MarkHidden("existing-dashboard-path") - cmd.Flags().MarkHidden("existing-dashboard-id") - // Output flags. cmd.Flags().StringVarP(&d.resourceDir, "resource-dir", "d", "resources", `directory to write the configuration to`) cmd.Flags().StringVarP(&d.dashboardDir, "dashboard-dir", "s", "src", `directory to write the dashboard representation to`) diff --git a/cmd/bundle/generate/genie_space.go b/cmd/bundle/generate/genie_space.go index bc4198b6797..649f0cacc2c 100644 --- a/cmd/bundle/generate/genie_space.go +++ b/cmd/bundle/generate/genie_space.go @@ -441,10 +441,6 @@ bundle files automatically, useful during active Genie space development.`, cmd.Flags().StringVar(&g.existingID, "existing-id", "", `ID of the Genie space to generate configuration for`) cmd.Flags().StringVar(&g.resource, "resource", "", `resource key of Genie space to watch for changes`) - // Alias lookup flag that includes the resource type name. - cmd.Flags().StringVar(&g.existingID, "existing-genie-space-id", "", `ID of the Genie space to generate configuration for`) - cmd.Flags().MarkHidden("existing-genie-space-id") - // Output flags. cmd.Flags().StringVarP(&g.resourceDir, "resource-dir", "d", "resources", `directory to write the configuration to`) cmd.Flags().StringVarP(&g.genieSpaceDir, "genie-space-dir", "s", "src", `directory to write the Genie space representation to`) From ee2d333da71bf225d41afa31a18211e47c5b1d50 Mon Sep 17 00:00:00 2001 From: Jan Rose Date: Fri, 12 Jun 2026 22:40:30 +0200 Subject: [PATCH 2/2] Fill in PR number in changelog entry Co-authored-by: Isaac --- NEXT_CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index f5da037eff0..023c1d422d5 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -12,7 +12,7 @@ * direct: Fix resolving a resource reference that is used more than once within the same field ([#5558](https://github.com/databricks/cli/pull/5558)). * Bundle variable references now accept Unicode letters in path segments (e.g. `${var.变量}`). ([#5532](https://github.com/databricks/cli/pull/5532)) * Ignore remote changes for vector search direct_access_index_spec.schema_json to prevent drift when the backend normalizes the schema ([#5481](https://github.com/databricks/cli/pull/5481)). -* Remove hidden, never-functional `--existing-dashboard-id`, `--existing-dashboard-path`, `--existing-alert-id`, and `--existing-genie-space-id` alias flags from `bundle generate`; use the documented `--existing-id` / `--existing-path` flags instead ([#XXXX](https://github.com/databricks/cli/pull/XXXX)). +* Remove hidden, never-functional `--existing-dashboard-id`, `--existing-dashboard-path`, `--existing-alert-id`, and `--existing-genie-space-id` alias flags from `bundle generate`; use the documented `--existing-id` / `--existing-path` flags instead ([#5591](https://github.com/databricks/cli/pull/5591)). ### Dependency updates