Commit 89ba40b
authored
Remove non-functional hidden alias flags from bundle generate (#5591)
## Changes
Remove the hidden `--existing-dashboard-id`,
`--existing-dashboard-path`, `--existing-alert-id`, and
`--existing-genie-space-id` alias flags from `bundle generate
dashboard|alert|genie-space`. These aliased the canonical
`--existing-id` / `--existing-path` flags by registering a second flag
bound to the same variable ("included for symmetry with the other
generate commands"), but they were never wired into the cobra
requirement groups (`MarkFlagsOneRequired` / `MarkFlagRequired`). Cobra
validates those groups on the named flags' `Changed` state, so an
alias-only invocation always failed flag validation before reaching the
command:
```
$ databricks bundle generate genie-space --existing-genie-space-id abc123
Error: at least one of the flags in the group [existing-id resource] is required
```
The aliases were broken from the commit that introduced each of them
(#1847 for dashboard, #4108 for alert, #5282 for genie-space), are
hidden from help output, and are referenced nowhere in docs, examples,
or tests — no working invocation ever depended on them. With this
change, passing one yields cobra's `unknown flag` error plus usage
listing the canonical flags, instead of the misleading requirement-group
error.
The canonical long-form flags of the other generate commands
(`--existing-job-id`, `--existing-pipeline-id`, `--existing-app-name`)
are unaffected.
## Tests
- Manual: each removed alias now fails with `unknown flag`; canonical
`--existing-id` / `--existing-path` invocations still pass flag
validation.
- `go test ./cmd/bundle/generate/...` and `go test ./acceptance -run
TestAccept/bundle/generate` pass with no golden output changes (hidden
flags never appeared in help output).
This pull request and its description were written by Isaac, an AI
coding agent.1 parent fd28114 commit 89ba40b
4 files changed
Lines changed: 1 addition & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 60 | | |
66 | 61 | | |
67 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | 528 | | |
536 | 529 | | |
537 | 530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | 444 | | |
449 | 445 | | |
450 | 446 | | |
| |||
0 commit comments