Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions acceptance/cmd/bundle/dms-read-only/out.test.toml

This file was deleted.

81 changes: 0 additions & 81 deletions acceptance/cmd/bundle/dms-read-only/output.txt

This file was deleted.

8 changes: 0 additions & 8 deletions acceptance/cmd/bundle/dms-read-only/script

This file was deleted.

117 changes: 0 additions & 117 deletions acceptance/cmd/bundle/dms-read-only/test.toml

This file was deleted.

54 changes: 1 addition & 53 deletions cmd/bundle/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,62 +36,10 @@ Online documentation: https://docs.databricks.com/en/dev-tools/bundles/index.htm
cmd.AddCommand(newSummaryCommand())
cmd.AddCommand(newGenerateCommand())
cmd.AddCommand(newDebugCommand())
cmd.AddCommand(deployment.NewDeploymentCommand())
cmd.AddCommand(newOpenCommand())
cmd.AddCommand(newPlanCommand())
cmd.AddCommand(newConfigRemoteSyncCommand())

// Bundle Metadata Service (DMS) read-only command groups. Only `get`
// and `list` are surfaced here; mutating verbs (create/delete/heartbeat/
// complete) are not user-facing yet and stay in the auto-generated
// `cmd/workspace/bundle` tree (which is filtered out of top-level
// registration in cmd/cmd.go).
//
// Hide everything from help output for now: the DMS API surface isn't
// documented as a user-facing CLI feature yet. Commands still route
// through cobra so callers who know about them can invoke them; they
// just don't show up in `bundle --help` / `bundle <group> --help`.
dms := metadataServiceCommands()
for _, c := range dms {
c.Hidden = true
}

// The DAB `deployment` group already exists for bind/unbind/migrate.
// Augment it additively with the (hidden) DMS read-side verbs.
deploymentCmd := deployment.NewDeploymentCommand()
deploymentCmd.AddCommand(renameTo(dms["get-deployment"], "get"))
deploymentCmd.AddCommand(renameTo(dms["list-deployments"], "list"))
cmd.AddCommand(deploymentCmd)

// The three new groups are hidden too; cobra hides a parent when all
// of its children are hidden, but we set the flag explicitly so the
// group disappears from `bundle --help` even if a future child is
// added without the hide flag.
versionCmd := &cobra.Command{
Use: "version",
Short: "Read version records in the bundle metadata service.",
Hidden: true,
}
versionCmd.AddCommand(renameTo(dms["get-version"], "get"))
versionCmd.AddCommand(renameTo(dms["list-versions"], "list"))
cmd.AddCommand(versionCmd)

resourceCmd := &cobra.Command{
Use: "resource",
Short: "Read resource records from the bundle metadata service.",
Hidden: true,
}
resourceCmd.AddCommand(renameTo(dms["get-resource"], "get"))
resourceCmd.AddCommand(renameTo(dms["list-resources"], "list"))
cmd.AddCommand(resourceCmd)

operationCmd := &cobra.Command{
Use: "operation",
Short: "Read operation records in the bundle metadata service.",
Hidden: true,
}
operationCmd.AddCommand(renameTo(dms["get-operation"], "get"))
operationCmd.AddCommand(renameTo(dms["list-operations"], "list"))
cmd.AddCommand(operationCmd)

return cmd
}
40 changes: 0 additions & 40 deletions cmd/bundle/metadata_service.go

This file was deleted.

7 changes: 0 additions & 7 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ func New(ctx context.Context) *cobra.Command {
// Add workspace subcommands.
workspaceCommands := workspace.All()
for _, cmd := range workspaceCommands {
// The auto-generated `bundle-deployments` workspace service (DMS) is
// surfaced under the DAB `bundle` command tree (cmd/bundle). Skip the
// generated top-level command; callers still have `databricks api ...`
// for the DMS endpoints.
if cmd.Name() == "bundle-deployments" {
continue
}
// Order the permissions subcommands after the main commands.
for _, sub := range cmd.Commands() {
// some commands override groups in overrides.go, leave them as-is
Expand Down
Loading