Skip to content

Replace server_side_default with backend_default#4490

Merged
denik merged 21 commits intomainfrom
denik/backend_defaults
Feb 18, 2026
Merged

Replace server_side_default with backend_default#4490
denik merged 21 commits intomainfrom
denik/backend_defaults

Conversation

@denik
Copy link
Contributor

@denik denik commented Feb 11, 2026

Changes

  • Add new backend_default setting in resources.yml that allows configuring known server defaults for given field patterns.
  • Port config for backend_default and ignore_remote_changes from terraform.

Why

The "server_side_default" assumes that any setting appearing in the remote state that is not in the config should be ignored. This works when resources are only updated via DABs "bundle deploy" but it can miss real drift.

Tests

Existing tests.

@denik denik temporarily deployed to test-trigger-is February 11, 2026 11:07 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Feb 11, 2026

Commit: aa91788

Run: 22140635452

Env 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 7 268 763 6:48
🟨​ aws windows 7 1 7 270 761 5:54
💚​ aws-ucws linux 8 7 364 679 6:59
💚​ aws-ucws windows 8 7 366 677 5:27
💚​ azure linux 2 9 271 761 5:53
💚​ azure windows 2 9 273 759 4:31
💚​ azure-ucws linux 2 9 369 675 7:29
💚​ azure-ucws windows 2 9 371 673 5:41
💚​ gcp linux 2 9 267 764 5:24
💚​ gcp windows 2 9 269 762 4:59
15 interesting tests: 7 KNOWN, 7 SKIP, 1 RECOVERED
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/ssh/connection 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 20 slowest tests (at least 2 minutes):
duration env testname
3:46 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:13 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:12 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:06 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:00 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:49 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:46 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:43 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:42 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:41 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:41 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:39 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:17 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:13 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:11 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:11 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:11 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:10 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:08 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:05 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

@denik denik force-pushed the denik/patterns-resource-config branch from 70c35f1 to 2fb9d43 Compare February 11, 2026 12:03
Base automatically changed from denik/patterns-resource-config to main February 11, 2026 12:33
@denik denik force-pushed the denik/backend_defaults branch from 88e8d44 to 4aaf27c Compare February 11, 2026 12:54
@denik denik temporarily deployed to test-trigger-is February 11, 2026 12:55 — with GitHub Actions Inactive
@denik denik force-pushed the denik/backend_defaults branch from 4aaf27c to 3dc1550 Compare February 11, 2026 12:55
@denik denik temporarily deployed to test-trigger-is February 11, 2026 12:56 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 11, 2026 12:57 — with GitHub Actions Inactive
@denik denik changed the base branch from main to denik/empty February 11, 2026 12:59
@denik denik temporarily deployed to test-trigger-is February 11, 2026 13:01 — with GitHub Actions Inactive
denik added a commit that referenced this pull request Feb 11, 2026
…#4491)

## Changes
New "empty" reason in plan triggers when old/new & remote values are all
either nil or zero or empty slice/map.

## Why
Ignoring differences like nil vs "" and nil vs 0 reduces drift when
backend has preferred representation. For example,
model_serving_endpoints.description is converted from nil to "" by
backend. jobs.timeout_seconds has a default 0.

This supports removing server_side_default rule which currently marks
this changes as "skip". #4490

## Tests
Existing tests.
Base automatically changed from denik/empty to main February 11, 2026 15:12
@denik denik force-pushed the denik/backend_defaults branch from e2ec42e to 7626cbd Compare February 11, 2026 15:13
@denik denik temporarily deployed to test-trigger-is February 11, 2026 15:14 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 11, 2026 15:30 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 11, 2026 17:10 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 11, 2026 17:18 — with GitHub Actions Inactive
@denik denik force-pushed the denik/backend_defaults branch from 8795ceb to 614ee77 Compare February 12, 2026 10:47
@denik denik temporarily deployed to test-trigger-is February 12, 2026 10:47 — with GitHub Actions Inactive
@denik denik force-pushed the denik/backend_defaults branch from 614ee77 to c31e636 Compare February 12, 2026 11:07
@denik denik temporarily deployed to test-trigger-is February 12, 2026 11:08 — with GitHub Actions Inactive
@denik denik force-pushed the denik/backend_defaults branch from c31e636 to 2d50de6 Compare February 18, 2026 11:08
@denik denik temporarily deployed to test-trigger-is February 18, 2026 11:09 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 18, 2026 11:20 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is February 18, 2026 11:30 — with GitHub Actions Inactive
@denik denik marked this pull request as ready for review February 18, 2026 11:31
@denik denik requested a review from andrewnester as a code owner February 18, 2026 11:31
denik and others added 16 commits February 18, 2026 13:21
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…efaults

The generic catch-all rule that marked all remote-only fields as
server_side_default is replaced with explicit backend_defaults entries
for each resource type. This makes field handling explicit and auditable.

New backend_defaults entries:
- jobs: timeout_seconds, tasks[*].timeout_seconds, tasks[*].notebook_task.source,
  tasks[*].new_cluster.data_security_mode, job_clusters[*].new_cluster.data_security_mode
- pipelines: storage, root_path
- model_serving_endpoints: route_optimized
- registered_models: storage_location, owner, full_name, metastore_id
  (plus ignore_remote_changes for created_at/by, updated_at/by)
- volumes: storage_location

Also removes the server_side_default special case in configsync/diff.go
(per existing TODO) and the ReasonServerSideDefault constant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…aults

Cross-referenced terraform-provider-databricks source (SetComputed,
SetSuppressDiff, SetForceNew) against resources.yml to fix gaps.

Added backend_defaults (SetComputed/SetSuppressDiff — backend-set fields):
- clusters: enable_local_disk_encryption, node_type_id, driver_node_type_id,
  driver_instance_pool_id
- jobs: run_as, spark_python_task.source, sql_task.file.source,
  dbt_task.source (+ for_each_task variants for all), new_cluster computed
  fields matching clusters
- pipelines: event_log.catalog, event_log.schema, cluster computed fields
- sql_warehouses: enable_serverless_compute
- experiments: artifact_location

Added ignore_remote_changes:
- sql_warehouses: min_num_clusters (SetSuppressDiff)
- quality_monitors: skip_builtin_dashboard (not returned by API)

Added recreate_on_changes:
- pipelines: gateway_definition.{connection_id,connection_name,
  gateway_storage_catalog,gateway_storage_schema},
  ingestion_definition.ingest_from_uc_foreign_catalog

Removed dead backend_defaults — these are TF client-side SetDefault()
values already applied by resource_mutator.go, so the field is never nil
and backend_defaults (which triggers on old=nil AND new=nil) never fires:
- jobs: max_concurrent_runs, schedule/trigger/continuous.pause_status
- pipelines: edition, channel
- dashboards: embed_credentials (also had wrong value: yml said true,
  mutator sets false)
- clusters: autotermination_minutes
- sql_warehouses: auto_stop_mins, enable_photon, max_num_clusters,
  spot_instance_policy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@denik denik force-pushed the denik/backend_defaults branch from 4611e58 to dfe0736 Compare February 18, 2026 12:42
@denik denik temporarily deployed to test-trigger-is February 18, 2026 12:42 — with GitHub Actions Inactive
# skip_builtin_dashboard is input-only, not returned by the Get API.
# TF preserves it from state; see resource_quality_monitor.go.
- field: skip_builtin_dashboard
reason: not_returned_by_api
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not ignore_remote_changes with reason: input_only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, not sure why have not_returned_by_api at all. Replaced.

~ edition: null -> "ADVANCED"
~ libraries: [{"glob":{"include":"/Workspace/Users/[USERNAME]/lakeflow_pipeline/transformations/**"}},{"glob":{"include":"/Workspace/Users/foo@databricks.com/another/**"}}] -> [{"notebook":{"path":"/Workspace/Users/[USERNAME]/.bundle/test-pipeline-recreate/default/files/nb"}}]
~ name: "lakeflow-pipeline" -> "test-pipeline"
~ root_path: "/Workspace/Users/[USERNAME]/lakeflow_pipeline" -> null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened here?

Copy link
Contributor Author

@denik denik Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is real change in this test (it was set on remote but not in the config), but it was NOT noticed before because server_side_default applied.

@denik denik temporarily deployed to test-trigger-is February 18, 2026 12:56 — with GitHub Actions Inactive
@denik denik enabled auto-merge February 18, 2026 13:00
@denik denik added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit 1813c28 Feb 18, 2026
18 checks passed
@denik denik deleted the denik/backend_defaults branch February 18, 2026 13:38
deco-sdk-tagging bot added a commit that referenced this pull request Feb 19, 2026
## Release v0.289.0

### CLI
* Make auth profiles respect DATABRICKS_CLI_PATH env var (([#4467](#4467)))
* Fix arrow key navigation in prompts on Windows (([#4501](#4501)))

### Bundles
* Log artifact build output in debug mode ([#4208](#4208))
* Fix bundle init not working in Azure Government ([#4286](#4286))
* Allow single and double quotes in environment dependencies (([#4511](#4511)))
* Use purge option when deleting alerts (([#4505](#4505)))
* engine/direct: Replace server_side_default with more precise backend_default rule in bundle plan ([#4490](#4490))
* engine/direct: Extend pipelines recreate_on_changes configuration (([#4499](#4499)))
* engine/direct: Added support for UC external locations (direct only) ([#4484](#4484))

### Dependency updates
* Upgrade Go SDK to v0.106.0 (([#4486](#4486)))
* Upgrade Terraform provider to v1.106.0 (([#4542](#4542)))
* Upgrade Go to 1.25.7 (([#4547](#4547)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments