Skip to content

Expose bundle-deployments as a top-level command#5683

Draft
shreyas-goenka wants to merge 1 commit into
mainfrom
unskip-bundle-deployments
Draft

Expose bundle-deployments as a top-level command#5683
shreyas-goenka wants to merge 1 commit into
mainfrom
unskip-bundle-deployments

Conversation

@shreyas-goenka

Copy link
Copy Markdown
Contributor

Running databricks bundle-deployments -h failed with unknown command, even though the generated workspace service exists in the code.

Why

The generated bundle-deployments service (DMS) was deliberately filtered out of top-level registration in cmd/cmd.go, and its read-only verbs were re-attached as hidden commands under the DAB bundle tree (cmd/bundle/metadata_service.go). Net effect: the command was unreachable by its own name.

Change

  • Remove the cmd/cmd.go skip so bundle-deployments registers at the top level like every other workspace service.
  • Remove the hand-wired DMS sub-groups (deployment/version/resource/operation get/list) from the bundle tree and delete cmd/bundle/metadata_service.go.
  • Restore the original cmd.AddCommand(deployment.NewDeploymentCommand()) in cmd/bundle/bundle.go (the DAB deployment group keeps bind/unbind/migrate).
  • Delete the dms-read-only acceptance test, which exercised the removed bundle <group> get/list commands.

The generated command is Hidden: true in the SDK output, so it resolves but does not show in --help:

$ databricks bundle-deployments --help
Service for managing bundle deployment metadata.
Usage:
  databricks bundle-deployments [command]
Available Commands:
  complete-version  Complete a version.
  create-deployment Create a deployment.
  ...

Test plan

  • go build ./..., go vet ./cmd/... clean
  • go test ./cmd/... green
  • go test ./acceptance -run TestAccept green

The auto-generated `bundle-deployments` workspace service (DMS) was
filtered out of top-level registration in cmd/cmd.go, and its read-only
verbs were re-attached as hidden commands under the DAB `bundle` tree
(via cmd/bundle/metadata_service.go).

Drop both: register the generated command at the top level like every
other workspace service, and remove the hand-wired DMS sub-groups from
the `bundle` tree. The generated command is `Hidden: true` in the SDK
output, so it resolves (`databricks bundle-deployments ...`) without
appearing in `--help`.

Removes the dedicated dms-read-only acceptance test, which exercised the
now-removed `bundle deployment/version/resource/operation get/list`
commands.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: b3ceef6

Run: 27966604309

Env 🟨​KNOWN ✅​pass 🙈​skip Time
🟨​ aws linux 1 216 99 3:01
🟨​ aws windows 1 218 97 2:41
🟨​ aws-ucws linux 1 297 18 3:44
🟨​ aws-ucws windows 1 299 16 3:35
🟨​ azure linux 1 216 98 3:10
🟨​ azure windows 1 218 96 2:26
🟨​ azure-ucws linux 1 299 15 3:59
🟨​ azure-ucws windows 1 301 13 3:25
🟨​ gcp linux 1 215 100 3:06
🟨​ gcp windows 1 217 98 2:48
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants