Expose bundle-deployments as a top-level command#5683
Draft
shreyas-goenka wants to merge 1 commit into
Draft
Conversation
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
Collaborator
Integration test reportCommit: b3ceef6
|
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.
Running
databricks bundle-deployments -hfailed withunknown command, even though the generated workspace service exists in the code.Why
The generated
bundle-deploymentsservice (DMS) was deliberately filtered out of top-level registration incmd/cmd.go, and its read-only verbs were re-attached as hidden commands under the DABbundletree (cmd/bundle/metadata_service.go). Net effect: the command was unreachable by its own name.Change
cmd/cmd.goskip sobundle-deploymentsregisters at the top level like every other workspace service.deployment/version/resource/operationget/list) from thebundletree and deletecmd/bundle/metadata_service.go.cmd.AddCommand(deployment.NewDeploymentCommand())incmd/bundle/bundle.go(the DABdeploymentgroup keepsbind/unbind/migrate).dms-read-onlyacceptance test, which exercised the removedbundle <group> get/listcommands.The generated command is
Hidden: truein the SDK output, so it resolves but does not show in--help:Test plan
go build ./...,go vet ./cmd/...cleango test ./cmd/...greengo test ./acceptance -run TestAcceptgreen