Do not skip explicitly configured integer zero in config - #6867
Merged
Merged
Conversation
The direct engine treated an integer 0 as empty, so setting a field like gcp_attributes.local_ssd_count: 0 on a resource first deployed without it was classified as an empty no-op and never applied. Skip a change as empty only when it is not a genuine local change: an integer the config force-sent that differs from the prior state is a real value, while a backend-echoed zero or an unchanged value stays a no-op. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: b52fe6d
Top 6 slowest tests (at least 2 minutes):
|
The Files: N uploaded line varies by environment (3 locally, 1 on CI), so use bundle deploy -qq. The change detection and convergence are asserted through the bundle plan output and the recorded edit request, which are unaffected. Co-authored-by: Isaac <no-reply@databricks.com>
Add the mirror of the fix (Old 0, New nil): removing a field previously set to 0 stays a no-op, since a zero int is wire-equivalent to absent and the explicit-New exception does not fire. Co-authored-by: Isaac <no-reply@databricks.com>
Removing a force-sent integer (Old 0, New nil) is a genuine local change, just like adding one (Old nil, New 0), so allEmptyChange now exempts a zero int on either side of the diff when the sides differ. The acceptance test now also covers removing local_ssd_count: 0 and converging afterward. Full acceptance suite is unaffected. Co-authored-by: Isaac <no-reply@databricks.com>
…ppend Commit the local_ssd_count: 0 line commented out in databricks.yml and flip the comment marker with update_file.py, rather than appending an indented block. Co-authored-by: Isaac <no-reply@databricks.com>
Extract just the gcp_attributes.local_ssd_count entry from bundle plan -o json into output.txt instead of dumping the whole plan to a separate file, and do it for both the set and the clear so the symmetric classification is visible. Co-authored-by: Isaac <no-reply@databricks.com>
denik
marked this pull request as ready for review
September 29, 2026 10:10
denik
enabled auto-merge
September 29, 2026 10:12
shreyas-goenka
approved these changes
Sep 29, 2026
deco-sdk-tagging Bot
added a commit
that referenced
this pull request
Sep 30, 2026
## Release v1.19.0 ### CLI * Honor `CLAUDE_CONFIG_DIR` in `aitools` commands. ([#6838](#6838)) * Added `--ttl` and `--no-expiry` flags to `databricks postgres create-branch` so a branch's expiration can be set without hand-writing a `--json` spec. `--ttl` accepts the REST API duration form (`604800s`), a Go duration (`168h`), or day/week units (`7d`, `3w`); `--no-expiry` creates a branch that never expires. One of `--ttl`, `--no-expiry`, or a spec expiration in `--json` is required. ([#6313](#6313)) * `databricks ssh connect` serverless sessions now provide Claude Code and Codex configured with Unity Gateway out of the box. ([#6885](#6885)) ### AI Runtime * Add `databricks air images push` (Preview) to configure Docker authentication and push container images to Databricks Artifact Registry. ([#6869](#6869)) * `air run` now grants the configured `permissions` on the MLflow experiment as well as the job. ([#6870](#6870)) ### Bundles * Add libraries field to clusters. ([#6831](#6831)) * Error out when a configured `workspace_id` does not match the connected workspace, instead of silently using it in resource URLs emitted by `bundle summary`. ([#6754](#6754)) * Fix spurious recreation of Lakebase (Postgres) branches, roles, and catalogs when the referenced project is updated in place: an in-place project change (e.g. `display_name`) no longer forces a delete + create of resources that reference the project's or branch's `name`. ([#6865](#6865)) * Direct engine now detects and applies an explicitly configured integer zero (e.g. `gcp_attributes.local_ssd_count: 0`) added to a resource first deployed without the field. ([#6867](#6867)) * Migrate existing Terraform deployment state to the direct engine before deploying (previously done after a Terraform deploy), so the deploy runs on the direct engine. ([#6749](#6749)) * The `postgres_snapshot_schedules` resource (introduced in [v1.16.0](https://github.com/databricks/cli/releases/tag/v1.16.0)) is now marked Beta and is no longer available in PyDABs, matching the other `postgres_*` resources; configure it in YAML instead. ([#6887](#6887))
denik
added a commit
that referenced
this pull request
Oct 1, 2026
Generalize the direct-engine zero-value change detection from #6867 so an explicitly configured false or 0.0 (e.g. gcp_attributes.use_preemptible_executors, azure_attributes.spot_bid_max_price) is applied the same way an explicit integer zero already is. Strings stay excluded on purpose, since backends routinely normalize "" to null and back. Renames isZeroInt to isZeroScalar (now covering ints, floats and bools) and adds bool/float cases to TestScalarZeroChange plus end-to-end acceptance tests mirroring local_ssd_count_update. Co-authored-by: Isaac <no-reply@databricks.com>
denik
added a commit
that referenced
this pull request
Oct 1, 2026
The integer entry from #6867 has shipped, so this change needs its own entry. Co-authored-by: Isaac <no-reply@databricks.com>
antonyprasad-db
pushed a commit
to antonyprasad-db/cli
that referenced
this pull request
Oct 1, 2026
…ger (databricks#6882) Generalizes the direct-engine zero-value change detection from databricks#6867 from integers to all numeric and boolean scalars. An explicitly configured `false` or `0.0` (e.g. `gcp_attributes.use_preemptible_executors: false`, `azure_attributes.spot_bid_max_price: 0`) added to a resource first deployed without the field is now detected and applied, exactly as an explicit integer zero already is. `isZeroInt` becomes `isZeroScalar` (ints, floats, bools). Strings are left out to stay in line with the `DropEmptyStrings` mutator, which drops an explicit `""` before the plan runs. Adds bool/float cases to `TestScalarZeroChange` (plus an empty-string no-op case) and two end-to-end acceptance tests (`use_preemptible_update`, `spot_bid_max_price_update`) mirroring `local_ssd_count_update`. This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
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.
Changes
The direct engine treated an integer
0as empty, so an explicitly configuredgcp_attributes.local_ssd_count: 0(or any integer zero) added to a resource first deployed without the field was classified as an empty no-op and never applied — subsequent deploys detected no change. A change is now skipped as empty only when it is not a genuine local change: an integer the config force-sent that differs from the prior state is applied, while a backend-echoed zero or an unchanged value stays a no-op.Related:
databricks_clusterresource - gcp_attributes.local_ssd_count = 0 not working terraform-provider-databricks#4089Tests
acceptance/bundle/resources/clusters/deploy/local_ssd_count_update: create without the field, addlocal_ssd_count: 0(detected and applied), then a no-op third deploy that converges.This pull request and its description were written by Isaac.