Skip to content

bundle generate: add subcommands for every deployment-engine resource type - #7365

Draft
janniklasrose wants to merge 7 commits into
mainfrom
janniklasrose/bundle-generate-machinery
Draft

janniklasrose wants to merge 7 commits into
mainfrom
janniklasrose/bundle-generate-machinery

Conversation

@janniklasrose

@janniklasrose janniklasrose commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Changes

databricks bundle generate gains a subcommand for every bundle resource type. generate.NewCommands() derives the list from dresources.SupportedResources: each type gets the generic command unless a hand-written generator is registered for it in the generators map. That map holds the six existing commands (job, pipeline, dashboard, alert, app, genie-space), which also download files or have a watch mode. Folding them into the generic path is follow-up work; each one removed deletes a map entry. Job runs and the internal snapshot type are the only types without a command.

The generic command has no per-resource code. It runs the type's direct-engine adapter:

  1. Adapter.DoRead(id) fetches the remote object. --existing-id takes the same identifier bundle deployment bind uses for the type.
  2. Adapter.RemapState converts it to the engine's state type, which is the create-request shape the bundle config embeds. The adapters already handle the awkward cases (serving endpoint Output to Input config, unwrapping GetExperimentResponse), so generate inherits them.
  3. The state is mapped onto the bundle resource type (looked up by JSON tag in config.Resources) via a JSON round-trip and fed back through Adapter.PrepareState. If that does not reproduce the state, the type's state is shaped differently from its configuration and the command fails with "not supported yet" instead of writing YAML that would not deploy. Secret scopes hit this today (scope vs name); the fix belongs in the adapter.
  4. The resource key defaults to the normalized GetName() of the bundle resource; --key overrides it. The file is written to <config-dir>/<key>.<type>.yml under the bundle root, with the usual include warning and hidden --bind.

Because the YAML is derived from the engine's own remote-to-state mapping, a generate followed by a deploy is drift-free by construction.

Other changes:

  • libs/dyn/yamlsaver: ConvertToMapValue without an explicit Order now numbers entries so the alphabetical sort survives encoding. Previously the encoder fell back to Go map iteration order. The three existing callers (job and pipeline converters, schema annotations writer) all pass an Order and take the unchanged branch.
  • cmd/bundle/generate_test.go: parity test that fails when a group in config.SupportedResources() has neither a generate subcommand nor an entry in generateUnsupported.

Not in this PR: dropping fields the engine classifies as output_only from the generated YAML. They round-trip through deploy without drift, so this is cosmetic until the per-type acceptance tests show how noisy they are.

Why

bundle generate covered six resource types, each a hand-written command. The direct engine already knows how to read every resource type and how its remote shape maps onto bundle configuration, so a generic command on top of the adapters gets the remaining types at once and stays correct as adapters evolve.

Tests

  • cmd/bundle/generate/generic_test.go runs the generic path against the mocked workspace client for catalogs (happy path, --key, --config-dir, overwrite protection, read errors), experiments (wrapper response unwrapped by the adapter), and secret scopes (round-trip check rejects the type), and checks the assembled command list.
  • acceptance/bundle/generate/catalog creates a catalog on the fake server, generates it, and validates the bundle.
  • bundle/generate/resource_test.go and libs/dyn/yamlsaver/utils_test.go cover serialization order.
  • Help goldens for bundle generate regenerated.

Stacked follow-ups: an acceptance test per resource type, adapter fixes for types that fail the round-trip check, and folding the hand-written generators into the generic path.

This pull request and its description were written by Isaac.

janniklasrose and others added 2 commits November 4, 2026 22:27
ConvertToMapValue sorts keys alphabetically, but without an Order the entries
were stored with zero-valued locations and the encoder, which orders by
Location.Line, fell back to Go map iteration order. Number the entries so the
sorted order survives. Existing callers all pass an Order and are unaffected.

Co-authored-by: Isaac <no-reply@databricks.com>
Adds a table-driven generate subcommand for resource types that are read with
one API call and have no files to download. A resource[R, C] entry names the
lookup flag and a typed fetch; the command narrows the response to the bundle
resource type via a JSON round-trip, drops CLI-managed and skipped fields,
derives the key from the resource name, writes <config-dir>/<key>.<type>.yml
under the bundle root, warns if the file is not included, and supports the
hidden --bind flag like the existing generators.

The table starts empty; resource families are added in follow-up PRs. A
parity test in cmd/bundle fails when a group from config.SupportedResources
is neither generated nor listed as unsupported, so new resource types get an
explicit decision.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the DABs DABs related issues label Nov 4, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 66f1069

Run: 42845150977

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 271 20 9:26
✅​ aws-windows-latest-4core-16gb 273 18 5:34
🔄​ azure linux-2core-8gb 2 268 20 7:50
✅​ azure-windows-latest-4core-16gb 272 18 6:28
✅​ gcp linux-2core-8gb 271 20 7:33
✅​ gcp-windows-latest-4core-16gb 273 18 6:31
Test Name azure linux-2core-8gb
🔄​ TestFsCpFileToDir 🔄​f
🔄​ TestFsCpFileToDir/dbfs_to_uc-volumes 🔄​f
Top 5 slowest tests (at least 2 minutes):
duration env testname
3:08 azure-windows-latest-4core-16gb TestAccept
3:04 aws-windows-latest-4core-16gb TestAccept
3:00 gcp-windows-latest-4core-16gb TestAccept
2:34 aws linux-2core-8gb TestTelemetryEndpoint
2:15 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsStat

…ne adapters

Replaces the hand-written spec table with one subcommand per resource type in
dresources.SupportedResources. Each command reads the resource through its
adapter (DoRead), converts it with RemapState to the create-request shape the
bundle config embeds, and maps that onto the bundle resource type via JSON.
The mapping is fed back through PrepareState and must reproduce the state;
otherwise the command fails with "not supported yet" rather than writing YAML
that would not deploy (secret scopes today).

The adapters already handle the awkward cases, such as unwrapping the
experiment response and converting serving endpoint Output to Input config, so
generate inherits them and stays drift-free with deploy by construction.

Co-authored-by: Isaac <no-reply@databricks.com>
@janniklasrose janniklasrose changed the title bundle generate: add machinery for table-driven resource generators bundle generate: add subcommands for every deployment-engine resource type Nov 9, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 66f10691d | Workflow run

Regression test report

Selected 5 changed tests (limit=20, 0 not selected)

10 tests: regression=10 unreleased=0 coverage=0 failing=0
test branch main (6a8d9bf) latest (v1.25.0)
TestAccept/bundle/generate/catalog/DMS= ✅ ❌ ❌
TestAccept/bundle/generate/catalog/DMS=true ✅ ❌ ❌
TestAccept/bundle/help/bundle-generate-dashboard/DMS= ✅ ❌ ❌
TestAccept/bundle/help/bundle-generate-dashboard/DMS=true ✅ ❌ ❌
TestAccept/bundle/help/bundle-generate-job/DMS= ✅ ❌ ❌
TestAccept/bundle/help/bundle-generate-job/DMS=true ✅ ❌ ❌
TestAccept/bundle/help/bundle-generate-pipeline/DMS= ✅ ❌ ❌
TestAccept/bundle/help/bundle-generate-pipeline/DMS=true ✅ ❌ ❌
TestAccept/bundle/help/bundle-generate/DMS= ✅ ❌ ❌
TestAccept/bundle/help/bundle-generate/DMS=true ✅ ❌ ❌
TestAccept/bundle/generate/catalog/DMS=: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/generate/catalog/output.txt
        +++ /tmp/TestAcceptbundlegeneratecatalogDMS=3838088226/002/output.txt
        @@ -1,19 +1,30 @@
         
         >>> [CLI] bundle generate catalog --existing-id my_catalog
        -Catalog configuration successfully saved to [TEST_TMP_DIR]/resources/my_catalog.catalog.yml
        +Error: unknown flag: --existing-id
         
        ->>> cat resources/my_catalog.catalog.yml
        -resources:
        -  catalogs:
        -    my_catalog:
        -      comment: primary catalog
        -      name: my_catalog
        +Usage:
        +  databricks bundle generate [command]
         
        ->>> [CLI] bundle validate
        -Name: generate-catalog
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/generate-catalog/default
        +Available Commands:
        +  alert       Generate configuration for an alert
        +  app         Generate bundle configuration for a Databricks app
        +  dashboard   Generate configuration for a dashboard
        +  genie-space Generate configuration for a Genie space
        +  job         Generate bundle configuration for a job
        +  pipeline    Generate bundle configuration for a pipeline
         
        -Validation OK!
        +Flags:
        +  -h, --help         help for generate
        +      --key string   resource key to use for the generated configuration
        +
        +Global Flags:
        +      --debug            enable debug logging
        +  -o, --output type      output type: text or json (default text)
        +  -p, --profile string   ~/.databrickscfg profile
        +  -t, --target string    bundle target to use (if applicable)
        +      --var strings      set values for variables defined in bundle config. Example: --var="foo=bar"
        +
        +Use "databricks bundle generate [command] --help" for more information about a command.
        +
        +
        +Exit code: 1

latest (v1.25.0): same output as main (6a8d9bf)

TestAccept/bundle/generate/catalog/DMS=true: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/generate/catalog/output.txt
        +++ /tmp/TestAcceptbundlegeneratecatalogDMS=true3901069347/002/output.txt
        @@ -1,19 +1,30 @@
         
         >>> [CLI] bundle generate catalog --existing-id my_catalog
        -Catalog configuration successfully saved to [TEST_TMP_DIR]/resources/my_catalog.catalog.yml
        +Error: unknown flag: --existing-id
         
        ->>> cat resources/my_catalog.catalog.yml
        -resources:
        -  catalogs:
        -    my_catalog:
        -      comment: primary catalog
        -      name: my_catalog
        +Usage:
        +  databricks bundle generate [command]
         
        ->>> [CLI] bundle validate
        -Name: generate-catalog
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/generate-catalog/default
        +Available Commands:
        +  alert       Generate configuration for an alert
        +  app         Generate bundle configuration for a Databricks app
        +  dashboard   Generate configuration for a dashboard
        +  genie-space Generate configuration for a Genie space
        +  job         Generate bundle configuration for a job
        +  pipeline    Generate bundle configuration for a pipeline
         
        -Validation OK!
        +Flags:
        +  -h, --help         help for generate
        +      --key string   resource key to use for the generated configuration
        +
        +Global Flags:
        +      --debug            enable debug logging
        +  -o, --output type      output type: text or json (default text)
        +  -p, --profile string   ~/.databrickscfg profile
        +  -t, --target string    bundle target to use (if applicable)
        +      --var strings      set values for variables defined in bundle config. Example: --var="foo=bar"
        +
        +Use "databricks bundle generate [command] --help" for more information about a command.
        +
        +
        +Exit code: 1

latest (v1.25.0): same output as main (6a8d9bf)

TestAccept/bundle/help/bundle-generate-dashboard/DMS=: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate-dashboard/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generate-dashboardDMS=819933095/002/output.txt
        @@ -35,9 +35,6 @@
         Usage:
           databricks bundle generate dashboard [flags]
         
        -Aliases:
        -  dashboard, dashboards
        -
         Flags:
           -s, --dashboard-dir string   directory to write the dashboard representation to (default "src")
               --existing-id string     ID of the dashboard to generate configuration for

latest (v1.25.0): same output as main (6a8d9bf)

TestAccept/bundle/help/bundle-generate-dashboard/DMS=true: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate-dashboard/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generate-dashboardDMS=true1977030833/002/output.txt
        @@ -35,9 +35,6 @@
         Usage:
           databricks bundle generate dashboard [flags]
         
        -Aliases:
        -  dashboard, dashboards
        -
         Flags:
           -s, --dashboard-dir string   directory to write the dashboard representation to (default "src")
               --existing-id string     ID of the dashboard to generate configuration for

latest (v1.25.0):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate-dashboard/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generate-dashboardDMS=true2295664087/002/output.txt
        @@ -35,9 +35,6 @@
         Usage:
           databricks bundle generate dashboard [flags]
         
        -Aliases:
        -  dashboard, dashboards
        -
         Flags:
           -s, --dashboard-dir string   directory to write the dashboard representation to (default "src")
               --existing-id string     ID of the dashboard to generate configuration for
        
FAIL
TestAccept/bundle/help/bundle-generate-job/DMS=: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate-job/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generate-jobDMS=3286670579/002/output.txt
        @@ -28,9 +28,6 @@
         Usage:
           databricks bundle generate job [flags]
         
        -Aliases:
        -  job, jobs
        -
         Flags:
           -d, --config-dir string             Dir path where the output config will be stored (default "resources")
               --download-spark-python-files   download workspace files referenced by spark_python_task and rewrite them to a relative path

latest (v1.25.0): same output as main (6a8d9bf)

TestAccept/bundle/help/bundle-generate-job/DMS=true: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate-job/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generate-jobDMS=true1365012285/002/output.txt
        @@ -28,9 +28,6 @@
         Usage:
           databricks bundle generate job [flags]
         
        -Aliases:
        -  job, jobs
        -
         Flags:
           -d, --config-dir string             Dir path where the output config will be stored (default "resources")
               --download-spark-python-files   download workspace files referenced by spark_python_task and rewrite them to a relative path

latest (v1.25.0): same output as main (6a8d9bf)

TestAccept/bundle/help/bundle-generate-pipeline/DMS=: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate-pipeline/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generate-pipelineDMS=3759962248/002/output.txt
        @@ -27,9 +27,6 @@
         Usage:
           databricks bundle generate pipeline [flags]
         
        -Aliases:
        -  pipeline, pipelines
        -
         Flags:
           -d, --config-dir string             Dir path where the output config will be stored (default "resources")
               --existing-pipeline-id string   ID of the pipeline to generate config for

latest (v1.25.0): same output as main (6a8d9bf)

TestAccept/bundle/help/bundle-generate-pipeline/DMS=true: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate-pipeline/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generate-pipelineDMS=true3883317316/002/output.txt
        @@ -27,9 +27,6 @@
         Usage:
           databricks bundle generate pipeline [flags]
         
        -Aliases:
        -  pipeline, pipelines
        -
         Flags:
           -d, --config-dir string             Dir path where the output config will be stored (default "resources")
               --existing-pipeline-id string   ID of the pipeline to generate config for

latest (v1.25.0): same output as main (6a8d9bf)

TestAccept/bundle/help/bundle-generate/DMS=: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generateDMS=895117641/002/output.txt
        @@ -27,47 +27,12 @@
           databricks bundle generate [command]
         
         Available Commands:
        -  alert                      Generate configuration for an alert
        -  app                        Generate bundle configuration for a Databricks app
        -  catalog                    Generate bundle configuration for a catalog
        -  cluster                    Generate bundle configuration for a cluster
        -  cluster-policy             Generate bundle configuration for a cluster policy
        -  dashboard                  Generate configuration for a dashboard
        -  data-quality-monitor       Generate bundle configuration for a data quality monitor
        -  database-catalog           Generate bundle configuration for a database catalog
        -  database-instance          Generate bundle configuration for a database instance
        -  experiment                 Generate bundle configuration for an experiment
        -  external-location          Generate bundle configuration for an external location
        -  feature                    Generate bundle configuration for a feature
        -  genie-space                Generate configuration for a Genie space
        -  instance-pool              Generate bundle configuration for an instance pool
        -  job                        Generate bundle configuration for a job
        -  materialization-set        Generate bundle configuration for a materialization set
        -  mcp-service                Generate bundle configuration for a mcp service
        -  model                      Generate bundle configuration for a model
        -  model-provider-service     Generate bundle configuration for a model provider service
        -  model-service              Generate bundle configuration for a model service
        -  model-serving-endpoint     Generate bundle configuration for a model serving endpoint
        -  pipeline                   Generate bundle configuration for a pipeline
        -  postgres-branch            Generate bundle configuration for a postgres branch
        -  postgres-catalog           Generate bundle configuration for a postgres catalog
        -  postgres-data-api          Generate bundle configuration for a postgres data api
        -  postgres-database          Generate bundle configuration for a postgres database
        -  postgres-endpoint          Generate bundle configuration for a postgres endpoint
        -  postgres-project           Generate bundle configuration for a postgres project
        -  postgres-role              Generate bundle configuration for a postgres role
        -  postgres-snapshot-schedule Generate bundle configuration for a postgres snapshot schedule
        -  postgres-synced-table      Generate bundle configuration for a postgres synced table
        -  quality-monitor            Generate bundle configuration for a quality monitor
        -  registered-model           Generate bundle configuration for a registered model
        -  schema                     Generate bundle configuration for a schema
        -  secret                     Generate bundle configuration for a secret
        -  secret-scope               Generate bundle configuration for a secret scope
        -  sql-warehouse              Generate bundle configuration for a sql warehouse
        -  synced-database-table      Generate bundle configuration for a synced database table
        -  vector-search-endpoint     Generate bundle configuration for a vector search endpoint
        -  vector-search-index        Generate bundle configuration for a vector search index
        -  volume                     Generate bundle configuration for a volume
        +  alert       Generate configuration for an alert
        +  app         Generate bundle configuration for a Databricks app
        +  dashboard   Generate configuration for a dashboard
        +  genie-space Generate configuration for a Genie space
        +  job         Generate bundle configuration for a job
        +  pipeline    Generate bundle configuration for a pipeline
         
         Flags:
           -h, --help         help for generate

latest (v1.25.0): same output as main (6a8d9bf)

TestAccept/bundle/help/bundle-generate/DMS=true: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generateDMS=true1555751943/002/output.txt
        @@ -27,47 +27,12 @@
           databricks bundle generate [command]
         
         Available Commands:
        -  alert                      Generate configuration for an alert
        -  app                        Generate bundle configuration for a Databricks app
        -  catalog                    Generate bundle configuration for a catalog
        -  cluster                    Generate bundle configuration for a cluster
        -  cluster-policy             Generate bundle configuration for a cluster policy
        -  dashboard                  Generate configuration for a dashboard
        -  data-quality-monitor       Generate bundle configuration for a data quality monitor
        -  database-catalog           Generate bundle configuration for a database catalog
        -  database-instance          Generate bundle configuration for a database instance
        -  experiment                 Generate bundle configuration for an experiment
        -  external-location          Generate bundle configuration for an external location
        -  feature                    Generate bundle configuration for a feature
        -  genie-space                Generate configuration for a Genie space
        -  instance-pool              Generate bundle configuration for an instance pool
        -  job                        Generate bundle configuration for a job
        -  materialization-set        Generate bundle configuration for a materialization set
        -  mcp-service                Generate bundle configuration for a mcp service
        -  model                      Generate bundle configuration for a model
        -  model-provider-service     Generate bundle configuration for a model provider service
        -  model-service              Generate bundle configuration for a model service
        -  model-serving-endpoint     Generate bundle configuration for a model serving endpoint
        -  pipeline                   Generate bundle configuration for a pipeline
        -  postgres-branch            Generate bundle configuration for a postgres branch
        -  postgres-catalog           Generate bundle configuration for a postgres catalog
        -  postgres-data-api          Generate bundle configuration for a postgres data api
        -  postgres-database          Generate bundle configuration for a postgres database
        -  postgres-endpoint          Generate bundle configuration for a postgres endpoint
        -  postgres-project           Generate bundle configuration for a postgres project
        -  postgres-role              Generate bundle configuration for a postgres role
        -  postgres-snapshot-schedule Generate bundle configuration for a postgres snapshot schedule
        -  postgres-synced-table      Generate bundle configuration for a postgres synced table
        -  quality-monitor            Generate bundle configuration for a quality monitor
        -  registered-model           Generate bundle configuration for a registered model
        -  schema                     Generate bundle configuration for a schema
        -  secret                     Generate bundle configuration for a secret
        -  secret-scope               Generate bundle configuration for a secret scope
        -  sql-warehouse              Generate bundle configuration for a sql warehouse
        -  synced-database-table      Generate bundle configuration for a synced database table
        -  vector-search-endpoint     Generate bundle configuration for a vector search endpoint
        -  vector-search-index        Generate bundle configuration for a vector search index
        -  volume                     Generate bundle configuration for a volume
        +  alert       Generate configuration for an alert
        +  app         Generate bundle configuration for a Databricks app
        +  dashboard   Generate configuration for a dashboard
        +  genie-space Generate configuration for a Genie space
        +  job         Generate bundle configuration for a job
        +  pipeline    Generate bundle configuration for a pipeline
         
         Flags:
           -h, --help         help for generate
        
FAIL

latest (v1.25.0):

acceptance_test.go:1346: Diff:
        --- bundle/help/bundle-generate/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-generateDMS=true3619220282/002/output.txt
        @@ -27,47 +27,12 @@
           databricks bundle generate [command]
         
         Available Commands:
        -  alert                      Generate configuration for an alert
        -  app                        Generate bundle configuration for a Databricks app
        -  catalog                    Generate bundle configuration for a catalog
        -  cluster                    Generate bundle configuration for a cluster
        -  cluster-policy             Generate bundle configuration for a cluster policy
        -  dashboard                  Generate configuration for a dashboard
        -  data-quality-monitor       Generate bundle configuration for a data quality monitor
        -  database-catalog           Generate bundle configuration for a database catalog
        -  database-instance          Generate bundle configuration for a database instance
        -  experiment                 Generate bundle configuration for an experiment
        -  external-location          Generate bundle configuration for an external location
        -  feature                    Generate bundle configuration for a feature
        -  genie-space                Generate configuration for a Genie space
        -  instance-pool              Generate bundle configuration for an instance pool
        -  job                        Generate bundle configuration for a job
        -  materialization-set        Generate bundle configuration for a materialization set
        -  mcp-service                Generate bundle configuration for a mcp service
        -  model                      Generate bundle configuration for a model
        -  model-provider-service     Generate bundle configuration for a model provider service
        -  model-service              Generate bundle configuration for a model service
        -  model-serving-endpoint     Generate bundle configuration for a model serving endpoint
        -  pipeline                   Generate bundle configuration for a pipeline
        -  postgres-branch            Generate bundle configuration for a postgres branch
        -  postgres-catalog           Generate bundle configuration for a postgres catalog
        -  postgres-data-api          Generate bundle configuration for a postgres data api
        -  postgres-database          Generate bundle configuration for a postgres database
        -  postgres-endpoint          Generate bundle configuration for a postgres endpoint
        -  postgres-project           Generate bundle configuration for a postgres project
        -  postgres-role              Generate bundle configuration for a postgres role
        -  postgres-snapshot-schedule Generate bundle configuration for a postgres snapshot schedule
        -  postgres-synced-table      Generate bundle configuration for a postgres synced table
        -  quality-monitor            Generate bundle configuration for a quality monitor
        -  registered-model           Generate bundle configuration for a registered model
        -  schema                     Generate bundle configuration for a schema
        -  secret                     Generate bundle configuration for a secret
        -  secret-scope               Generate bundle configuration for a secret scope
        -  sql-warehouse              Generate bundle configuration for a sql warehouse
        -  synced-database-table      Generate bundle configuration for a synced database table
        -  vector-search-endpoint     Generate bundle configuration for a vector search endpoint
        -  vector-search-index        Generate bundle configuration for a vector search index
        -  volume                     Generate bundle configuration for a volume
        +  alert       Generate configuration for an alert
        +  app         Generate bundle configuration for a Databricks app
        +  dashboard   Generate configuration for a dashboard
        +  genie-space Generate configuration for a Genie space
        +  job         Generate bundle configuration for a job
        +  pipeline    Generate bundle configuration for a pipeline
         
         Flags:
           -h, --help         help for generate

janniklasrose and others added 2 commits November 10, 2026 11:30
…urce types

generate.NewCommands now owns the list: every type in dresources.SupportedResources
gets the generic command unless a hand-written generator is registered for it in
the generators map, which exists for the six types that also download files or
have a watch mode. Folding those into the generic path means deleting their map
entry.

Co-authored-by: Isaac <no-reply@databricks.com>
…every command

The hand-written job, pipeline, and app commands keep their own lookup flag but
also parse --existing-id, via a pflag normalize alias, so every generate command
takes the same identifier. Each command additionally answers to its resource
group ("jobs", "catalogs"), so a caller holding a key from deployment state can
address it without a plural-to-singular mapping.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

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

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants