Skip to content

Keep an explicit false on optional bundle config bools - #7412

Draft
denik wants to merge 4 commits into
mainfrom
denik/config-force-send-fields
Draft

denik wants to merge 4 commits into
mainfrom
denik/config-force-send-fields

Conversation

@denik

@denik denik commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Why

13 optional bools in CLI-defined config structs were plain bool with omitempty. The typed-to-dynamic conversion that runs after every mutator drops zero values, so an explicit false was lost:

  • it never showed in bundle validate -o json (all of them);
  • a target could not override true with false for the ones a target can set: artifacts.*.dynamic_version, bundle.deployment.lock.force, workspace.azure_use_msi;
  • the bundle bitmap (Add bundle bitmap for per-field telemetry #6104) could not record it.

Affected fields: variables.*.sensitive, artifacts.*.dynamic_version, bundle.deployment.lock.force, workspace.azure_use_msi, workspace.experimental_is_unified_host, targets.*.default, experimental.{immutable_folder,python_wheel_wrapper,use_legacy_run_as,skip_artifact_cleanup,skip_name_prefix_for_schema}, experimental.pydabs.enabled.

Changes

The fields become *bool, like lock.enabled already is, and readers use config.IsExplicitlyEnabled. bundle.force stays a bool: it is readonly, set from --force. TestConfigBoolsArePointers fails for any new bool in a CLI-defined config struct; the fields that predate it are listed with the reason they stay bool.

Tests

acceptance/bundle/validate/explicit_false: explicit false values are kept, and a target overrides true with false for all three overridable fields (on main they stay true).

This pull request and its description were written by Isaac.

denik and others added 2 commits November 9, 2026 16:28
Thirteen omitempty bool fields of CLI-defined config structs (variables.*.sensitive,
bundle.deployment.lock.force, workspace.azure_use_msi and
experimental_is_unified_host, artifacts.*.dynamic_version, targets.*.default,
experimental.{immutable_folder,python_wheel_wrapper,use_legacy_run_as,
skip_artifact_cleanup,skip_name_prefix_for_schema} and
experimental.pydabs.enabled) become *bool, like lock.enabled already is.

As plain bools, an explicit false was dropped by the typed-to-dynamic
conversion that runs after every mutator: it never showed in the config, and a
target could not override true with false (e.g. dynamic_version: false in a
target lost to true at the root). Readers use config.IsExplicitlyEnabled, so
behavior is otherwise unchanged; PyDABs keeps treating only enabled: true as
configured.

A unit test guards that no CLI-defined struct reintroduces an omitempty bool
without ForceSendFields; bundle.force is skipped since it is readonly (set from
--force, not by users).

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added DABs DABs related issues PyDABs labels Nov 9, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Commit: a018a9184 | Workflow run

Regression test report

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

4 tests: regression=4 unreleased=0 coverage=0 failing=0
test branch main (df79350) latest (v1.25.0)
TestAccept/bundle/refschema/DMS= ✅ ❌ ❌
TestAccept/bundle/refschema/DMS=true ✅ ❌ ❌
TestAccept/bundle/validate/explicit_false/DMS= ✅ ❌ ❌
TestAccept/bundle/validate/explicit_false/DMS=true ✅ ❌ ❌
TestAccept/bundle/refschema/DMS=: branch ✅ | main (df79350) ❌ | latest (v1.25.0) ❌

main (df79350):

acceptance_test.go:1345: Diff:
        --- bundle/refschema/output/root.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=370215851/001/output/root.txt
        @@ -9,7 +9,7 @@
         artifacts	config.Artifacts	INPUT
         artifacts.*	*config.Artifact	INPUT
         artifacts.*.build	string	INPUT
        -artifacts.*.dynamic_version	*bool	INPUT
        +artifacts.*.dynamic_version	bool	INPUT
         artifacts.*.executable	exec.ExecutableType	INPUT
         artifacts.*.files	[]config.ArtifactFile	INPUT
         artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -33,7 +33,7 @@
         bundle.deployment.latest_version_id	int	INPUT
         bundle.deployment.lock	config.Lock	INPUT
         bundle.deployment.lock.enabled	*bool	INPUT
        -bundle.deployment.lock.force	*bool	INPUT
        +bundle.deployment.lock.force	bool	INPUT
         bundle.engine	engine.EngineType	INPUT
         bundle.environment	string	INPUT
         bundle.force	bool	INPUT
        @@ -55,7 +55,7 @@
         environments.*.artifacts	config.Artifacts	INPUT
         environments.*.artifacts.*	*config.Artifact	INPUT
         environments.*.artifacts.*.build	string	INPUT
        -environments.*.artifacts.*.dynamic_version	*bool	INPUT
        +environments.*.artifacts.*.dynamic_version	bool	INPUT
         environments.*.artifacts.*.executable	exec.ExecutableType	INPUT
         environments.*.artifacts.*.files	[]config.ArtifactFile	INPUT
         environments.*.artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -79,7 +79,7 @@
         environments.*.bundle.deployment.latest_version_id	int	INPUT
         environments.*.bundle.deployment.lock	config.Lock	INPUT
         environments.*.bundle.deployment.lock.enabled	*bool	INPUT
        -environments.*.bundle.deployment.lock.force	*bool	INPUT
        +environments.*.bundle.deployment.lock.force	bool	INPUT
         environments.*.bundle.engine	engine.EngineType	INPUT
         environments.*.bundle.environment	string	INPUT
         environments.*.bundle.force	bool	INPUT
        @@ -97,7 +97,7 @@
         environments.*.bundle.uuid	string	INPUT
         environments.*.cluster_id	string	INPUT
         environments.*.compute_id	string	INPUT
        -environments.*.default	*bool	INPUT
        +environments.*.default	bool	INPUT
         environments.*.git	config.Git	INPUT
         environments.*.git.actual_branch	string	INPUT
         environments.*.git.branch	string	INPUT
        @@ -148,7 +148,7 @@
         environments.*.variables.*.lookup.query	string	INPUT
         environments.*.variables.*.lookup.service_principal	string	INPUT
         environments.*.variables.*.lookup.warehouse	string	INPUT
        -environments.*.variables.*.sensitive	*bool	INPUT
        +environments.*.variables.*.sensitive	bool	INPUT
         environments.*.variables.*.type	variable.VariableType	INPUT
         environments.*.variables.*.value	any	INPUT
         environments.*.workspace	*config.Workspace	INPUT
        @@ -159,7 +159,7 @@
         environments.*.workspace.azure_environment	string	INPUT
         environments.*.workspace.azure_login_app_id	string	INPUT
         environments.*.workspace.azure_tenant_id	string	INPUT
        -environments.*.workspace.azure_use_msi	*bool	INPUT
        +environments.*.workspace.azure_use_msi	bool	INPUT
         environments.*.workspace.azure_workspace_resource_id	string	INPUT
         environments.*.workspace.client_id	string	INPUT
         environments.*.workspace.current_user	*config.User	INPUT
        @@ -204,7 +204,7 @@
         environments.*.workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         environments.*.workspace.current_user.short_name	string	INPUT
         environments.*.workspace.current_user.userName	string	INPUT
        -environments.*.workspace.experimental_is_unified_host	*bool	INPUT
        +environments.*.workspace.experimental_is_unified_host	bool	INPUT
         environments.*.workspace.file_path	string	INPUT
         environments.*.workspace.google_service_account	string	INPUT
         environments.*.workspace.host	string	INPUT
        @@ -217,19 +217,19 @@
         environments.*.workspace.workspace_id	string	INPUT
         experimental	*config.Experimental	INPUT
         experimental.deployment_history	*bool	INPUT
        -experimental.immutable_folder	*bool	INPUT
        +experimental.immutable_folder	bool	INPUT
         experimental.pydabs	config.PyDABs	INPUT
        -experimental.pydabs.enabled	*bool	INPUT
        +experimental.pydabs.enabled	bool	INPUT
         experimental.python	config.Python	INPUT
         experimental.python.mutators	[]string	INPUT
         experimental.python.mutators[*]	string	INPUT
         experimental.python.venv_path	string	INPUT
        -experimental.python_wheel_wrapper	*bool	INPUT
        +experimental.python_wheel_wrapper	bool	INPUT
         experimental.scripts	map[config.ScriptHook]config.Command	INPUT
         experimental.scripts.*	config.Command	INPUT
        -experimental.skip_artifact_cleanup	*bool	INPUT
        -experimental.skip_name_prefix_for_schema	*bool	INPUT
        -experimental.use_legacy_run_as	*bool	INPUT
        +experimental.skip_artifact_cleanup	bool	INPUT
        +experimental.skip_name_prefix_for_schema	bool	INPUT
        +experimental.use_legacy_run_as	bool	INPUT
         include	[]string	INPUT
         include[*]	string	INPUT
         permissions	[]resources.Permission	INPUT
        @@ -272,7 +265,7 @@
         targets.*.artifacts	config.Artifacts	INPUT
         targets.*.artifacts.*	*config.Artifact	INPUT
         targets.*.artifacts.*.build	string	INPUT
        -targets.*.artifacts.*.dynamic_version	*bool	INPUT
        +targets.*.artifacts.*.dynamic_version	bool	INPUT
         targets.*.artifacts.*.executable	exec.ExecutableType	INPUT
         targets.*.artifacts.*.files	[]config.ArtifactFile	INPUT
         targets.*.artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -296,7 +289,7 @@
         targets.*.bundle.deployment.latest_version_id	int	INPUT
         targets.*.bundle.deployment.lock	config.Lock	INPUT
         targets.*.bundle.deployment.lock.enabled	*bool	INPUT
        -targets.*.bundle.deployment.lock.force	*bool	INPUT
        +targets.*.bundle.deployment.lock.force	bool	INPUT
         targets.*.bundle.engine	engine.EngineType	INPUT
         targets.*.bundle.environment	string	INPUT
         targets.*.bundle.force	bool	INPUT
        @@ -314,7 +307,7 @@
         targets.*.bundle.uuid	string	INPUT
         targets.*.cluster_id	string	INPUT
         targets.*.compute_id	string	INPUT
        -targets.*.default	*bool	INPUT
        +targets.*.default	bool	INPUT
         targets.*.git	config.Git	INPUT
         targets.*.git.actual_branch	string	INPUT
         targets.*.git.branch	string	INPUT
        @@ -365,7 +358,7 @@
         targets.*.variables.*.lookup.query	string	INPUT
         targets.*.variables.*.lookup.service_principal	string	INPUT
         targets.*.variables.*.lookup.warehouse	string	INPUT
        -targets.*.variables.*.sensitive	*bool	INPUT
        +targets.*.variables.*.sensitive	bool	INPUT
         targets.*.variables.*.type	variable.VariableType	INPUT
         targets.*.variables.*.value	any	INPUT
         targets.*.workspace	*config.Workspace	INPUT
        @@ -376,7 +369,7 @@
         targets.*.workspace.azure_environment	string	INPUT
         targets.*.workspace.azure_login_app_id	string	INPUT
         targets.*.workspace.azure_tenant_id	string	INPUT
        -targets.*.workspace.azure_use_msi	*bool	INPUT
        +targets.*.workspace.azure_use_msi	bool	INPUT
         targets.*.workspace.azure_workspace_resource_id	string	INPUT
         targets.*.workspace.client_id	string	INPUT
         targets.*.workspace.current_user	*config.User	INPUT
        @@ -421,7 +414,7 @@
         targets.*.workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         targets.*.workspace.current_user.short_name	string	INPUT
         targets.*.workspace.current_user.userName	string	INPUT
        -targets.*.workspace.experimental_is_unified_host	*bool	INPUT
        +targets.*.workspace.experimental_is_unified_host	bool	INPUT
         targets.*.workspace.file_path	string	INPUT
         targets.*.workspace.google_service_account	string	INPUT
         targets.*.workspace.host	string	INPUT
        @@ -449,7 +442,7 @@
         variables.*.lookup.query	string	INPUT
         variables.*.lookup.service_principal	string	INPUT
         variables.*.lookup.warehouse	string	INPUT
        -variables.*.sensitive	*bool	INPUT
        +variables.*.sensitive	bool	INPUT
         variables.*.type	variable.VariableType	INPUT
         variables.*.value	any	INPUT
         workspace	config.Workspace	INPUT
        @@ -460,7 +453,7 @@
         workspace.azure_environment	string	INPUT
         workspace.azure_login_app_id	string	INPUT
         workspace.azure_tenant_id	string	INPUT
        -workspace.azure_use_msi	*bool	INPUT
        +workspace.azure_use_msi	bool	INPUT
         workspace.azure_workspace_resource_id	string	INPUT
         workspace.client_id	string	INPUT
         workspace.current_user	*config.User	INPUT
        @@ -505,7 +498,7 @@
         workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         workspace.current_user.short_name	string	INPUT
         workspace.current_user.userName	string	INPUT
        -workspace.experimental_is_unified_host	*bool	INPUT
        +workspace.experimental_is_unified_host	bool	INPUT
         workspace.file_path	string	INPUT
         workspace.google_service_account	string	INPUT
         workspace.host	string	INPUT

latest (v1.25.0): same output as main (df79350)

TestAccept/bundle/refschema/DMS=true: branch ✅ | main (df79350) ❌ | latest (v1.25.0) ❌

main (df79350):

acceptance_test.go:1345: Diff:
        --- bundle/refschema/output/root.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=true849959894/001/output/root.txt
        @@ -9,7 +9,7 @@
         artifacts	config.Artifacts	INPUT
         artifacts.*	*config.Artifact	INPUT
         artifacts.*.build	string	INPUT
        -artifacts.*.dynamic_version	*bool	INPUT
        +artifacts.*.dynamic_version	bool	INPUT
         artifacts.*.executable	exec.ExecutableType	INPUT
         artifacts.*.files	[]config.ArtifactFile	INPUT
         artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -33,7 +33,7 @@
         bundle.deployment.latest_version_id	int	INPUT
         bundle.deployment.lock	config.Lock	INPUT
         bundle.deployment.lock.enabled	*bool	INPUT
        -bundle.deployment.lock.force	*bool	INPUT
        +bundle.deployment.lock.force	bool	INPUT
         bundle.engine	engine.EngineType	INPUT
         bundle.environment	string	INPUT
         bundle.force	bool	INPUT
        @@ -55,7 +55,7 @@
         environments.*.artifacts	config.Artifacts	INPUT
         environments.*.artifacts.*	*config.Artifact	INPUT
         environments.*.artifacts.*.build	string	INPUT
        -environments.*.artifacts.*.dynamic_version	*bool	INPUT
        +environments.*.artifacts.*.dynamic_version	bool	INPUT
         environments.*.artifacts.*.executable	exec.ExecutableType	INPUT
         environments.*.artifacts.*.files	[]config.ArtifactFile	INPUT
         environments.*.artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -79,7 +79,7 @@
         environments.*.bundle.deployment.latest_version_id	int	INPUT
         environments.*.bundle.deployment.lock	config.Lock	INPUT
         environments.*.bundle.deployment.lock.enabled	*bool	INPUT
        -environments.*.bundle.deployment.lock.force	*bool	INPUT
        +environments.*.bundle.deployment.lock.force	bool	INPUT
         environments.*.bundle.engine	engine.EngineType	INPUT
         environments.*.bundle.environment	string	INPUT
         environments.*.bundle.force	bool	INPUT
        @@ -97,7 +97,7 @@
         environments.*.bundle.uuid	string	INPUT
         environments.*.cluster_id	string	INPUT
         environments.*.compute_id	string	INPUT
        -environments.*.default	*bool	INPUT
        +environments.*.default	bool	INPUT
         environments.*.git	config.Git	INPUT
         environments.*.git.actual_branch	string	INPUT
         environments.*.git.branch	string	INPUT
        @@ -148,7 +148,7 @@
         environments.*.variables.*.lookup.query	string	INPUT
         environments.*.variables.*.lookup.service_principal	string	INPUT
         environments.*.variables.*.lookup.warehouse	string	INPUT
        -environments.*.variables.*.sensitive	*bool	INPUT
        +environments.*.variables.*.sensitive	bool	INPUT
         environments.*.variables.*.type	variable.VariableType	INPUT
         environments.*.variables.*.value	any	INPUT
         environments.*.workspace	*config.Workspace	INPUT
        @@ -159,7 +159,7 @@
         environments.*.workspace.azure_environment	string	INPUT
         environments.*.workspace.azure_login_app_id	string	INPUT
         environments.*.workspace.azure_tenant_id	string	INPUT
        -environments.*.workspace.azure_use_msi	*bool	INPUT
        +environments.*.workspace.azure_use_msi	bool	INPUT
         environments.*.workspace.azure_workspace_resource_id	string	INPUT
         environments.*.workspace.client_id	string	INPUT
         environments.*.workspace.current_user	*config.User	INPUT
        @@ -204,7 +204,7 @@
         environments.*.workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         environments.*.workspace.current_user.short_name	string	INPUT
         environments.*.workspace.current_user.userName	string	INPUT
        -environments.*.workspace.experimental_is_unified_host	*bool	INPUT
        +environments.*.workspace.experimental_is_unified_host	bool	INPUT
         environments.*.workspace.file_path	string	INPUT
         environments.*.workspace.google_service_account	string	INPUT
         environments.*.workspace.host	string	INPUT
        @@ -217,19 +217,19 @@
         environments.*.workspace.workspace_id	string	INPUT
         experimental	*config.Experimental	INPUT
         experimental.deployment_history	*bool	INPUT
        -experimental.immutable_folder	*bool	INPUT
        +experimental.immutable_folder	bool	INPUT
         experimental.pydabs	config.PyDABs	INPUT
        -experimental.pydabs.enabled	*bool	INPUT
        +experimental.pydabs.enabled	bool	INPUT
         experimental.python	config.Python	INPUT
         experimental.python.mutators	[]string	INPUT
         experimental.python.mutators[*]	string	INPUT
         experimental.python.venv_path	string	INPUT
        -experimental.python_wheel_wrapper	*bool	INPUT
        +experimental.python_wheel_wrapper	bool	INPUT
         experimental.scripts	map[config.ScriptHook]config.Command	INPUT
         experimental.scripts.*	config.Command	INPUT
        -experimental.skip_artifact_cleanup	*bool	INPUT
        -experimental.skip_name_prefix_for_schema	*bool	INPUT
        -experimental.use_legacy_run_as	*bool	INPUT
        +experimental.skip_artifact_cleanup	bool	INPUT
        +experimental.skip_name_prefix_for_schema	bool	INPUT
        +experimental.use_legacy_run_as	bool	INPUT
         include	[]string	INPUT
         include[*]	string	INPUT
         permissions	[]resources.Permission	INPUT
        @@ -272,7 +265,7 @@
         targets.*.artifacts	config.Artifacts	INPUT
         targets.*.artifacts.*	*config.Artifact	INPUT
         targets.*.artifacts.*.build	string	INPUT
        -targets.*.artifacts.*.dynamic_version	*bool	INPUT
        +targets.*.artifacts.*.dynamic_version	bool	INPUT
         targets.*.artifacts.*.executable	exec.ExecutableType	INPUT
         targets.*.artifacts.*.files	[]config.ArtifactFile	INPUT
         targets.*.artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -296,7 +289,7 @@
         targets.*.bundle.deployment.latest_version_id	int	INPUT
         targets.*.bundle.deployment.lock	config.Lock	INPUT
         targets.*.bundle.deployment.lock.enabled	*bool	INPUT
        -targets.*.bundle.deployment.lock.force	*bool	INPUT
        +targets.*.bundle.deployment.lock.force	bool	INPUT
         targets.*.bundle.engine	engine.EngineType	INPUT
         targets.*.bundle.environment	string	INPUT
         targets.*.bundle.force	bool	INPUT
        @@ -314,7 +307,7 @@
         targets.*.bundle.uuid	string	INPUT
         targets.*.cluster_id	string	INPUT
         targets.*.compute_id	string	INPUT
        -targets.*.default	*bool	INPUT
        +targets.*.default	bool	INPUT
         targets.*.git	config.Git	INPUT
         targets.*.git.actual_branch	string	INPUT
         targets.*.git.branch	string	INPUT
        @@ -365,7 +358,7 @@
         targets.*.variables.*.lookup.query	string	INPUT
         targets.*.variables.*.lookup.service_principal	string	INPUT
         targets.*.variables.*.lookup.warehouse	string	INPUT
        -targets.*.variables.*.sensitive	*bool	INPUT
        +targets.*.variables.*.sensitive	bool	INPUT
         targets.*.variables.*.type	variable.VariableType	INPUT
         targets.*.variables.*.value	any	INPUT
         targets.*.workspace	*config.Workspace	INPUT
        @@ -376,7 +369,7 @@
         targets.*.workspace.azure_environment	string	INPUT
         targets.*.workspace.azure_login_app_id	string	INPUT
         targets.*.workspace.azure_tenant_id	string	INPUT
        -targets.*.workspace.azure_use_msi	*bool	INPUT
        +targets.*.workspace.azure_use_msi	bool	INPUT
         targets.*.workspace.azure_workspace_resource_id	string	INPUT
         targets.*.workspace.client_id	string	INPUT
         targets.*.workspace.current_user	*config.User	INPUT
        @@ -421,7 +414,7 @@
         targets.*.workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         targets.*.workspace.current_user.short_name	string	INPUT
         targets.*.workspace.current_user.userName	string	INPUT
        -targets.*.workspace.experimental_is_unified_host	*bool	INPUT
        +targets.*.workspace.experimental_is_unified_host	bool	INPUT
         targets.*.workspace.file_path	string	INPUT
         targets.*.workspace.google_service_account	string	INPUT
         targets.*.workspace.host	string	INPUT
        @@ -449,7 +442,7 @@
         variables.*.lookup.query	string	INPUT
         variables.*.lookup.service_principal	string	INPUT
         variables.*.lookup.warehouse	string	INPUT
        -variables.*.sensitive	*bool	INPUT
        +variables.*.sensitive	bool	INPUT
         variables.*.type	variable.VariableType	INPUT
         variables.*.value	any	INPUT
         workspace	config.Workspace	INPUT
        @@ -460,7 +453,7 @@
         workspace.azure_environment	string	INPUT
         workspace.azure_login_app_id	string	INPUT
         workspace.azure_tenant_id	string	INPUT
        -workspace.azure_use_msi	*bool	INPUT
        +workspace.azure_use_msi	bool	INPUT
         workspace.azure_workspace_resource_id	string	INPUT
         workspace.client_id	string	INPUT
         workspace.current_user	*config.User	INPUT
        @@ -505,7 +498,7 @@
         workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         workspace.current_user.short_name	string	INPUT
         workspace.current_user.userName	string	INPUT
        -workspace.experimental_is_unified_host	*bool	INPUT
        +workspace.experimental_is_unified_host	bool	INPUT
         workspace.file_path	string	INPUT
         workspace.google_service_account	string	INPUT
         workspace.host	string	INPUT
        
FAIL

latest (v1.25.0):

acceptance_test.go:1345: Diff:
        --- bundle/refschema/output/root.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=true878039810/001/output/root.txt
        @@ -9,7 +9,7 @@
         artifacts	config.Artifacts	INPUT
         artifacts.*	*config.Artifact	INPUT
         artifacts.*.build	string	INPUT
        -artifacts.*.dynamic_version	*bool	INPUT
        +artifacts.*.dynamic_version	bool	INPUT
         artifacts.*.executable	exec.ExecutableType	INPUT
         artifacts.*.files	[]config.ArtifactFile	INPUT
         artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -33,7 +33,7 @@
         bundle.deployment.latest_version_id	int	INPUT
         bundle.deployment.lock	config.Lock	INPUT
         bundle.deployment.lock.enabled	*bool	INPUT
        -bundle.deployment.lock.force	*bool	INPUT
        +bundle.deployment.lock.force	bool	INPUT
         bundle.engine	engine.EngineType	INPUT
         bundle.environment	string	INPUT
         bundle.force	bool	INPUT
        @@ -55,7 +55,7 @@
         environments.*.artifacts	config.Artifacts	INPUT
         environments.*.artifacts.*	*config.Artifact	INPUT
         environments.*.artifacts.*.build	string	INPUT
        -environments.*.artifacts.*.dynamic_version	*bool	INPUT
        +environments.*.artifacts.*.dynamic_version	bool	INPUT
         environments.*.artifacts.*.executable	exec.ExecutableType	INPUT
         environments.*.artifacts.*.files	[]config.ArtifactFile	INPUT
         environments.*.artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -79,7 +79,7 @@
         environments.*.bundle.deployment.latest_version_id	int	INPUT
         environments.*.bundle.deployment.lock	config.Lock	INPUT
         environments.*.bundle.deployment.lock.enabled	*bool	INPUT
        -environments.*.bundle.deployment.lock.force	*bool	INPUT
        +environments.*.bundle.deployment.lock.force	bool	INPUT
         environments.*.bundle.engine	engine.EngineType	INPUT
         environments.*.bundle.environment	string	INPUT
         environments.*.bundle.force	bool	INPUT
        @@ -97,7 +97,7 @@
         environments.*.bundle.uuid	string	INPUT
         environments.*.cluster_id	string	INPUT
         environments.*.compute_id	string	INPUT
        -environments.*.default	*bool	INPUT
        +environments.*.default	bool	INPUT
         environments.*.git	config.Git	INPUT
         environments.*.git.actual_branch	string	INPUT
         environments.*.git.branch	string	INPUT
        @@ -148,7 +148,7 @@
         environments.*.variables.*.lookup.query	string	INPUT
         environments.*.variables.*.lookup.service_principal	string	INPUT
         environments.*.variables.*.lookup.warehouse	string	INPUT
        -environments.*.variables.*.sensitive	*bool	INPUT
        +environments.*.variables.*.sensitive	bool	INPUT
         environments.*.variables.*.type	variable.VariableType	INPUT
         environments.*.variables.*.value	any	INPUT
         environments.*.workspace	*config.Workspace	INPUT
        @@ -159,7 +159,7 @@
         environments.*.workspace.azure_environment	string	INPUT
         environments.*.workspace.azure_login_app_id	string	INPUT
         environments.*.workspace.azure_tenant_id	string	INPUT
        -environments.*.workspace.azure_use_msi	*bool	INPUT
        +environments.*.workspace.azure_use_msi	bool	INPUT
         environments.*.workspace.azure_workspace_resource_id	string	INPUT
         environments.*.workspace.client_id	string	INPUT
         environments.*.workspace.current_user	*config.User	INPUT
        @@ -204,7 +204,7 @@
         environments.*.workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         environments.*.workspace.current_user.short_name	string	INPUT
         environments.*.workspace.current_user.userName	string	INPUT
        -environments.*.workspace.experimental_is_unified_host	*bool	INPUT
        +environments.*.workspace.experimental_is_unified_host	bool	INPUT
         environments.*.workspace.file_path	string	INPUT
         environments.*.workspace.google_service_account	string	INPUT
         environments.*.workspace.host	string	INPUT
        @@ -217,19 +217,19 @@
         environments.*.workspace.workspace_id	string	INPUT
         experimental	*config.Experimental	INPUT
         experimental.deployment_history	*bool	INPUT
        -experimental.immutable_folder	*bool	INPUT
        +experimental.immutable_folder	bool	INPUT
         experimental.pydabs	config.PyDABs	INPUT
        -experimental.pydabs.enabled	*bool	INPUT
        +experimental.pydabs.enabled	bool	INPUT
         experimental.python	config.Python	INPUT
         experimental.python.mutators	[]string	INPUT
         experimental.python.mutators[*]	string	INPUT
         experimental.python.venv_path	string	INPUT
        -experimental.python_wheel_wrapper	*bool	INPUT
        +experimental.python_wheel_wrapper	bool	INPUT
         experimental.scripts	map[config.ScriptHook]config.Command	INPUT
         experimental.scripts.*	config.Command	INPUT
        -experimental.skip_artifact_cleanup	*bool	INPUT
        -experimental.skip_name_prefix_for_schema	*bool	INPUT
        -experimental.use_legacy_run_as	*bool	INPUT
        +experimental.skip_artifact_cleanup	bool	INPUT
        +experimental.skip_name_prefix_for_schema	bool	INPUT
        +experimental.use_legacy_run_as	bool	INPUT
         include	[]string	INPUT
         include[*]	string	INPUT
         permissions	[]resources.Permission	INPUT
        @@ -272,7 +265,7 @@
         targets.*.artifacts	config.Artifacts	INPUT
         targets.*.artifacts.*	*config.Artifact	INPUT
         targets.*.artifacts.*.build	string	INPUT
        -targets.*.artifacts.*.dynamic_version	*bool	INPUT
        +targets.*.artifacts.*.dynamic_version	bool	INPUT
         targets.*.artifacts.*.executable	exec.ExecutableType	INPUT
         targets.*.artifacts.*.files	[]config.ArtifactFile	INPUT
         targets.*.artifacts.*.files[*]	config.ArtifactFile	INPUT
        @@ -296,7 +289,7 @@
         targets.*.bundle.deployment.latest_version_id	int	INPUT
         targets.*.bundle.deployment.lock	config.Lock	INPUT
         targets.*.bundle.deployment.lock.enabled	*bool	INPUT
        -targets.*.bundle.deployment.lock.force	*bool	INPUT
        +targets.*.bundle.deployment.lock.force	bool	INPUT
         targets.*.bundle.engine	engine.EngineType	INPUT
         targets.*.bundle.environment	string	INPUT
         targets.*.bundle.force	bool	INPUT
        @@ -314,7 +307,7 @@
         targets.*.bundle.uuid	string	INPUT
         targets.*.cluster_id	string	INPUT
         targets.*.compute_id	string	INPUT
        -targets.*.default	*bool	INPUT
        +targets.*.default	bool	INPUT
         targets.*.git	config.Git	INPUT
         targets.*.git.actual_branch	string	INPUT
         targets.*.git.branch	string	INPUT
        @@ -365,7 +358,7 @@
         targets.*.variables.*.lookup.query	string	INPUT
         targets.*.variables.*.lookup.service_principal	string	INPUT
         targets.*.variables.*.lookup.warehouse	string	INPUT
        -targets.*.variables.*.sensitive	*bool	INPUT
        +targets.*.variables.*.sensitive	bool	INPUT
         targets.*.variables.*.type	variable.VariableType	INPUT
         targets.*.variables.*.value	any	INPUT
         targets.*.workspace	*config.Workspace	INPUT
        @@ -376,7 +369,7 @@
         targets.*.workspace.azure_environment	string	INPUT
         targets.*.workspace.azure_login_app_id	string	INPUT
         targets.*.workspace.azure_tenant_id	string	INPUT
        -targets.*.workspace.azure_use_msi	*bool	INPUT
        +targets.*.workspace.azure_use_msi	bool	INPUT
         targets.*.workspace.azure_workspace_resource_id	string	INPUT
         targets.*.workspace.client_id	string	INPUT
         targets.*.workspace.current_user	*config.User	INPUT
        @@ -421,7 +414,7 @@
         targets.*.workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         targets.*.workspace.current_user.short_name	string	INPUT
         targets.*.workspace.current_user.userName	string	INPUT
        -targets.*.workspace.experimental_is_unified_host	*bool	INPUT
        +targets.*.workspace.experimental_is_unified_host	bool	INPUT
         targets.*.workspace.file_path	string	INPUT
         targets.*.workspace.google_service_account	string	INPUT
         targets.*.workspace.host	string	INPUT
        @@ -449,7 +442,7 @@
         variables.*.lookup.query	string	INPUT
         variables.*.lookup.service_principal	string	INPUT
         variables.*.lookup.warehouse	string	INPUT
        -variables.*.sensitive	*bool	INPUT
        +variables.*.sensitive	bool	INPUT
         variables.*.type	variable.VariableType	INPUT
         variables.*.value	any	INPUT
         workspace	config.Workspace	INPUT
        @@ -460,7 +453,7 @@
         workspace.azure_environment	string	INPUT
         workspace.azure_login_app_id	string	INPUT
         workspace.azure_tenant_id	string	INPUT
        -workspace.azure_use_msi	*bool	INPUT
        +workspace.azure_use_msi	bool	INPUT
         workspace.azure_workspace_resource_id	string	INPUT
         workspace.client_id	string	INPUT
         workspace.current_user	*config.User	INPUT
        @@ -505,7 +498,7 @@
         workspace.current_user.schemas[*]	iam.UserSchema	INPUT
         workspace.current_user.short_name	string	INPUT
         workspace.current_user.userName	string	INPUT
        -workspace.experimental_is_unified_host	*bool	INPUT
        +workspace.experimental_is_unified_host	bool	INPUT
         workspace.file_path	string	INPUT
         workspace.google_service_account	string	INPUT
         workspace.host	string	INPUT
TestAccept/bundle/validate/explicit_false/DMS=: branch ✅ | main (df79350) ❌ | latest (v1.25.0) ❌

main (df79350):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -o json\n{\n  \"lock_force\": false,\n  \"workspace\": {\n    \"azure_use_msi\": false\n  },\n  \"variables\": {\n    \"plain\": {\n      \"sensitive\": false\n    }\n  },\n  \"artifacts\": {\n    \"overridden\": {\n      \"dynamic_version\": false\n    },\n    \"whl\": {\n      \"dynamic_version\": false\n    }\n  },\n  \"experimental\": {\n    \"python_wheel_wrapper\": false,\n    \"skip_artifact_cleanup\": false,\n    \"skip_name_prefix_for_schema\": false,\n    \"use_legacy_run_as\": false\n  }\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -o json\nError: cannot resolve bundle auth configuration: validate: more than one authorization method configured: azure and pat. Config: host=[DATABRICKS_URL], token=***, azure_use_msi=true, databricks_cli_path=[CLI]. Env: DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_CLI_PATH\n\n{\n  \"lock_force\": true,\n  \"workspace\": {\n    \"azure_use_msi\": true\n  },\n  \"variables\": {\n    \"plain\": {\n      \"sensitive\": null\n    }\n  },\n  \"artifacts\": {\n    \"overridden\": {\n      \"dynamic_version\": true\n    },\n    \"whl\": {\n      \"dynamic_version\": null\n    }\n  },\n  \"experimental\": {}\n}\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,6 +2,8 @@
        	            	 >>> [CLI] bundle validate -o json
        	            	+Error: cannot resolve bundle auth configuration: validate: more than one authorization method configured: azure and pat. Config: host=[DATABRICKS_URL], token=***, azure_use_msi=true, databricks_cli_path=[CLI]. Env: DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_CLI_PATH
        	            	+
        	            	 {
        	            	-  "lock_force": false,
        	            	+  "lock_force": true,
        	            	   "workspace": {
        	            	-    "azure_use_msi": false
        	            	+    "azure_use_msi": true
        	            	   },
        	            	@@ -9,3 +11,3 @@
        	            	     "plain": {
        	            	-      "sensitive": false
        	            	+      "sensitive": null
        	            	     }
        	            	@@ -14,15 +16,12 @@
        	            	     "overridden": {
        	            	-      "dynamic_version": false
        	            	+      "dynamic_version": true
        	            	     },
        	            	     "whl": {
        	            	-      "dynamic_version": false
        	            	+      "dynamic_version": null
        	            	     }
        	            	   },
        	            	-  "experimental": {
        	            	-    "python_wheel_wrapper": false,
        	            	-    "skip_artifact_cleanup": false,
        	            	-    "skip_name_prefix_for_schema": false,
        	            	-    "use_legacy_run_as": false
        	            	-  }
        	            	+  "experimental": {}
        	            	 }
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/validate/explicit_false/DMS=
        	Messages:   	bundle/validate/explicit_false/output.txt vs /tmp/TestAcceptbundlevalidateexplicit_falseDMS=1032911876/002/output.txt

latest (v1.25.0): same output as main (df79350)

TestAccept/bundle/validate/explicit_false/DMS=true: branch ✅ | main (df79350) ❌ | latest (v1.25.0) ❌

main (df79350):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -o json\n{\n  \"lock_force\": false,\n  \"workspace\": {\n    \"azure_use_msi\": false\n  },\n  \"variables\": {\n    \"plain\": {\n      \"sensitive\": false\n    }\n  },\n  \"artifacts\": {\n    \"overridden\": {\n      \"dynamic_version\": false\n    },\n    \"whl\": {\n      \"dynamic_version\": false\n    }\n  },\n  \"experimental\": {\n    \"python_wheel_wrapper\": false,\n    \"skip_artifact_cleanup\": false,\n    \"skip_name_prefix_for_schema\": false,\n    \"use_legacy_run_as\": false\n  }\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -o json\nError: cannot resolve bundle auth configuration: validate: more than one authorization method configured: azure and pat. Config: host=[DATABRICKS_URL], token=***, azure_use_msi=true, databricks_cli_path=[CLI]. Env: DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_CLI_PATH\n\n{\n  \"lock_force\": true,\n  \"workspace\": {\n    \"azure_use_msi\": true\n  },\n  \"variables\": {\n    \"plain\": {\n      \"sensitive\": null\n    }\n  },\n  \"artifacts\": {\n    \"overridden\": {\n      \"dynamic_version\": true\n    },\n    \"whl\": {\n      \"dynamic_version\": null\n    }\n  },\n  \"experimental\": {}\n}\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,6 +2,8 @@
        	            	 >>> [CLI] bundle validate -o json
        	            	+Error: cannot resolve bundle auth configuration: validate: more than one authorization method configured: azure and pat. Config: host=[DATABRICKS_URL], token=***, azure_use_msi=true, databricks_cli_path=[CLI]. Env: DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_CLI_PATH
        	            	+
        	            	 {
        	            	-  "lock_force": false,
        	            	+  "lock_force": true,
        	            	   "workspace": {
        	            	-    "azure_use_msi": false
        	            	+    "azure_use_msi": true
        	            	   },
        	            	@@ -9,3 +11,3 @@
        	            	     "plain": {
        	            	-      "sensitive": false
        	            	+      "sensitive": null
        	            	     }
        	            	@@ -14,15 +16,12 @@
        	            	     "overridden": {
        	            	-      "dynamic_version": false
        	            	+      "dynamic_version": true
        	            	     },
        	            	     "whl": {
        	            	-      "dynamic_version": false
        	            	+      "dynamic_version": null
        	            	     }
        	            	   },
        	            	-  "experimental": {
        	            	-    "python_wheel_wrapper": false,
        	            	-    "skip_artifact_cleanup": false,
        	            	-    "skip_name_prefix_for_schema": false,
        	            	-    "use_legacy_run_as": false
        	            	-  }
        	            	+  "experimental": {}
        	            	 }
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/validate/explicit_false/DMS=true
        	Messages:   	bundle/validate/explicit_false/output.txt vs /tmp/TestAcceptbundlevalidateexplicit_falseDMS=true3763352900/002/output.txt

latest (v1.25.0):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -o json\n{\n  \"lock_force\": false,\n  \"workspace\": {\n    \"azure_use_msi\": false\n  },\n  \"variables\": {\n    \"plain\": {\n      \"sensitive\": false\n    }\n  },\n  \"artifacts\": {\n    \"overridden\": {\n      \"dynamic_version\": false\n    },\n    \"whl\": {\n      \"dynamic_version\": false\n    }\n  },\n  \"experimental\": {\n    \"python_wheel_wrapper\": false,\n    \"skip_artifact_cleanup\": false,\n    \"skip_name_prefix_for_schema\": false,\n    \"use_legacy_run_as\": false\n  }\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -o json\nError: cannot resolve bundle auth configuration: validate: more than one authorization method configured: azure and pat. Config: host=[DATABRICKS_URL], token=***, azure_use_msi=true, databricks_cli_path=[CLI]. Env: DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_CLI_PATH\n\n{\n  \"lock_force\": true,\n  \"workspace\": {\n    \"azure_use_msi\": true\n  },\n  \"variables\": {\n    \"plain\": {\n      \"sensitive\": null\n    }\n  },\n  \"artifacts\": {\n    \"overridden\": {\n      \"dynamic_version\": true\n    },\n    \"whl\": {\n      \"dynamic_version\": null\n    }\n  },\n  \"experimental\": {}\n}\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,6 +2,8 @@
        	            	 >>> [CLI] bundle validate -o json
        	            	+Error: cannot resolve bundle auth configuration: validate: more than one authorization method configured: azure and pat. Config: host=[DATABRICKS_URL], token=***, azure_use_msi=true, databricks_cli_path=[CLI]. Env: DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_CLI_PATH
        	            	+
        	            	 {
        	            	-  "lock_force": false,
        	            	+  "lock_force": true,
        	            	   "workspace": {
        	            	-    "azure_use_msi": false
        	            	+    "azure_use_msi": true
        	            	   },
        	            	@@ -9,3 +11,3 @@
        	            	     "plain": {
        	            	-      "sensitive": false
        	            	+      "sensitive": null
        	            	     }
        	            	@@ -14,15 +16,12 @@
        	            	     "overridden": {
        	            	-      "dynamic_version": false
        	            	+      "dynamic_version": true
        	            	     },
        	            	     "whl": {
        	            	-      "dynamic_version": false
        	            	+      "dynamic_version": null
        	            	     }
        	            	   },
        	            	-  "experimental": {
        	            	-    "python_wheel_wrapper": false,
        	            	-    "skip_artifact_cleanup": false,
        	            	-    "skip_name_prefix_for_schema": false,
        	            	-    "use_legacy_run_as": false
        	            	-  }
        	            	+  "experimental": {}
        	            	 }
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/validate/explicit_false/DMS=true
        	Messages:   	bundle/validate/explicit_false/output.txt vs /tmp/TestAcceptbundlevalidateexplicit_falseDMS=true3154570147/002/output.txt
FAIL

…overrides

TestConfigBoolsArePointers now fails for any bool field of a CLI-defined
config struct, not only omitempty ones in structs without ForceSendFields.
The fields that predate it are listed with the reason they stay bool, and
the test also fails if a listed field goes away.

The acceptance test now overrides lock.force and azure_use_msi from a
target too, and the changelog entry covers every affected field.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik denik changed the title Fix targets not being able to set optional bundle bools to false Keep an explicit false on optional bundle config bools Nov 9, 2026
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: a018a91

Run: 42649298435

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 271 17 4:46
✅​ aws-windows-latest-4core-16gb 273 15 3:18
✅​ azure linux-2core-8gb 270 17 4:56
✅​ azure-windows-latest-4core-16gb 272 15 3:11
✅​ gcp linux-2core-8gb 271 17 4:57
✅​ gcp-windows-latest-4core-16gb 273 15 3:17
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:12 aws-windows-latest-4core-16gb TestAccept
3:11 gcp-windows-latest-4core-16gb TestAccept
3:05 azure-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 PyDABs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants