Skip to content

Add job_runs lifecycle.triggers.on_value_change - #6341

Open
radakam wants to merge 18 commits into
mainfrom
deco-job-runs-lifecycle-on-value-change
Open

radakam wants to merge 18 commits into
mainfrom
deco-job-runs-lifecycle-on-value-change

Conversation

@radakam

@radakam radakam commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Adds lifecycle.triggers.on_value_change for resources.job_runs (direct engine): re-fire the run when the interpolated value of a watched expression changes, e.g. a variable, ${workspace.root_path}, or another resource's id. ${resources.*} references in the expression become deploy dependencies.

Each watch is stored in state under its unresolved expression, with its resolved value. Adding a watch or changing a value re-fires the run, while removing, re-adding or reordering watches does not. The plan names the watch that changed, e.g. on_value_change['${var.stamp}']. A value that resolves to a map or a list is compared as JSON with sorted keys.

Why

on_bundle_deploy and on_file_change already re-fire a run on deploy and on file changes. on_value_change covers re-running when a config value the run depends on changes.

Tests

Acceptance tests in acceptance/bundle/resources/job_runs/on_value_change* (values, references, empty value, errors) and acceptance/bundle/python/job_runs-on_value_change (watches defined in YAML, in Python, and added by a Python mutator).

This pull request and its description were written by Isaac.

@radakam
radakam marked this pull request as ready for review August 21, 2026 15:59
@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

18 files changed
Suggested: @janniklasrose
Also eligible: @denik, @andrewnester, @pietern, @shreyas-goenka, @lennartkats-db, @anton-107

/bundle/ - needs approval

12 files changed
Suggested: @janniklasrose
Also eligible: @denik, @andrewnester, @pietern, @shreyas-goenka, @lennartkats-db, @anton-107

General files (require maintainer)

Files: .nextchanges/bundles/job-runs-on-value-change.md, python/databricks/bundles/job_runs/_models/job_run_trigger.py
Based on git history:

  • @janniklasrose -- recent work in bundle/config/mutator/, bundle/schema/, .nextchanges/bundles/

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 3bef2f2

Run: 46428639476

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 90 15 2:07
💚​ aws-windows-latest-4core-16gb 1 90 15 3:00
💚​ azure linux-2core-8gb 1 90 15 2:16
💚​ azure-windows-latest-4core-16gb 1 90 15 2:41
💚​ gcp linux-2core-8gb 1 90 15 2:05
💚​ gcp-windows-latest-4core-16gb 1 90 15 3:14
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 4 slowest tests (at least 2 minutes):
duration env testname
3:13 gcp-windows-latest-4core-16gb TestAccept
2:58 aws-windows-latest-4core-16gb TestAccept
2:39 azure-windows-latest-4core-16gb TestAccept
2:02 azure linux-2core-8gb TestAccept

@radakam
radakam force-pushed the deco-job-runs-lifecycle-on-value-change branch from 0db1f4b to e431088 Compare August 24, 2026 09:36
@radakam
radakam force-pushed the deco-job-runs-lifecycle-on-file-change branch 3 times, most recently from d65e640 to b0437a3 Compare August 25, 2026 10:12
@radakam
radakam marked this pull request as draft August 26, 2026 13:27
@radakam
radakam requested a review from denik August 27, 2026 17:18
@radakam
radakam marked this pull request as ready for review August 27, 2026 17:19
@denik
denik force-pushed the deco-job-runs-lifecycle-on-file-change branch 6 times, most recently from 69a8871 to cfc94b7 Compare September 9, 2026 14:12
@denik
denik force-pushed the deco-job-runs-lifecycle-on-file-change branch from 24f9f1f to 6391342 Compare September 10, 2026 12:52
Base automatically changed from deco-job-runs-lifecycle-on-file-change to main September 11, 2026 08:23
@denik
denik force-pushed the deco-job-runs-lifecycle-on-value-change branch 2 times, most recently from e303d92 to aa5189f Compare September 14, 2026 11:15
@denik
denik force-pushed the deco-job-runs-lifecycle-on-value-change branch from aa5189f to fb7ee59 Compare September 21, 2026 11:55
@denik
denik force-pushed the deco-job-runs-lifecycle-on-value-change branch from fb7ee59 to f529e5b Compare October 5, 2026 09:37
@denik
denik requested review from a team as code owners October 5, 2026 09:37
@github-actions github-actions Bot added the DABs DABs related issues label Oct 5, 2026
@denik
denik force-pushed the deco-job-runs-lifecycle-on-value-change branch from f529e5b to c682c05 Compare October 5, 2026 09:55
@denik
denik force-pushed the deco-job-runs-lifecycle-on-value-change branch from c682c05 to 94850c1 Compare November 9, 2026 10:29
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 3bef2f263 | Workflow run

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

19 tests: regression=19 unreleased=0 coverage=0 failing=0
test branch main (3442593) latest (v1.28.0)
TestAccept/bundle/bitmap/full ✅ ❌ ❌
TestAccept/bundle/bitmap/presence/DMS= ✅ ❌ ❌
TestAccept/bundle/bitmap/presence/DMS=true ✅ ❌ ❌
TestAccept/bundle/python/job_runs-on_value_change/DMS=/PYDAB_VERSION=current ✅ ❌ ❌
TestAccept/bundle/python/job_runs-on_value_change/DMS=true/PYDAB_VERSION=current ✅ ❌ ❌
TestAccept/bundle/refschema/DMS= ✅ ❌ ❌
TestAccept/bundle/refschema/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_empty/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_empty/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_errors/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_errors/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_ref/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_ref/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_ref/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_ref/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_ref_fields/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/job_runs/on_value_change_ref_fields/DMS=true ✅ ❌ ❌
TestAccept/bundle/bitmap/full: branch ✅ | main (3442593) ❌ | latest (v1.28.0) ❌

main (3442593):

acceptance_test.go:1402: Diff:
        --- bundle/bitmap/full/output/job_runs.txt
        +++ /tmp/TestAcceptbundlebitmapfull3521394331/001/output/job_runs.txt
        @@ -59,6 +59,3 @@
         1580 resources.job_runs.*.lifecycle.triggers_state.on_file_change
         1581 resources.job_runs.*.lifecycle.triggers_state.on_file_change.*
         1582 resources.job_runs.*.resolved_job_id
        -5273 resources.job_runs.*.lifecycle.triggers[*].on_value_change
        -5274 resources.job_runs.*.lifecycle.triggers_state.on_value_change
        -5275 resources.job_runs.*.lifecycle.triggers_state.on_value_change.*

latest (v1.28.0):

acceptance_test.go:1373: Missing output file: output/feature_specs.txt
    acceptance_test.go:1373: Missing output file: output/genie_spaces.txt
    acceptance_test.go:1373: Missing output file: output/internal_immutable_snapshots.txt
    acceptance_test.go:1373: Missing output file: output/postgres_roles.txt
    acceptance_test.go:1373: Missing output file: output/dashboards.txt
    acceptance_test.go:1373: Missing output file: output/database_catalogs.txt
    acceptance_test.go:1373: Missing output file: output/mcp_services.txt
    acceptance_test.go:1373: Missing output file: output/model_provider_services.txt
    acceptance_test.go:1373: Missing output file: output/postgres_snapshot_schedules.txt
    acceptance_test.go:1373: Missing output file: output/quality_monitors.txt
    acceptance_test.go:1373: Missing output file: output/secrets.txt
    acceptance_test.go:1373: Missing output file: output/sql_warehouses.txt
    acceptance_test.go:1373: Missing output file: output/database_instances.txt
    acceptance_test.go:1373: Missing output file: output/model_services.txt
    acceptance_test.go:1373: Missing output file: output/model_serving_endpoints.txt
    acceptance_test.go:1373: Missing output file: output/vector_search_endpoints.txt
    acceptance_test.go:1373: Missing output file: output/vector_search_indexes.txt
    acceptance_test.go:1373: Missing output file: output/catalogs.txt
    acceptance_test.go:1373: Missing output file: output/clusters.txt
    acceptance_test.go:1373: Missing output file: output/features.txt
    acceptance_test.go:1373: Missing output file: output/models.txt
    acceptance_test.go:1373: Missing output file: output/pipelines.txt
    acceptance_test.go:1373: Missing output file: output/postgres_catalogs.txt
    acceptance_test.go:1402: Diff:
        --- bundle/bitmap/full/output/root.txt
        +++ /tmp/TestAcceptbundlebitmapfull3651870399/001/output/root.txt
        @@ -1,332 +1,42 @@
        -   0 variables
        -   1 variables.*
        -   2 variables.*.type
        -   3 variables.*.default
        -   4 variables.*.description
        -   5 variables.*.sensitive
        -   6 variables.*.sensitive=true
        -   7 variables.*.sensitive=false
        -   8 variables.*.value
        -   9 variables.*.lookup
        -  10 variables.*.lookup.alert
        -  11 variables.*.lookup.cluster_policy
        -  12 variables.*.lookup.cluster
        -  13 variables.*.lookup.dashboard
        -  14 variables.*.lookup.instance_pool
        -  15 variables.*.lookup.job
        -  16 variables.*.lookup.metastore
        -  17 variables.*.lookup.notification_destination
        -  18 variables.*.lookup.pipeline
        -  19 variables.*.lookup.query
        -  20 variables.*.lookup.service_principal
        -  21 variables.*.lookup.warehouse
        -  22 bundle
        -  23 bundle.name
        -  24 bundle.terraform
        -  25 bundle.terraform.exec_path
        -  26 bundle.force
        -  27 bundle.force=true
        -  28 bundle.force=false
        -  29 bundle.git
        -  30 bundle.git.branch
        -  31 bundle.git.origin_url
        -  32 bundle.git.commit
        -  33 bundle.git.bundle_root_path
        -  34 bundle.git.actual_branch
        -  35 bundle.mode
        -  36 bundle.compute_id
        -  37 bundle.cluster_id
        -  38 bundle.engine
        -  39 bundle.deployment
        -  40 bundle.deployment.fail_on_active_runs
        -  41 bundle.deployment.fail_on_active_runs=true
        -  42 bundle.deployment.fail_on_active_runs=false
        -  43 bundle.deployment.lock
        -  44 bundle.deployment.lock.enabled
        -  45 bundle.deployment.lock.enabled=true
        -  46 bundle.deployment.lock.enabled=false
        -  47 bundle.deployment.lock.force
        -  48 bundle.deployment.lock.force=true
        -  49 bundle.deployment.lock.force=false
        -  50 bundle.deployment.deployment_id
        -  51 bundle.deployment.latest_version_id
        -  52 bundle.databricks_cli_version
        -  53 bundle.uuid
        -  54 include
        -  55 include[*]
        -  56 workspace
        -  57 workspace.host
        -  58 workspace.profile
        -  59 workspace.auth_type
        -  60 workspace.metadata_service_url
        -  61 workspace.client_id
        -  62 workspace.google_service_account
        -  63 workspace.azure_workspace_resource_id
        -  64 workspace.azure_use_msi
        -  65 workspace.azure_use_msi=true
        -  66 workspace.azure_use_msi=false
        -  67 workspace.azure_client_id
        -  68 workspace.azure_tenant_id
        -  69 workspace.azure_environment
        -  70 workspace.azure_login_app_id
        -  71 workspace.experimental_is_unified_host
        -  72 workspace.experimental_is_unified_host=true
        -  73 workspace.experimental_is_unified_host=false
        -  74 workspace.account_id
        -  75 workspace.workspace_id
        -  76 workspace.current_user
        -  77 workspace.current_user.short_name
        -  78 workspace.current_user.domain_friendly_name
        -  79 workspace.current_user.active
        -  80 workspace.current_user.active=true
        -  81 workspace.current_user.active=false
        -  82 workspace.current_user.displayName
        -  83 workspace.current_user.emails
        -  84 workspace.current_user.emails[*]
        -  85 workspace.current_user.emails[*].display
        -  86 workspace.current_user.emails[*].primary
        -  87 workspace.current_user.emails[*].primary=true
        -  88 workspace.current_user.emails[*].primary=false
        -  89 workspace.current_user.emails[*].$ref
        -  90 workspace.current_user.emails[*].type
        -  91 workspace.current_user.emails[*].value
        -  92 workspace.current_user.entitlements
        -  93 workspace.current_user.entitlements[*]
        -  94 workspace.current_user.entitlements[*].display
        -  95 workspace.current_user.entitlements[*].primary
        -  96 workspace.current_user.entitlements[*].primary=true
        -  97 workspace.current_user.entitlements[*].primary=false
        -  98 workspace.current_user.entitlements[*].$ref
        -  99 workspace.current_user.entitlements[*].type
        - 100 workspace.current_user.entitlements[*].value
        - 101 workspace.current_user.externalId
        - 102 workspace.current_user.groups
        - 103 workspace.current_user.groups[*]
        - 104 workspace.current_user.groups[*].display
        - 105 workspace.current_user.groups[*].primary
        - 106 workspace.current_user.groups[*].primary=true
        - 107 workspace.current_user.groups[*].primary=false
        - 108 workspace.current_user.groups[*].$ref
        - 109 workspace.current_user.groups[*].type
        - 110 workspace.current_user.groups[*].value
        - 111 workspace.current_user.id
        - 112 workspace.current_user.name
        - 113 workspace.current_user.name.familyName
        - 114 workspace.current_user.name.givenName
        - 115 workspace.current_user.roles
        - 116 workspace.current_user.roles[*]
        - 117 workspace.current_user.roles[*].display
        - 118 workspace.current_user.roles[*].primary
        - 119 workspace.current_user.roles[*].primary=true
        - 120 workspace.current_user.roles[*].primary=false
        - 121 workspace.current_user.roles[*].$ref
        - 122 workspace.current_user.roles[*].type
        - 123 workspace.current_user.roles[*].value
        - 124 workspace.current_user.schemas
        - 125 workspace.current_user.schemas[*]
        - 126 workspace.current_user.userName
        - 127 workspace.root_path
        - 128 workspace.file_path
        - 129 workspace.resource_path
        - 130 workspace.artifact_path
        - 131 workspace.state_path
        - 132 workspace.sync_mode
        - 133 artifacts
        - 134 artifacts.*
        - 135 artifacts.*.type
        - 136 artifacts.*.path
        - 137 artifacts.*.files
        - 138 artifacts.*.files[*]
        - 139 artifacts.*.files[*].source
        - 140 artifacts.*.files[*].patched
        - 141 artifacts.*.files[*].remote_path
        - 142 artifacts.*.build
        - 143 artifacts.*.executable
        - 144 artifacts.*.dynamic_version
        - 145 artifacts.*.dynamic_version=true
        - 146 artifacts.*.dynamic_version=false
        - 147 artifacts.*.include
        - 148 artifacts.*.include[*]
        - 149 artifacts.*.git
        - 150 artifacts.*.git.branch
        - 151 artifacts.*.git.commit
        - 152 resources
        -5094 sync
        -5095 sync.paths
        -5096 sync.paths[*]
        -5097 sync.include
        -5098 sync.include[*]
        -5099 sync.exclude
        -5100 sync.exclude[*]
        -5101 run_as
        -5102 run_as.group_name
        -5103 run_as.service_principal_name
        -5104 run_as.user_name
        -5105 presets
        -5106 presets.name_prefix
        -5107 presets.pipelines_development
        -5108 presets.pipelines_development=true
        -5109 presets.pipelines_development=false
        -5110 presets.trigger_pause_status
        -5111 presets.jobs_max_concurrent_runs
        -5112 presets.source_linked_deployment
        -5113 presets.source_linked_deployment=true
... (223 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/bitmap/presence/DMS=: branch ✅ | main (3442593) ❌ | latest (v1.28.0) ❌

main (3442593):

acceptance_test.go:1402: Diff:
        --- bundle/bitmap/presence/output.txt
        +++ /tmp/TestAcceptbundlebitmappresenceDMS=898731923/002/output.txt
        @@ -41,8 +41,37 @@
         >>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap -o json
         
         >>> diff.py LOG.future.txt LOG.future-python.txt
        +--- LOG.future.txt
        ++++ LOG.future-python.txt
        +@@ -63,3 +63,3 @@
        + P F telemetry.experimental.use_legacy_run_as
        + PT  telemetry.run_as_set
        +-P   future #[FUTURE_BIT]
        ++P   resources.job_runs.*.lifecycle.triggers_state.on_value_change
         
         >>> diff.py LOG.future.json LOG.future-python.json
        +--- LOG.future.json
        ++++ LOG.future-python.json
        +@@ -18,5 +18,4 @@
        +       "use_legacy_run_as": true
        +     },
        +-    "future #[FUTURE_BIT]": true,
        +     "presets": {
        +       "name_prefix": true,
        +@@ -29,4 +28,13 @@
        +           "lifecycle": {
        +             "started": true
        ++          }
        ++        }
        ++      },
        ++      "job_runs": {
        ++        "*": {
        ++          "lifecycle": {
        ++            "triggers_state": {
        ++              "on_value_change": true
        ++            }
        +           }
        +         }
         size=[FUTURE_SIZE] context=0
         P   future #[FUTURE_BIT]
         {
        
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMANwlp4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A\n"
        	            	actual  : "bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMCtwWB4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,2 @@
        	            	-bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMANwlp4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A
        	            	+bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMCtwWB4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A
        	            	 
        	Test:       	TestAccept/bundle/bitmap/presence/DMS=
        	Messages:   	bundle/bitmap/presence/out.bitmap.b64 vs /tmp/TestAcceptbundlebitmappresenceDMS=898731923/001/out.bitmap.b64
    acceptance_test.go:1180: 
        LOG.decode_python: 
        LOG.decode_python: >>> musterr uv run --isolated --no-project --reinstall-package databricks-bundles --with /home/runner/work/cli/cli/acceptance/build/linux_amd64/databricks_bundles-1.28.0-py3-none-any.whl -q python -m databricks.bundles._bitmap
        LOG.decode_python: Error: missing 'bm1.' prefix
    acceptance_test.go:1180: 
        LOG.future-python.json: {
        LOG.future-python.json:   "size": 5275,
        LOG.future-python.json:   "context": 0,
        LOG.future-python.json:   "presence": {
        LOG.future-python.json:     "artifacts": {
        LOG.future-python.json:       "*": {
        LOG.future-python.json:         "build": true,
        LOG.future-python.json:         "files[*]": {
        LOG.future-python.json:           "source": true
        LOG.future-python.json:         },
        LOG.future-python.json:         "type": true
        LOG.future-python.json:       }
        LOG.future-python.json:     },
        LOG.future-python.json:     "bundle": {
        LOG.future-python.json:       "name": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "experimental": {
        LOG.future-python.json:       "use_legacy_run_as": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "presets": {
        LOG.future-python.json:       "name_prefix": true,
        LOG.future-python.json:       "pipelines_development": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "resources": {
        LOG.future-python.json:       "clusters": {
        LOG.future-python.json:         "*": {
        LOG.future-python.json:           "cluster_name": true,
        LOG.future-python.json:           "lifecycle": {
        LOG.future-python.json:             "started": true
        LOG.future-python.json:           }
        LOG.future-python.json:         }
        LOG.future-python.json:       },
        LOG.future-python.json:       "job_runs": {
        LOG.future-python.json:         "*": {
        LOG.future-python.json:           "lifecycle": {
        LOG.future-python.json:             "triggers_state": {
        LOG.future-python.json:               "on_value_change": true
        LOG.future-python.json:             }
        LOG.future-python.json:           }
        LOG.future-python.json:         }
        LOG.future-python.json:       },
        LOG.future-python.json:       "jobs": {
        LOG.future-python.json:         "*": {
        LOG.future-python.json:           "description": true,
        LOG.future-python.json:           "email_notifications": {
        LOG.future-python.json:             "no_alert_for_skipped_runs": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "job_clusters[*]": {
        LOG.future-python.json:             "job_cluster_key": true,
        LOG.future-python.json:             "new_cluster": {
        LOG.future-python.json:               "num_workers": true,
        LOG.future-python.json:               "spark_version": true
        LOG.future-python.json:             }
        LOG.future-python.json:           },
        LOG.future-python.json:           "max_concurrent_runs": true,
        LOG.future-python.json:           "name": true,
        LOG.future-python.json:           "notification_settings": {
        LOG.future-python.json:             "no_alert_for_skipped_runs": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "parameters": true,
        LOG.future-python.json:           "queue": {
        LOG.future-python.json:             "enabled": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "tags": {
        LOG.future-python.json:             "*": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "tasks[*]": {
        LOG.future-python.json:             "depends_on[*]": {
        LOG.future-python.json:               "task_key": true
        LOG.future-python.json:             },
        LOG.future-python.json:             "disable_auto_optimization": true,
        LOG.future-python.json:             "notebook_task": {
        LOG.future-python.json:               "notebook_path": true
        LOG.future-python.json:             },
        LOG.future-python.json:             "task_key": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "timeout_seconds": true
        LOG.future-python.json:         }
        LOG.future-python.json:       }
        LOG.future-python.json:     },
        LOG.future-python.json:     "run_as": {
        LOG.future-python.json:       "service_principal_name": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "telemetry": {
        LOG.future-python.json:       "artifact_build_command_is_set": true,
        LOG.future-python.json:       "artifact_files_is_set": true,
        LOG.future-python.json:       "config_has_double_dollar_brace": true,
        LOG.future-python.json:       "experimental": {
        LOG.future-python.json:         "use_legacy_run_as": true
        LOG.future-python.json:       },
        LOG.future-python.json:       "presets_name_prefix_is_set": true,
        LOG.future-python.json:       "run_as_set": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "variables": {
        LOG.future-python.json:       "*": {
        LOG.future-python.json:         "default": true,
        LOG.future-python.json:         "description": true,
        LOG.future-python.json:         "type": true
        LOG.future-python.json:       }
        LOG.future-python.json:     }
        LOG.future-python.json: ... (66 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
    acceptance_test.go:1180: 
        LOG.future-python.txt: size=5275 context=0
        LOG.future-python.txt: P   variables
        LOG.future-python.txt: P   variables.*
        LOG.future-python.txt: P   variables.*.type
        LOG.future-python.txt: P   variables.*.default
        LOG.future-python.txt: P   variables.*.description
        LOG.future-python.txt: P   bundle
        LOG.future-python.txt: P   bundle.name
        LOG.future-python.txt: P   artifacts
        LOG.future-python.txt: P   artifacts.*
        LOG.future-python.txt: P   artifacts.*.type
        LOG.future-python.txt: P   artifacts.*.files
        LOG.future-python.txt: P   artifacts.*.files[*]
        LOG.future-python.txt: P   artifacts.*.files[*].source
        LOG.future-python.txt: P   artifacts.*.build
        LOG.future-python.txt: P   resources
        LOG.future-python.txt: P   resources.jobs
        LOG.future-python.txt: P   resources.jobs.*
        LOG.future-python.txt: P   resources.jobs.*.description
        LOG.future-python.txt: P   resources.jobs.*.email_notifications
        LOG.future-python.txt: P F resources.jobs.*.email_notifications.no_alert_for_skipped_runs
        LOG.future-python.txt: P   resources.jobs.*.job_clusters
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*]
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*].job_cluster_key
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*].new_cluster
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*].new_cluster.num_workers
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*].new_cluster.spark_version
        LOG.future-python.txt: P   resources.jobs.*.max_concurrent_runs
        LOG.future-python.txt: P   resources.jobs.*.name
        LOG.future-python.txt: P   resources.jobs.*.notification_settings
        LOG.future-python.txt: PT  resources.jobs.*.notification_settings.no_alert_for_skipped_runs
        LOG.future-python.txt: P   resources.jobs.*.parameters
        LOG.future-python.txt: P   resources.jobs.*.queue
... (201 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/bitmap/presence/output.txt
        +++ /tmp/TestAcceptbundlebitmappresenceDMS=4290240107/002/output.txt
        @@ -14,81 +14,36 @@
         >>> diff.py out.bitmap.json decoded.json
         
         >>> [CLI] bundle bitmap decode -o compressed
        +Error: invalid argument "compressed" for "-o, --output" flag: accepted arguments are json and text
         
        ->>> diff.py out.bitmap.b64 recoded.b64
        -
        ->>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap
        -
        ->>> diff.py out.bitmap.txt decoded-python.txt
        -
        ->>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap -o json
        -
        ->>> diff.py out.bitmap.json decoded-python.json
        -
        ->>> [CLI] bundle bitmap bitmap -o text --var off_flag=false
        -
        ->>> diff.py out.bitmap.txt var-flag.txt
        -
        -=== A bitmap from a newer CLI decodes, with a placeholder for the field this schema lacks
        -
        -
        ->>> [CLI] bundle bitmap decode
        -
        ->>> [CLI] bundle bitmap decode -o json
        -
        ->>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap
        -
        ->>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap -o json
        -
        ->>> diff.py LOG.future.txt LOG.future-python.txt
        -
        ->>> diff.py LOG.future.json LOG.future-python.json
        -size=[FUTURE_SIZE] context=0
        -P   future #[FUTURE_BIT]
        -{
        -  "future #[FUTURE_BIT]": true
        -}
        -
        ->>> [CLI] bundle bitmap update-schema --validate
        -
        -=== decode rejects input that is not an encoded bitmap
        -
        -
        ->>> musterr [CLI] bundle bitmap decode
        -Error: missing "bm1." prefix
        -
        -=== -o accepts compressed, text and json
        -
        -
        ->>> musterr [CLI] bundle bitmap bitmap -o yaml
        -Error: invalid argument "yaml" for "-o, --output" flag: accepted values are compressed, text and json
        -
         Usage:
        -  databricks bundle bitmap bitmap [flags]
        +  databricks bundle [command]
         
        +Available Commands:
        +  deploy             Deploy bundle
        +  deployment         Deployment related commands
        +  destroy            Destroy deployed bundle resources
        +  generate           Generate bundle configuration
        +  init               Initialize using a bundle template
        +  open               Open a resource in the browser
        +  plan               Show deployment plan
        +  run                Run a job, pipeline update or app
        +  schema             Generate JSON Schema for bundle configuration
        +  summary            Summarize resources deployed by this bundle
        +  sync               Synchronize bundle tree to the workspace
        +  validate           Validate configuration
        +
         Flags:
        -  -h, --help[=true|false]   help for bitmap
        -  -o, --output format       output format:
        -                              compressed: "bm1." then base64 of the DEFLATE-compressed wire format
        -                              text:       a "size=N context=C" header, then one "PTF <field>" line per set
        -                                          field: "P" if present, "T" and "F" if a boolean field held true
        -                                          and false, a space for each that is not; unset fields are omitted
        -                              json:       size, context, and trees of the fields present ("presence") and of
        -                                          the boolean fields seen holding "true" and "false" (default compressed)
        +  -h, --help[=true|false]   help for bundle
        +      --var strings         set values for variables defined in bundle config. Example: --var="foo=bar"
         
         Global Flags:
               --debug[=true|false]   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 [command] --help" for more information about a command.
         
        -=== An invalid bundle fails instead of printing a bitmap
         
        -
        ->>> musterr [CLI] bundle bitmap bitmap
        -Error: Artifact not properly configured
        -  in databricks.yml:5:10
        -
        -please specify artifact properties
        -
        +Exit code: 1
        
    acceptance_test.go:1402: Diff:
        --- bundle/bitmap/presence/out.bitmap.json
        +++ /tmp/TestAcceptbundlebitmappresenceDMS=4290240107/001/out.bitmap.json
        @@ -1,157 +1,42 @@
        -{
        -  "size": [SCHEMA_SIZE],
        -  "context": 0,
        -  "presence": {
        -    "artifacts": {
        -      "*": {
        -        "build": true,
        -        "files[*]": {
        -          "source": true
        -        },
        -        "type": true
        -      }
        -    },
        -    "bundle": {
        -      "name": true
        -    },
        -    "experimental": {
        -      "use_legacy_run_as": true
        -    },
        -    "presets": {
        -      "name_prefix": true,
        -      "pipelines_development": true
        -    },
        -    "resources": {
        -      "clusters": {
        -        "*": {
        -          "cluster_name": true,
        -          "lifecycle": {
        -            "started": true
        -          }
        -        }
        -      },
        -      "jobs": {
        -        "*": {
        -          "description": true,
        -          "email_notifications": {
        -            "no_alert_for_skipped_runs": true
        -          },
        -          "job_clusters[*]": {
        -            "job_cluster_key": true,
        -            "new_cluster": {
        -              "num_workers": true,
        -              "spark_version": true
        -            }
        -          },
        -          "max_concurrent_runs": true,
        -          "name": true,
        -          "notification_settings": {
        -            "no_alert_for_skipped_runs": true
        -          },
        -          "parameters": true,
        -          "queue": {
        -            "enabled": true
        -          },
        -          "tags": {
        -            "*": true
        -          },
        -          "tasks[*]": {
        -            "depends_on[*]": {
        -              "task_key": true
        -            },
        -            "disable_auto_optimization": true,
        -            "notebook_task": {
        -              "notebook_path": true
        -            },
        -            "task_key": true
        -          },
        -          "timeout_seconds": true
        -        }
        -      }
        -    },
        -    "run_as": {
        -      "service_principal_name": true
        -    },
        -    "telemetry": {
        -      "artifact_build_command_is_set": true,
        -      "artifact_files_is_set": true,
        -      "config_has_double_dollar_brace": true,
        -      "experimental": {
        -        "use_legacy_run_as": true
        -      },
        -      "presets_name_prefix_is_set": true,
        -      "run_as_set": true
        -    },
        -    "variables": {
        -      "*": {
        -        "default": true,
        -        "description": true,
        -        "type": true
... (269 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/bitmap/presence/DMS=true: branch ✅ | main (3442593) ❌ | latest (v1.28.0) ❌

main (3442593):

acceptance_test.go:1402: Diff:
        --- bundle/bitmap/presence/output.txt
        +++ /tmp/TestAcceptbundlebitmappresenceDMS=true2189764376/002/output.txt
        @@ -41,8 +41,37 @@
         >>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap -o json
         
         >>> diff.py LOG.future.txt LOG.future-python.txt
        +--- LOG.future.txt
        ++++ LOG.future-python.txt
        +@@ -63,3 +63,3 @@
        + P F telemetry.experimental.use_legacy_run_as
        + PT  telemetry.run_as_set
        +-P   future #[FUTURE_BIT]
        ++P   resources.job_runs.*.lifecycle.triggers_state.on_value_change
         
         >>> diff.py LOG.future.json LOG.future-python.json
        +--- LOG.future.json
        ++++ LOG.future-python.json
        +@@ -18,5 +18,4 @@
        +       "use_legacy_run_as": true
        +     },
        +-    "future #[FUTURE_BIT]": true,
        +     "presets": {
        +       "name_prefix": true,
        +@@ -29,4 +28,13 @@
        +           "lifecycle": {
        +             "started": true
        ++          }
        ++        }
        ++      },
        ++      "job_runs": {
        ++        "*": {
        ++          "lifecycle": {
        ++            "triggers_state": {
        ++              "on_value_change": true
        ++            }
        +           }
        +         }
         size=[FUTURE_SIZE] context=0
         P   future #[FUTURE_BIT]
         {
        
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMANwlp4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A\n"
        	            	actual  : "bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMCtwWB4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,2 @@
        	            	-bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMANwlp4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A
        	            	+bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMCtwWB4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A
        	            	 
        	Test:       	TestAccept/bundle/bitmap/presence/DMS=true
        	Messages:   	bundle/bitmap/presence/out.bitmap.b64 vs /tmp/TestAcceptbundlebitmappresenceDMS=true2189764376/001/out.bitmap.b64
    acceptance_test.go:1180: 
        LOG.decode_python: 
        LOG.decode_python: >>> musterr uv run --isolated --no-project --reinstall-package databricks-bundles --with /home/runner/work/cli/cli/acceptance/build/linux_amd64/databricks_bundles-1.28.0-py3-none-any.whl -q python -m databricks.bundles._bitmap
        LOG.decode_python: Error: missing 'bm1.' prefix
    acceptance_test.go:1180: 
        LOG.future-python.json: {
        LOG.future-python.json:   "size": 5275,
        LOG.future-python.json:   "context": 0,
        LOG.future-python.json:   "presence": {
        LOG.future-python.json:     "artifacts": {
        LOG.future-python.json:       "*": {
        LOG.future-python.json:         "build": true,
        LOG.future-python.json:         "files[*]": {
        LOG.future-python.json:           "source": true
        LOG.future-python.json:         },
        LOG.future-python.json:         "type": true
        LOG.future-python.json:       }
        LOG.future-python.json:     },
        LOG.future-python.json:     "bundle": {
        LOG.future-python.json:       "name": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "experimental": {
        LOG.future-python.json:       "use_legacy_run_as": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "presets": {
        LOG.future-python.json:       "name_prefix": true,
        LOG.future-python.json:       "pipelines_development": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "resources": {
        LOG.future-python.json:       "clusters": {
        LOG.future-python.json:         "*": {
        LOG.future-python.json:           "cluster_name": true,
        LOG.future-python.json:           "lifecycle": {
        LOG.future-python.json:             "started": true
        LOG.future-python.json:           }
        LOG.future-python.json:         }
        LOG.future-python.json:       },
        LOG.future-python.json:       "job_runs": {
        LOG.future-python.json:         "*": {
        LOG.future-python.json:           "lifecycle": {
        LOG.future-python.json:             "triggers_state": {
        LOG.future-python.json:               "on_value_change": true
        LOG.future-python.json:             }
        LOG.future-python.json:           }
        LOG.future-python.json:         }
        LOG.future-python.json:       },
        LOG.future-python.json:       "jobs": {
        LOG.future-python.json:         "*": {
        LOG.future-python.json:           "description": true,
        LOG.future-python.json:           "email_notifications": {
        LOG.future-python.json:             "no_alert_for_skipped_runs": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "job_clusters[*]": {
        LOG.future-python.json:             "job_cluster_key": true,
        LOG.future-python.json:             "new_cluster": {
        LOG.future-python.json:               "num_workers": true,
        LOG.future-python.json:               "spark_version": true
        LOG.future-python.json:             }
        LOG.future-python.json:           },
        LOG.future-python.json:           "max_concurrent_runs": true,
        LOG.future-python.json:           "name": true,
        LOG.future-python.json:           "notification_settings": {
        LOG.future-python.json:             "no_alert_for_skipped_runs": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "parameters": true,
        LOG.future-python.json:           "queue": {
        LOG.future-python.json:             "enabled": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "tags": {
        LOG.future-python.json:             "*": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "tasks[*]": {
        LOG.future-python.json:             "depends_on[*]": {
        LOG.future-python.json:               "task_key": true
        LOG.future-python.json:             },
        LOG.future-python.json:             "disable_auto_optimization": true,
        LOG.future-python.json:             "notebook_task": {
        LOG.future-python.json:               "notebook_path": true
        LOG.future-python.json:             },
        LOG.future-python.json:             "task_key": true
        LOG.future-python.json:           },
        LOG.future-python.json:           "timeout_seconds": true
        LOG.future-python.json:         }
        LOG.future-python.json:       }
        LOG.future-python.json:     },
        LOG.future-python.json:     "run_as": {
        LOG.future-python.json:       "service_principal_name": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "telemetry": {
        LOG.future-python.json:       "artifact_build_command_is_set": true,
        LOG.future-python.json:       "artifact_files_is_set": true,
        LOG.future-python.json:       "config_has_double_dollar_brace": true,
        LOG.future-python.json:       "experimental": {
        LOG.future-python.json:         "use_legacy_run_as": true
        LOG.future-python.json:       },
        LOG.future-python.json:       "presets_name_prefix_is_set": true,
        LOG.future-python.json:       "run_as_set": true
        LOG.future-python.json:     },
        LOG.future-python.json:     "variables": {
        LOG.future-python.json:       "*": {
        LOG.future-python.json:         "default": true,
        LOG.future-python.json:         "description": true,
        LOG.future-python.json:         "type": true
        LOG.future-python.json:       }
        LOG.future-python.json:     }
        LOG.future-python.json: ... (66 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
    acceptance_test.go:1180: 
        LOG.future-python.txt: size=5275 context=0
        LOG.future-python.txt: P   variables
        LOG.future-python.txt: P   variables.*
        LOG.future-python.txt: P   variables.*.type
        LOG.future-python.txt: P   variables.*.default
        LOG.future-python.txt: P   variables.*.description
        LOG.future-python.txt: P   bundle
        LOG.future-python.txt: P   bundle.name
        LOG.future-python.txt: P   artifacts
        LOG.future-python.txt: P   artifacts.*
        LOG.future-python.txt: P   artifacts.*.type
        LOG.future-python.txt: P   artifacts.*.files
        LOG.future-python.txt: P   artifacts.*.files[*]
        LOG.future-python.txt: P   artifacts.*.files[*].source
        LOG.future-python.txt: P   artifacts.*.build
        LOG.future-python.txt: P   resources
        LOG.future-python.txt: P   resources.jobs
        LOG.future-python.txt: P   resources.jobs.*
        LOG.future-python.txt: P   resources.jobs.*.description
        LOG.future-python.txt: P   resources.jobs.*.email_notifications
        LOG.future-python.txt: P F resources.jobs.*.email_notifications.no_alert_for_skipped_runs
        LOG.future-python.txt: P   resources.jobs.*.job_clusters
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*]
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*].job_cluster_key
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*].new_cluster
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*].new_cluster.num_workers
        LOG.future-python.txt: P   resources.jobs.*.job_clusters[*].new_cluster.spark_version
        LOG.future-python.txt: P   resources.jobs.*.max_concurrent_runs
        LOG.future-python.txt: P   resources.jobs.*.name
        LOG.future-python.txt: P   resources.jobs.*.notification_settings
        LOG.future-python.txt: PT  resources.jobs.*.notification_settings.no_alert_for_skipped_runs
        LOG.future-python.txt: P   resources.jobs.*.parameters
        LOG.future-python.txt: P   resources.jobs.*.queue
... (202 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/bitmap/presence/output.txt
        +++ /tmp/TestAcceptbundlebitmappresenceDMS=true193680239/002/output.txt
        @@ -14,81 +14,36 @@
         >>> diff.py out.bitmap.json decoded.json
         
         >>> [CLI] bundle bitmap decode -o compressed
        +Error: invalid argument "compressed" for "-o, --output" flag: accepted arguments are json and text
         
        ->>> diff.py out.bitmap.b64 recoded.b64
        -
        ->>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap
        -
        ->>> diff.py out.bitmap.txt decoded-python.txt
        -
        ->>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap -o json
        -
        ->>> diff.py out.bitmap.json decoded-python.json
        -
        ->>> [CLI] bundle bitmap bitmap -o text --var off_flag=false
        -
        ->>> diff.py out.bitmap.txt var-flag.txt
        -
        -=== A bitmap from a newer CLI decodes, with a placeholder for the field this schema lacks
        -
        -
        ->>> [CLI] bundle bitmap decode
        -
        ->>> [CLI] bundle bitmap decode -o json
        -
        ->>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap
        -
        ->>> uv run --isolated --no-project --reinstall-package databricks-bundles --with [DATABRICKS_BUNDLES_WHEEL] -q python -m databricks.bundles._bitmap -o json
        -
        ->>> diff.py LOG.future.txt LOG.future-python.txt
        -
        ->>> diff.py LOG.future.json LOG.future-python.json
        -size=[FUTURE_SIZE] context=0
        -P   future #[FUTURE_BIT]
        -{
        -  "future #[FUTURE_BIT]": true
        -}
        -
        ->>> [CLI] bundle bitmap update-schema --validate
        -
        -=== decode rejects input that is not an encoded bitmap
        -
        -
        ->>> musterr [CLI] bundle bitmap decode
        -Error: missing "bm1." prefix
        -
        -=== -o accepts compressed, text and json
        -
        -
        ->>> musterr [CLI] bundle bitmap bitmap -o yaml
        -Error: invalid argument "yaml" for "-o, --output" flag: accepted values are compressed, text and json
        -
         Usage:
        -  databricks bundle bitmap bitmap [flags]
        +  databricks bundle [command]
         
        +Available Commands:
        +  deploy             Deploy bundle
        +  deployment         Deployment related commands
        +  destroy            Destroy deployed bundle resources
        +  generate           Generate bundle configuration
        +  init               Initialize using a bundle template
        +  open               Open a resource in the browser
        +  plan               Show deployment plan
        +  run                Run a job, pipeline update or app
        +  schema             Generate JSON Schema for bundle configuration
        +  summary            Summarize resources deployed by this bundle
        +  sync               Synchronize bundle tree to the workspace
        +  validate           Validate configuration
        +
         Flags:
        -  -h, --help[=true|false]   help for bitmap
        -  -o, --output format       output format:
        -                              compressed: "bm1." then base64 of the DEFLATE-compressed wire format
        -                              text:       a "size=N context=C" header, then one "PTF <field>" line per set
        -                                          field: "P" if present, "T" and "F" if a boolean field held true
        -                                          and false, a space for each that is not; unset fields are omitted
        -                              json:       size, context, and trees of the fields present ("presence") and of
        -                                          the boolean fields seen holding "true" and "false" (default compressed)
        +  -h, --help[=true|false]   help for bundle
        +      --var strings         set values for variables defined in bundle config. Example: --var="foo=bar"
         
         Global Flags:
               --debug[=true|false]   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 [command] --help" for more information about a command.
         
        -=== An invalid bundle fails instead of printing a bitmap
         
        -
        ->>> musterr [CLI] bundle bitmap bitmap
        -Error: Artifact not properly configured
        -  in databricks.yml:5:10
        -
        -please specify artifact properties
        -
        +Exit code: 1
        
    acceptance_test.go:1402: Diff:
        --- bundle/bitmap/presence/out.bitmap.b64
        +++ /tmp/TestAcceptbundlebitmappresenceDMS=true193680239/001/out.bitmap.b64
        @@ -1 +1,42 @@
        -bm1.7M6hDcJAAAXQdxByoM6gUCgGQCFQFwZAIJmCMMANwlp4xkARkppeWlHVpKIvX/1v/iXfMtsXX0u1+PDhUIBzPS0CcZckHW/j2PSafZPZsCMIWqfpnVw9lSuEH8D6zn8A
        +Declarative Automation Bundles let you express data/AI/analytics projects as code.
        +
        +Common workflows:
        +  databricks bundle init default-python      # Initialize new project
        +  databricks bundle deploy --target dev      # Deploy to development
        +  databricks bundle run my_job               # Run jobs/pipelines
        +  databricks bundle deploy --target prod     # Deploy to production
        +
        +Import existing resources:
        +  databricks bundle generate job --existing-job-id 123 --key my_job # Generate job configuration
        +  databricks bundle deployment bind my_job 123                      # Link to an existing job
        +
        +Online documentation: https://docs.databricks.com/en/dev-tools/bundles/index.html
        +
        +Usage:
        +  databricks bundle [command]
        +
        +Available Commands:
        +  deploy             Deploy bundle
        +  deployment         Deployment related commands
        +  destroy            Destroy deployed bundle resources
        +  generate           Generate bundle configuration
        +  init               Initialize using a bundle template
        +  open               Open a resource in the browser
        +  plan               Show deployment plan
        +  run                Run a job, pipeline update or app
        +  schema             Generate JSON Schema for bundle configuration
        +  summary            Summarize resources deployed by this bundle
        +  sync               Synchronize bundle tree to the workspace
        +  validate           Validate configuration
        +
        +Flags:
        +  -h, --help[=true|false]   help for bundle
        +      --var strings         set values for variables defined in bundle config. Example: --var="foo=bar"
        +
        +Global Flags:
        +      --debug[=true|false]   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)
        +
        +Use "databricks bundle [command] --help" for more information about a command.
        
    acceptance_test.go:1402: Diff:
        --- bundle/bitmap/presence/out.bitmap.json
        +++ /tmp/TestAcceptbundlebitmappresenceDMS=true193680239/001/out.bitmap.json
        @@ -1,157 +1,42 @@
        -{
        -  "size": [SCHEMA_SIZE],
        -  "context": 0,
        -  "presence": {
        -    "artifacts": {
        -      "*": {
        -        "build": true,
        -        "files[*]": {
        -          "source": true
        -        },
        -        "type": true
        -      }
        -    },
        -    "bundle": {
        -      "name": true
        -    },
        -    "experimental": {
        -      "use_legacy_run_as": true
        -    },
        -    "presets": {
        -      "name_prefix": true,
        -      "pipelines_development": true
        -    },
        -    "resources": {
        -      "clusters": {
        -        "*": {
        -          "cluster_name": true,
        -          "lifecycle": {
        -            "started": true
        -          }
        -        }
        -      },
        -      "jobs": {
        -        "*": {
        -          "description": true,
        -          "email_notifications": {
        -            "no_alert_for_skipped_runs": true
        -          },
        -          "job_clusters[*]": {
        -            "job_cluster_key": true,
        -            "new_cluster": {
... (269 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/python/job_runs-on_value_change/DMS=/PYDAB_VERSION=current: branch ✅ | main (3442593) ❌ | latest (v1.28.0) ❌

main (3442593):

acceptance_test.go:1402: Diff:
        --- bundle/python/job_runs-on_value_change/output.txt
        +++ /tmp/TestAcceptbundlepythonjob_runs-on_value_changeDMS=PYDAB_VER2798182743/002/output.txt
        @@ -2,106 +2,23 @@
         === validate resolves watches from YAML, from Python and from a Python mutator, which prepends one
         
         >>> uv run [UV_ARGS] -q [CLI] bundle validate --output json
        +Warning: unknown field: on_value_change
        +  at resources.job_runs.yaml_run.lifecycle.triggers[0]
        +  in databricks.yml:32:13
        +
        +Error: unknown field: on_value_change
        +  at resources.job_runs.py_run.lifecycle.triggers[0]
        +  in __generated_by_python__.yml:1:509
        +
         {
        -  "py_run": {
        -    "job_id": "${resources.jobs.my_job.id}",
        -    "lifecycle": {
        -      "triggers": [
        -        {
        -          "on_value_change": "y1"
        -        },
        -        {
        -          "on_value_change": "x1"
        -        }
        -      ],
        -      "triggers_state": {
        -        "on_value_change": {
        -          "${var.x}": "x1",
        -          "${var.y}": "y1"
        -        }
        -      }
        -    }
        -  },
           "yaml_run": {
             "job_id": "${resources.jobs.my_job.id}",
             "lifecycle": {
               "triggers": [
        -        {
        -          "on_value_change": "y1"
        -        },
        -        {
        -          "on_value_change": "x1"
        -        }
        -      ],
        -      "triggers_state": {
        -        "on_value_change": {
        -          "${var.x}": "x1",
        -          "${var.y}": "y1"
        -        }
        -      }
        +        {}
        +      ]
             }
           }
         }
         
        -=== first deploy runs both
        -
        ->>> uv run [UV_ARGS] -q [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
        -Created job_runs.py_run
        -Created job_runs.yaml_run
        -Created jobs.my_job
        -Files: 0 uploaded, 0 deleted
        -Resources: 3 created, 0 changed, 0 deleted, 0 unchanged
        -
        -=== state keys each value by its expression, including watches the mutator added and shifted
        -
        ->>> print_state.py --no-dms
        -{
        -  "resources.job_runs.py_run": {
        -    "on_value_change": {
        -      "${var.x}": "x1",
        -      "${var.y}": "y1"
        -    }
        -  },
        -  "resources.job_runs.yaml_run": {
        -    "on_value_change": {
        -      "${var.x}": "x1",
        -      "${var.y}": "y1"
        -    }
        -  }
        -}
        -
        -=== redeploy with unchanged values plans nothing
        -
        ->>> uv run [UV_ARGS] -q [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged
        -
        -=== changing the variable watched in YAML and Python re-fires both runs
        -
        ->>> uv run [UV_ARGS] -q [CLI] bundle plan
        -recreate job_runs.py_run
        -recreate job_runs.yaml_run
        -
        -Plan: 2 to add, 0 to change, 2 to delete, 1 unchanged
        -
        ->>> uv run [UV_ARGS] -q [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
        -Recreated job_runs.py_run
        -Recreated job_runs.yaml_run
        -Files: 0 uploaded, 0 deleted
        -Resources: 2 created, 0 changed, 2 deleted, 1 unchanged
        -
        -=== changing the variable the Python mutator watches re-fires both runs
        -
        ->>> uv run [UV_ARGS] -q [CLI] bundle plan
        -recreate job_runs.py_run
        -recreate job_runs.yaml_run
        -
        -Plan: 2 to add, 0 to change, 2 to delete, 1 unchanged
        -
        ->>> uv run [UV_ARGS] -q [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
        -Recreated job_runs.py_run
        -Recreated job_runs.yaml_run
        -Files: 0 uploaded, 0 deleted
        -Resources: 2 created, 0 changed, 2 deleted, 1 unchanged
        +Exit code: 1

latest (v1.28.0): same output as main (3442593)

15 more failure details omitted, see the full report in the run.

radakam and others added 15 commits November 30, 2026 10:17
Adds `lifecycle.triggers.on_value_change` for `resources.job_runs` (direct
engine): watch an interpolated expression (a variable, workspace field, or a
${resources.*} reference) and re-fire the run when its resolved value changes.

- Snapshot the expression before interpolation and use the trimmed form as the
  stable state key (SnapshotJobRunValueTriggers), so a value change is a
  modification of one entry rather than a change to the set of watches.
- Resolution reuses existing mechanisms: normal variable interpolation resolves
  ${var.*}/${workspace.*} into triggers_state, and the planner resolves
  ${resources.*} via the references PrepareInputConfig registers, so the deploy
  graph depends on them. The resolved value is stored in state directly.
- Removing or adding a watch is classified in OverrideChangeDesc alongside
  on_file_change: adding/changing recreates the run, removing keeps it.

Built on the on_file_change work (#6309): no PersistState, path.String()-based
change classification, prevent_destroy left to the generic checkForPreventDestroy.

Co-authored-by: Isaac <no-reply@databricks.com>
…y is allowed

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Record today's behavior, including the bugs:

- python/job_runs-on_value_change: any bundle with a python: section and an
  on_value_change watch fails validate with "Unexpected field
  'triggers_state' for class JobRunLifecycle", for YAML- and Python-defined
  job_runs alike.
- on_value_change_empty: a watched variable whose value is "" fails with
  "lifecycle.triggers entry must set ..." on an entry that does set it.
- on_value_change_errors: a complex variable gives two "expected string,
  found map" warnings (one at the internal triggers_state path, at :0:0)
  and the same misleading error.
- on_value_change_ref: updating a referenced job in place does not re-fire
  the run (correct; locks it in).

Co-authored-by: Isaac <no-reply@databricks.com>
SnapshotJobRunValueTriggers ran in ProcessStaticResources, before
PythonMutator, so Python saw the internal lifecycle.triggers_state, which
the PyDABs JobRunLifecycle model does not declare: any bundle with a
python: section and an on_value_change watch failed with "Unexpected field
'triggers_state' for class JobRunLifecycle".

on_value_change expressions are now never resolved in place
(dynvar.ResolveExcept, keepUnresolved), so the expression survives until
after PythonMutator, where it is copied into triggers_state and resolved
there (ResolveJobRunValueTriggerReferences). This also lets a Python
mutator add a watch, drops the "already snapshotted" guard, and fixes a
watched value of "": the trigger entry keeps its expression, so
DropEmptyStrings no longer empties it.

A complex value now only warns; the next commit rejects it.

Co-authored-by: Isaac <no-reply@databricks.com>
The value is stored as a string, so normalization dropped a complex value
with a warning and the watch silently never fired. ValidateJobRunTriggers
now reports it. The snapshot is written to the dynamic config with the
trigger's location, so the normalization warning points at the trigger
instead of ":0:0".

The old snapshot unit test edited typed config between two applies, which
the next apply overwrote from the dynamic config, so it never reached the
guard it meant to test; replace it with one for the current behavior.

Co-authored-by: Isaac <no-reply@databricks.com>
Removing a watch keeps its last value in state, the same as on_file_change,
so re-adding it with an unchanged value does not re-fire the run. The field
description said any added watch re-fires, and the test step that shows
the opposite was titled "re-fires". Describe the rule as a comparison with
the value recorded when the run last fired, and fix the title.

Co-authored-by: Isaac <no-reply@databricks.com>
The planner's extractReferences already registers the ${resources.*}
references in lifecycle.triggers_state.on_value_change from the dynamic
config, so PrepareInputConfig added the same refs a second time; the README
reserves the hook for sub-resources. The maps.Clone in PrepareState
protected entries from fingerprinting that no longer exists.

Co-authored-by: Isaac <no-reply@databricks.com>
Iterating the job_runs map made the order of diagnostics from several
job_runs random; ResolveJobRunFileTriggers sorts for the same reason. The
[VALUE_HASH] replacement in on_value_change_ref was left over from when
values were stored as hashes and matches nothing.

Co-authored-by: Isaac <no-reply@databricks.com>
Replace the resolver change from the previous commits: on_value_change no
longer stays unresolved (dynvar.ResolveExcept and keepUnresolved are
gone), so the trigger shows its resolved value like any other field.

SnapshotJobRunValueTriggers records the expressions on the Bundle before
variable resolution (as RootPathIsNameTargetScoped does), and after
PythonMutator ResolveJobRunValueTriggers stores the resolved trigger
values in triggers_state under them. Python never sees triggers_state.
Values are paired with expressions by trigger position, so a Python
mutator that adds or removes triggers of a job_run with on_value_change
gets an error.

Co-authored-by: Isaac <no-reply@databricks.com>
Replace the expression-keyed state with the interpolated values in trigger
order. ResolveJobRunValueTriggers copies them into triggers_state after
PythonMutator; nothing is recorded before interpolation, so the snapshot
mutator, the Bundle field and the Python mutator limitation are gone, and
duplicate or blank expressions are no longer errors.

The planner compares the values per position: a changed or added value
re-fires the run, and a list that keeps the leading values of the old one
(watches removed from the end) does not. Removing or reordering any other
watch shifts the values after it, which re-fires.

ValidateJobRunTriggers moves before DropEmptyStrings, which would drop a
watched "" value and leave an entry that sets nothing.

Co-authored-by: Isaac <no-reply@databricks.com>
DropEmptyStrings exists so "" on an omitempty field is not force-sent to the
backend. lifecycle is never sent, and there an empty string is a value:
job_runs lifecycle.triggers.on_value_change can watch a variable that is "".
Dropping it left a trigger entry that sets nothing.

With lifecycle left alone, ValidateJobRunTriggers goes back to its place
after DropEmptyStrings.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik force-pushed the deco-job-runs-lifecycle-on-value-change branch from 5d9dfa5 to 6497d1a Compare November 30, 2026 10:39
denik and others added 3 commits November 30, 2026 12:35
triggers_state.on_value_change is now a map from the unresolved expression
to its resolved value, like on_file_change, instead of a list compared by
position. The plan names the watch that changed
(on_value_change['${var.stamp}']), and removing, re-adding or reordering
watches never re-fires; only an added watch or a changed value does.

The expressions are recorded on the Bundle around each variable resolution
of resources: SnapshotJobRunValueTriggers before it and
RecordJobRunValueTriggers after it, pairing by trigger index within that one
resolution. This runs both for YAML resources and for resources a Python
mutator added or changed. After PythonMutator, ResolveJobRunValueTriggers
pairs values with expressions by value, so Python may add, remove and
reorder triggers. More triggers with a value than recorded expressions means
the rest are literals, which are their own key. There is no resolver
exception, and Python never sees triggers_state.

on_value_change is typed any, so a value that resolves to a map or a list
is no longer dropped by normalization; it is stored as JSON with sorted
keys, so reordering keys does not re-fire.

Co-authored-by: Isaac <no-reply@databricks.com>
A watch on a field set in config (name) re-fires only when that field
changes. A watch on a field only the backend sets (creator_user_name) is
unknown at plan time while the referenced job is updated, so the run
re-fires although the value stays the same. This holds for any job_runs
field that references a remote-only field (bundle_apply.go has a TODO to
re-check the planned action after resolving references); document it as
a known limitation.

Co-authored-by: Isaac <no-reply@databricks.com>
uv run cannot spawn print_state.py on Windows, and without uv the DMS
variant asks bundle validate for the state path, which needs the Python
environment. --no-dms reads the local state file directly.

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 PyDABs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants