Skip to content

[draft] Add bundle deploy --exclude resource selector - #7348

Open
lennartkats-db wants to merge 3 commits into
mainfrom
codex/bundle-deploy-exclude-6978
Open

lennartkats-db wants to merge 3 commits into
mainfrom
codex/bundle-deploy-exclude-6978

Conversation

@lennartkats-db

@lennartkats-db lennartkats-db commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Add --exclude to bundle deploy and bundle plan so a direct-engine plan can omit named resources and their grants and permissions.
  • Reject exclusions that would leave a required reference unresolved or change the ID of a resource still referenced by an excluded deployment.
  • Cover repeated and invalid selectors, plan filtering, and the two-stage deploy workflow in Go and local acceptance tests. Document the selector and its limits.

Why

Issue #6978 asks for a way to deploy prerequisites first and defer a small set of resources without maintaining a growing --select list. The dependency checks prevent a partial plan from breaking retained resources.

Tests

  • go test ./bundle/deployplan ./bundle/phases ./cmd/bundle/...
  • go test ./acceptance -run 'TestAccept/bundle/select/(exclude_basic|basic)$' -count=1
  • go test ./acceptance -run TestAccept/bundle/help/bundle-deploy -count=1
  • ./task checks
  • CI lint passed on head 34038de. Local ./task lint stopped at Ruff download because this environment could not resolve pypi.org.

This PR was written by Codex.

@lennartkats-db
lennartkats-db requested review from a team as code owners November 4, 2026 15:19
@lennartkats-db lennartkats-db added the software-factory PR produced by the software factories task label Nov 4, 2026
@lennartkats-db
lennartkats-db requested review from Sankalp-Mittal and removed request for Sankalp-Mittal and rclarey November 4, 2026 15:19
@github-actions github-actions Bot added the DABs DABs related issues label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 34038dee3 | Workflow run

Regression test report

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

6 tests: regression=6 unreleased=0 coverage=0 failing=0
test branch main (e1b8c92) latest (v1.24.0)
TestAccept/bundle/help/bundle-deploy/DMS= ✅ ❌ ❌
TestAccept/bundle/help/bundle-deploy/DMS=true ✅ ❌ ❌
TestAccept/bundle/select/exclude_basic/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/select/exclude_basic/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/select/exclude_basic/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/select/exclude_basic/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/help/bundle-deploy/DMS=: branch ✅ | main (e1b8c92) ❌ | latest (v1.24.0) ❌

main (e1b8c92):

acceptance_test.go:1342: Diff:
        --- bundle/help/bundle-deploy/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-deployDMS=2402202739/002/output.txt
        @@ -15,7 +15,6 @@
         Flags:
               --auto-approve          Skip interactive approvals that might be required for deployment.
           -c, --cluster-id string     Override cluster in the deployment with the given cluster ID.
        -      --exclude strings       Deploy all resources except the specified resource (e.g. 'my_job' or 'jobs.my_job'). Can be repeated or comma-separated.
               --fail-on-active-runs   Fail if there are running jobs or pipelines in the deployment.
               --force                 Force-override Git branch validation.
               --force-lock            Force acquisition of deployment lock.

latest (v1.24.0): same output as main (e1b8c92)

TestAccept/bundle/help/bundle-deploy/DMS=true: branch ✅ | main (e1b8c92) ❌ | latest (v1.24.0) ❌

main (e1b8c92):

acceptance_test.go:1342: Diff:
        --- bundle/help/bundle-deploy/output.txt
        +++ /tmp/TestAcceptbundlehelpbundle-deployDMS=true3751121207/002/output.txt
        @@ -15,7 +15,6 @@
         Flags:
               --auto-approve          Skip interactive approvals that might be required for deployment.
           -c, --cluster-id string     Override cluster in the deployment with the given cluster ID.
        -      --exclude strings       Deploy all resources except the specified resource (e.g. 'my_job' or 'jobs.my_job'). Can be repeated or comma-separated.
               --fail-on-active-runs   Fail if there are running jobs or pipelines in the deployment.
               --force                 Force-override Git branch validation.
               --force-lock            Force acquisition of deployment lock.
        
FAIL

latest (v1.24.0): same output as main (e1b8c92)

TestAccept/bundle/select/exclude_basic/DMS=/READPLAN=: branch ✅ | main (e1b8c92) ❌ | latest (v1.24.0) ❌

main (e1b8c92):

acceptance_test.go:1342: Diff:
        --- bundle/select/exclude_basic/output.txt
        +++ /tmp/TestAcceptbundleselectexclude_basicDMS=READPLAN=2575944016/002/output.txt
        @@ -1,95 +1,27 @@
         
         >>> [CLI] bundle plan --exclude jobs.deferred
        -create jobs.prerequisite
        +Error: unknown flag: --exclude
         
        -Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged, 1 not selected
        +Usage:
        +  databricks bundle plan [flags]
         
        ->>> [CLI] bundle plan --exclude jobs.deferred --exclude deferred
        -create jobs.prerequisite
        +Flags:
        +  -c, --cluster-id string   Override cluster in the deployment with the given cluster ID.
        +      --force               Force-override Git branch validation.
        +  -h, --help                help for plan
        +  -q, --quiet count         Reduce output: -q prints only the summary, -qq prints nothing on success.
        +      --select strings      Plan only the specified resource (e.g. 'my_job' or 'jobs.my_job'). Can be repeated or comma-separated.
         
        -Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged, 1 not selected
        +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"
         
        ->>> [CLI] bundle plan --exclude jobs.prerequisite
        -Error: cannot exclude jobs.prerequisite: jobs.deferred depends on it through ${resources.jobs.prerequisite.id}; also exclude jobs.deferred or remove the dependency
         
        -
        ->>> [CLI] bundle deploy --exclude jobs.missing
        -Error: no such resource: jobs.missing
        -
        -
        ->>> [CLI] bundle deploy --select jobs.deferred --exclude jobs.prerequisite
        -Error: --select and --exclude cannot be used together
        -
        ->>> [CLI] bundle deploy --exclude jobs.deferred --plan plan.json
        -Error: --exclude cannot be used with --plan; generate a filtered plan with bundle plan --exclude, then apply it with --plan
        -
        ->>> env DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle plan --exclude jobs.deferred
        -Error: the Terraform deployment engine has been removed in Databricks CLI v1.20.0
        -
        -Unset the DATABRICKS_BUNDLE_ENGINE environment variable (or set it to "direct") to deploy with the direct engine; existing Terraform state is migrated automatically. To keep using Terraform, revert to Databricks CLI v1.19.x.
        -See https://docs.databricks.com/dev-tools/bundles/direct for details
        -
        -=== Deploy prerequisites with --exclude
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/files...
        -Created jobs.prerequisite
        -Files: 4 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 not selected
        -
        ->>> [CLI] bundle summary
        -Name: exclude-[UNIQUE_NAME]
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default
        -Resources:
        -  Jobs:
        -    deferred:
        -      Name: deferred-[UNIQUE_NAME]
        -      URL:  (not deployed)
        -    prerequisite:
        -      Name: prerequisite-[UNIQUE_NAME]
        -      URL:  [DATABRICKS_URL]/jobs/[PREREQUISITE_ID]?w=[WORKSPACE_ID]
        -
        ->>> print_requests.py --nostamp --sort //jobs
        -{
        -  "method": "POST",
        -  "path": "/api/2.2/jobs/create",
        -  "body": {
        -    "deployment": {
        -      "kind": "BUNDLE",
        -      "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/state/metadata.json"
        -    },
        -    "edit_mode": "UI_LOCKED",
        -    "format": "MULTI_TASK",
        -    "max_concurrent_runs": 1,
        -    "name": "prerequisite-[UNIQUE_NAME]",
        -    "queue": {
        -      "enabled": true
        -    }
        -  }
        -}
        -
        -=== Deploy deferred resource with --select
        -
        ->>> [CLI] bundle deploy --select jobs.deferred
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/files...
        -Created jobs.deferred
        -Files: 0 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 1 unchanged
        -
        ->>> [CLI] bundle plan --exclude jobs.deferred
        -Error: cannot exclude jobs.deferred: deployed jobs.deferred still depends on jobs.prerequisite through ${resources.jobs.prerequisite.id}, which is planned for delete; also exclude jobs.prerequisite or update jobs.deferred first
        -
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
        -
         === Destroy
         >>> [CLI] bundle destroy --auto-approve
        -The following resources will be deleted:
        -  delete resources.jobs.deferred
        -  delete resources.jobs.prerequisite
        +No active deployment found to destroy!
         
        -All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default
        -
        -Destroy: 2 deleted
        +Exit code: 1

latest (v1.24.0): same output as main (e1b8c92)

TestAccept/bundle/select/exclude_basic/DMS=/READPLAN=1: branch ✅ | main (e1b8c92) ❌ | latest (v1.24.0) ❌

main (e1b8c92):

acceptance_test.go:1342: Diff:
        --- bundle/select/exclude_basic/output.txt
        +++ /tmp/TestAcceptbundleselectexclude_basicDMS=READPLAN=13870257850/002/output.txt
        @@ -1,95 +1,27 @@
         
         >>> [CLI] bundle plan --exclude jobs.deferred
        -create jobs.prerequisite
        +Error: unknown flag: --exclude
         
        -Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged, 1 not selected
        +Usage:
        +  databricks bundle plan [flags]
         
        ->>> [CLI] bundle plan --exclude jobs.deferred --exclude deferred
        -create jobs.prerequisite
        +Flags:
        +  -c, --cluster-id string   Override cluster in the deployment with the given cluster ID.
        +      --force               Force-override Git branch validation.
        +  -h, --help                help for plan
        +  -q, --quiet count         Reduce output: -q prints only the summary, -qq prints nothing on success.
        +      --select strings      Plan only the specified resource (e.g. 'my_job' or 'jobs.my_job'). Can be repeated or comma-separated.
         
        -Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged, 1 not selected
        +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"
         
        ->>> [CLI] bundle plan --exclude jobs.prerequisite
        -Error: cannot exclude jobs.prerequisite: jobs.deferred depends on it through ${resources.jobs.prerequisite.id}; also exclude jobs.deferred or remove the dependency
         
        -
        ->>> [CLI] bundle deploy --exclude jobs.missing
        -Error: no such resource: jobs.missing
        -
        -
        ->>> [CLI] bundle deploy --select jobs.deferred --exclude jobs.prerequisite
        -Error: --select and --exclude cannot be used together
        -
        ->>> [CLI] bundle deploy --exclude jobs.deferred --plan plan.json
        -Error: --exclude cannot be used with --plan; generate a filtered plan with bundle plan --exclude, then apply it with --plan
        -
        ->>> env DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle plan --exclude jobs.deferred
        -Error: the Terraform deployment engine has been removed in Databricks CLI v1.20.0
        -
        -Unset the DATABRICKS_BUNDLE_ENGINE environment variable (or set it to "direct") to deploy with the direct engine; existing Terraform state is migrated automatically. To keep using Terraform, revert to Databricks CLI v1.19.x.
        -See https://docs.databricks.com/dev-tools/bundles/direct for details
        -
        -=== Deploy prerequisites with --exclude
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/files...
        -Created jobs.prerequisite
        -Files: 4 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 not selected
        -
        ->>> [CLI] bundle summary
        -Name: exclude-[UNIQUE_NAME]
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default
        -Resources:
        -  Jobs:
        -    deferred:
        -      Name: deferred-[UNIQUE_NAME]
        -      URL:  (not deployed)
        -    prerequisite:
        -      Name: prerequisite-[UNIQUE_NAME]
        -      URL:  [DATABRICKS_URL]/jobs/[PREREQUISITE_ID]?w=[WORKSPACE_ID]
        -
        ->>> print_requests.py --nostamp --sort //jobs
        -{
        -  "method": "POST",
        -  "path": "/api/2.2/jobs/create",
        -  "body": {
        -    "deployment": {
        -      "kind": "BUNDLE",
        -      "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/state/metadata.json"
        -    },
        -    "edit_mode": "UI_LOCKED",
        -    "format": "MULTI_TASK",
        -    "max_concurrent_runs": 1,
        -    "name": "prerequisite-[UNIQUE_NAME]",
        -    "queue": {
        -      "enabled": true
        -    }
        -  }
        -}
        -
        -=== Deploy deferred resource with --select
        -
        ->>> [CLI] bundle deploy --select jobs.deferred
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/files...
        -Created jobs.deferred
        -Files: 0 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 1 unchanged
        -
        ->>> [CLI] bundle plan --exclude jobs.deferred
        -Error: cannot exclude jobs.deferred: deployed jobs.deferred still depends on jobs.prerequisite through ${resources.jobs.prerequisite.id}, which is planned for delete; also exclude jobs.prerequisite or update jobs.deferred first
        -
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
        -
         === Destroy
         >>> [CLI] bundle destroy --auto-approve
        -The following resources will be deleted:
        -  delete resources.jobs.deferred
        -  delete resources.jobs.prerequisite
        +No active deployment found to destroy!
         
        -All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default
        -
        -Destroy: 2 deleted
        +Exit code: 1

latest (v1.24.0): same output as main (e1b8c92)

TestAccept/bundle/select/exclude_basic/DMS=true/READPLAN=: branch ✅ | main (e1b8c92) ❌ | latest (v1.24.0) ❌

main (e1b8c92):

acceptance_test.go:1342: Diff:
        --- bundle/select/exclude_basic/output.txt
        +++ /tmp/TestAcceptbundleselectexclude_basicDMS=trueREADPLAN=1617279060/002/output.txt
        @@ -1,95 +1,27 @@
         
         >>> [CLI] bundle plan --exclude jobs.deferred
        -create jobs.prerequisite
        +Error: unknown flag: --exclude
         
        -Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged, 1 not selected
        +Usage:
        +  databricks bundle plan [flags]
         
        ->>> [CLI] bundle plan --exclude jobs.deferred --exclude deferred
        -create jobs.prerequisite
        +Flags:
        +  -c, --cluster-id string   Override cluster in the deployment with the given cluster ID.
        +      --force               Force-override Git branch validation.
        +  -h, --help                help for plan
        +  -q, --quiet count         Reduce output: -q prints only the summary, -qq prints nothing on success.
        +      --select strings      Plan only the specified resource (e.g. 'my_job' or 'jobs.my_job'). Can be repeated or comma-separated.
         
        -Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged, 1 not selected
        +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"
         
        ->>> [CLI] bundle plan --exclude jobs.prerequisite
        -Error: cannot exclude jobs.prerequisite: jobs.deferred depends on it through ${resources.jobs.prerequisite.id}; also exclude jobs.deferred or remove the dependency
         
        -
        ->>> [CLI] bundle deploy --exclude jobs.missing
        -Error: no such resource: jobs.missing
        -
        -
        ->>> [CLI] bundle deploy --select jobs.deferred --exclude jobs.prerequisite
        -Error: --select and --exclude cannot be used together
        -
        ->>> [CLI] bundle deploy --exclude jobs.deferred --plan plan.json
        -Error: --exclude cannot be used with --plan; generate a filtered plan with bundle plan --exclude, then apply it with --plan
        -
        ->>> env DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle plan --exclude jobs.deferred
        -Error: the Terraform deployment engine has been removed in Databricks CLI v1.20.0
        -
        -Unset the DATABRICKS_BUNDLE_ENGINE environment variable (or set it to "direct") to deploy with the direct engine; existing Terraform state is migrated automatically. To keep using Terraform, revert to Databricks CLI v1.19.x.
        -See https://docs.databricks.com/dev-tools/bundles/direct for details
        -
        -=== Deploy prerequisites with --exclude
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/files...
        -Created jobs.prerequisite
        -Files: 4 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 not selected
        -
        ->>> [CLI] bundle summary
        -Name: exclude-[UNIQUE_NAME]
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default
        -Resources:
        -  Jobs:
        -    deferred:
        -      Name: deferred-[UNIQUE_NAME]
        -      URL:  (not deployed)
        -    prerequisite:
        -      Name: prerequisite-[UNIQUE_NAME]
        -      URL:  [DATABRICKS_URL]/jobs/[PREREQUISITE_ID]?w=[WORKSPACE_ID]
        -
        ->>> print_requests.py --nostamp --sort //jobs
        -{
        -  "method": "POST",
        -  "path": "/api/2.2/jobs/create",
        -  "body": {
        -    "deployment": {
        -      "kind": "BUNDLE",
        -      "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/state/metadata.json"
        -    },
        -    "edit_mode": "UI_LOCKED",
        -    "format": "MULTI_TASK",
        -    "max_concurrent_runs": 1,
        -    "name": "prerequisite-[UNIQUE_NAME]",
        -    "queue": {
        -      "enabled": true
        -    }
        -  }
        -}
        -
        -=== Deploy deferred resource with --select
        -
        ->>> [CLI] bundle deploy --select jobs.deferred
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/files...
        -Created jobs.deferred
        -Files: 0 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 1 unchanged
        -
        ->>> [CLI] bundle plan --exclude jobs.deferred
        -Error: cannot exclude jobs.deferred: deployed jobs.deferred still depends on jobs.prerequisite through ${resources.jobs.prerequisite.id}, which is planned for delete; also exclude jobs.prerequisite or update jobs.deferred first
        -
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
        -
         === Destroy
         >>> [CLI] bundle destroy --auto-approve
        -The following resources will be deleted:
        -  delete resources.jobs.deferred
        -  delete resources.jobs.prerequisite
        +No active deployment found to destroy!
         
        -All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default
        -
        -Destroy: 2 deleted
        +Exit code: 1

latest (v1.24.0): same output as main (e1b8c92)

TestAccept/bundle/select/exclude_basic/DMS=true/READPLAN=1: branch ✅ | main (e1b8c92) ❌ | latest (v1.24.0) ❌

main (e1b8c92):

acceptance_test.go:1342: Diff:
        --- bundle/select/exclude_basic/output.txt
        +++ /tmp/TestAcceptbundleselectexclude_basicDMS=trueREADPLAN=1969530008/002/output.txt
        @@ -1,95 +1,27 @@
         
         >>> [CLI] bundle plan --exclude jobs.deferred
        -create jobs.prerequisite
        +Error: unknown flag: --exclude
         
        -Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged, 1 not selected
        +Usage:
        +  databricks bundle plan [flags]
         
        ->>> [CLI] bundle plan --exclude jobs.deferred --exclude deferred
        -create jobs.prerequisite
        +Flags:
        +  -c, --cluster-id string   Override cluster in the deployment with the given cluster ID.
        +      --force               Force-override Git branch validation.
        +  -h, --help                help for plan
        +  -q, --quiet count         Reduce output: -q prints only the summary, -qq prints nothing on success.
        +      --select strings      Plan only the specified resource (e.g. 'my_job' or 'jobs.my_job'). Can be repeated or comma-separated.
         
        -Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged, 1 not selected
        +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"
         
        ->>> [CLI] bundle plan --exclude jobs.prerequisite
        -Error: cannot exclude jobs.prerequisite: jobs.deferred depends on it through ${resources.jobs.prerequisite.id}; also exclude jobs.deferred or remove the dependency
         
        -
        ->>> [CLI] bundle deploy --exclude jobs.missing
        -Error: no such resource: jobs.missing
        -
        -
        ->>> [CLI] bundle deploy --select jobs.deferred --exclude jobs.prerequisite
        -Error: --select and --exclude cannot be used together
        -
        ->>> [CLI] bundle deploy --exclude jobs.deferred --plan plan.json
        -Error: --exclude cannot be used with --plan; generate a filtered plan with bundle plan --exclude, then apply it with --plan
        -
        ->>> env DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle plan --exclude jobs.deferred
        -Error: the Terraform deployment engine has been removed in Databricks CLI v1.20.0
        -
        -Unset the DATABRICKS_BUNDLE_ENGINE environment variable (or set it to "direct") to deploy with the direct engine; existing Terraform state is migrated automatically. To keep using Terraform, revert to Databricks CLI v1.19.x.
        -See https://docs.databricks.com/dev-tools/bundles/direct for details
        -
        -=== Deploy prerequisites with --exclude
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/files...
        -Created jobs.prerequisite
        -Files: 4 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 not selected
        -
        ->>> [CLI] bundle summary
        -Name: exclude-[UNIQUE_NAME]
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default
        -Resources:
        -  Jobs:
        -    deferred:
        -      Name: deferred-[UNIQUE_NAME]
        -      URL:  (not deployed)
        -    prerequisite:
        -      Name: prerequisite-[UNIQUE_NAME]
        -      URL:  [DATABRICKS_URL]/jobs/[PREREQUISITE_ID]?w=[WORKSPACE_ID]
        -
        ->>> print_requests.py --nostamp --sort //jobs
        -{
        -  "method": "POST",
        -  "path": "/api/2.2/jobs/create",
        -  "body": {
        -    "deployment": {
        -      "kind": "BUNDLE",
        -      "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/state/metadata.json"
        -    },
        -    "edit_mode": "UI_LOCKED",
        -    "format": "MULTI_TASK",
        -    "max_concurrent_runs": 1,
        -    "name": "prerequisite-[UNIQUE_NAME]",
        -    "queue": {
        -      "enabled": true
        -    }
        -  }
        -}
        -
        -=== Deploy deferred resource with --select
        -
        ->>> [CLI] bundle deploy --select jobs.deferred
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default/files...
        -Created jobs.deferred
        -Files: 0 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 1 unchanged
        -
        ->>> [CLI] bundle plan --exclude jobs.deferred
        -Error: cannot exclude jobs.deferred: deployed jobs.deferred still depends on jobs.prerequisite through ${resources.jobs.prerequisite.id}, which is planned for delete; also exclude jobs.prerequisite or update jobs.deferred first
        -
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
        -
         === Destroy
         >>> [CLI] bundle destroy --auto-approve
        -The following resources will be deleted:
        -  delete resources.jobs.deferred
        -  delete resources.jobs.prerequisite
        +No active deployment found to destroy!
         
        -All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/exclude-[UNIQUE_NAME]/default
        -
        -Destroy: 2 deleted
        +Exit code: 1

latest (v1.24.0): same output as main (e1b8c92)

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 34038de

Run: 41859828889

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 271 17 6:40
✅​ aws-windows-latest-4core-16gb 273 15 6:53
✅​ azure linux-2core-8gb 270 17 6:58
✅​ azure-windows-latest-4core-16gb 272 15 7:10
✅​ gcp linux-2core-8gb 271 17 6:44
✅​ gcp-windows-latest-4core-16gb 273 15 7:07
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:37 gcp-windows-latest-4core-16gb TestAccept
3:32 azure-windows-latest-4core-16gb TestAccept
3:30 aws-windows-latest-4core-16gb TestAccept

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 software-factory PR produced by the software factories task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants