Skip to content

Do not skip explicitly configured integer zero in config - #6867

Merged
denik merged 7 commits into
mainfrom
denik/local-ssd-count
Sep 29, 2026
Merged

denik merged 7 commits into
mainfrom
denik/local-ssd-count

Conversation

@denik

@denik denik commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Changes

The direct engine treated an integer 0 as empty, so an explicitly configured gcp_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:

Tests

  • New acceptance test acceptance/bundle/resources/clusters/deploy/local_ssd_count_update: create without the field, add local_ssd_count: 0 (detected and applied), then a no-op third deploy that converges.

This pull request and its description were written by Isaac.

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>
@github-actions github-actions Bot added the DABs DABs related issues label Sep 28, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: b52fe6d

Run: 36552983472

Env ✅​pass 🙈​skip Time
✅​ aws linux 276 16 5:20
✅​ aws windows 278 14 4:56
✅​ azure linux 275 16 5:38
✅​ azure windows 277 14 3:40
✅​ gcp linux 276 16 5:36
✅​ gcp windows 278 14 3:28
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:53 aws windows TestAccept
4:02 gcp linux TestAccept
3:57 aws linux TestAccept
3:57 azure linux TestAccept
3:38 azure windows TestAccept
3:26 gcp windows TestAccept

denik and others added 5 commits September 28, 2026 21:47
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
denik marked this pull request as ready for review September 29, 2026 10:10
@denik
denik requested review from a team as code owners September 29, 2026 10:10
@denik denik changed the title Apply an explicitly configured integer zero in direct engine plans Do not skip explicitly configured integer zero in config Sep 29, 2026
@denik
denik enabled auto-merge September 29, 2026 10:12
Comment thread bundle/direct/bundle_plan.go
@denik
denik added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit d8f7708 Sep 29, 2026
31 checks passed
@denik
denik deleted the denik/local-ssd-count branch September 29, 2026 10:44
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants