Repository navigation
Conversation
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>
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 2 changed tests (limit=20, 0 not selected) 4 tests: regression=4 unreleased=0 coverage=0 failing=0
TestAccept/bundle/refschema/DMS=: branch ✅ | main (df79350) ❌ | latest (v1.25.0) ❌main (df79350): latest (v1.25.0): same output as main (df79350) TestAccept/bundle/refschema/DMS=true: branch ✅ | main (df79350) ❌ | latest (v1.25.0) ❌main (df79350): latest (v1.25.0): TestAccept/bundle/validate/explicit_false/DMS=: branch ✅ | main (df79350) ❌ | latest (v1.25.0) ❌main (df79350): 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): latest (v1.25.0): |
…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>
Collaborator
✅ Integration test reportCommit: a018a91
Top 3 slowest tests (at least 2 minutes):
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
13 optional bools in CLI-defined config structs were plain
boolwithomitempty. The typed-to-dynamic conversion that runs after every mutator drops zero values, so an explicitfalsewas lost:bundle validate -o json(all of them);truewithfalsefor the ones a target can set:artifacts.*.dynamic_version,bundle.deployment.lock.force,workspace.azure_use_msi;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, likelock.enabledalready is, and readers useconfig.IsExplicitlyEnabled.bundle.forcestays abool: it is readonly, set from--force.TestConfigBoolsArePointersfails for any newboolin a CLI-defined config struct; the fields that predate it are listed with the reason they staybool.Tests
acceptance/bundle/validate/explicit_false: explicitfalsevalues are kept, and a target overridestruewithfalsefor all three overridable fields (on main they staytrue).This pull request and its description were written by Isaac.