Skip to content

direct: fix apply_policy_default_values drift and for_each_task cluster gaps - #5731

Merged
denik merged 2 commits into
mainfrom
denik/job-clusters-apply_policy_default_values
Jun 30, 2026
Merged

direct: fix apply_policy_default_values drift and for_each_task cluster gaps#5731
denik merged 2 commits into
mainfrom
denik/job-clusters-apply_policy_default_values

Conversation

@denik

@denikdenik commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Changes

Follow-up to #5693 (which fixed standalone clusters): fix apply_policy_default_values drift for job cluster paths (#5179 (comment)).

The Jobs API accepts apply_policy_default_values but does not return it in GET responses. Add ignore_remote_changes with reason: not_returned_by_api for tasks[*].new_cluster, tasks[*].for_each_task.task.new_cluster, and job_clusters[*].new_cluster.

Also fill a pre-existing gap: for_each_task inner clusters were missing backend_defaults (enable_elastic_disk, enable_local_disk_encryption, node_type_id, driver_node_type_id, driver_instance_pool_id, data_security_mode) and ignore_remote_changes ({aws,azure,gcp}_attributes) that already existed for the other cluster paths.

Note, pipeline clusters do not have this issue for some reason.

Tests

New invariant no_drift configs for all four relevant paths. Testserver updated to clear apply_policy_default_values from GET responses, matching real API behavior.

@denik
deniktemporarily deployed to test-trigger-is June 25, 2026 19:42 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 25, 2026 19:42 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 2effe19

Run: 28378350685

Env❌​FAIL🟨​KNOWN🔄​flaky💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
🟨​aws linux711323210368:37
🟨​aws windows711323410346:05
💚​aws-ucws linux8133169549:53
💚​aws-ucws windows8133189526:13
💚​azure linux21523210357:23
💚​azure windows21523410333:22
🟨​azure-ucws linux111531695113:40
❌​azure-ucws windows1111153189497:41
💚​gcp linux21523110378:24
💚​gcp windows21523310353:58
23 interesting tests: 13 SKIP, 8 KNOWN, 1 FAIL, 1 flaky
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp windows
🟨​TestAccept🟨​K🟨​K💚​R💚​R💚​R💚​R💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/invariant/no_drift🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​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/replace_existing🙈​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/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_projects/update_display_name🙈​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/bundle/resources/vector_search_endpoints/drift/recreated_same_name🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/ssh/connection🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🟨​TestFetchRepositoryInfoAPI_FromRepo💚​R💚​R💚​R💚​R💚​R💚​R🟨​K🟨​K💚​R💚​R
❌​TestFetchRepositoryInfoAPI_FromRepo/root✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p✅​p
🔄​TestFetchRepositoryInfoAPI_FromRepo/subdir✅​p✅​p✅​p✅​p✅​p✅​p🔄​f✅​p✅​p
Top 3 slowest tests (at least 2 minutes):
durationenvtestname
2:34azure-ucws linuxTestFilerRecursiveDelete/dbfs
2:29gcp linuxTestFsCpDirToDirFileNotOverwritten/dbfs_to_dbfs
2:02azure linuxTestFsCpDir/dbfs_to_dbfs

@denikdenik changed the title direct: fix apply_policy_default_values drift for job/pipeline clustersdirect: fix apply_policy_default_values drift and for_each_task cluster gapsJun 26, 2026
Comment threadacceptance/bundle/invariant/continue_293/out.test.toml
denik added 2 commits June 29, 2026 16:09
The Jobs API accepts apply_policy_default_values in create/update
requests but does not return it in GET responses. The plan engine saw
old=true, new=true, remote=nil and incorrectly scheduled an update.
Fix: add ignore_remote_changes entries with reason not_returned_by_api
for apply_policy_default_values in tasks[*].new_cluster,
tasks[*].for_each_task.task.new_cluster, and job_clusters[*].new_cluster.
Also fill a pre-existing gap: for_each_task inner clusters were missing
backend_defaults entries for enable_elastic_disk, enable_local_disk_encryption,
node_type_id, driver_node_type_id, driver_instance_pool_id, and data_security_mode
(all present for tasks[*].new_cluster and job_clusters[*].new_cluster but not
for the for_each_task path), and ignore_remote_changes for {aws,azure,gcp}_attributes.
Add invariant no_drift test configs for all four affected paths:
- tasks[*].new_cluster.apply_policy_default_values
- tasks[*].for_each_task.task.new_cluster.apply_policy_default_values
- job_clusters[*].new_cluster.apply_policy_default_values
- pipelines.clusters[*].apply_policy_default_values
Update testserver to clear apply_policy_default_values from GET responses,
matching real API behaviour.
Co-authored-by: Isaac
@denik
denikforce-pushed the denik/job-clusters-apply_policy_default_values branch from cf95dd8 to 2effe19CompareJune 29, 2026 14:10
@denik
deniktemporarily deployed to test-trigger-is June 29, 2026 14:11 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 29, 2026 14:11 — with GitHub Actions Inactive
@denik
denik merged commit 4337a2f into mainJun 30, 2026
24 of 25 checks passed
@denik
denik deleted the denik/job-clusters-apply_policy_default_values branch June 30, 2026 08:48
deco-sdk-taggingBot added a commit that referenced this pull request Jul 2, 2026
## Release v1.6.0
### CLI
* `ssh connect` now accepts a `--base-environment` flag to run a serverless session on a custom base environment. It takes an `env.yaml` path, a `workspace-base-environments/...` resource ID, or a base environment display name, and is rejected together with `--environment-version` or `--cluster` ([#5706](#5706)).
* `databricks aitools install` is now plugin-first: it installs the Databricks plugin through each agent's own CLI (Claude Code, Codex, GitHub Copilot) instead of copying raw skill files. Agents without a plugin (OpenCode, Antigravity) still get skill files, and Cursor prints the `/add-plugin databricks` step. Use `--skills-only` to force raw skill files for every agent, or `--path <dir>` to write skills to a directory ([#5738](#5738)).
* `databricks labs list` now only shows projects that can be installed ([#5560](#5560)).
### Bundles
* direct: Fixed persistent drift on `model_serving_endpoints` caused by the `traffic_config` field ([#5708](#5708)).
* direct: Fix spurious update when `apply_policy_default_values: true` is set on job task, for-each-task, or job cluster new_cluster ([#5731](#5731)). Also fix spurious updates for for-each-task clusters due to missing backend defaults for `data_security_mode`, `node_type_id`, `driver_node_type_id`, `driver_instance_pool_id`, `enable_elastic_disk`, and `enable_local_disk_encryption`.
* direct: Cluster resize now falls back to regular update if resize fails due to `INVALID_STATE` ([#5716](#5716)).
* `bundle generate dashboard` now honors the `--key` flag when naming the generated resource, and rejects combining `--existing-path`, `--existing-id`, and `--resource` instead of silently ignoring all but one ([#5492](#5492)).
* Fixed `bundle deployment migrate` failing on `model_serving_endpoints`/`database_instances` with permissions (regression since v1.5.0) ([#5775](#5775)).
* After a terraform deploy, the CLI now dry-runs a migration to the direct engine (writing nothing locally or remotely) and reports the outcome via telemetry, warning if the migration could not be completed ([#5797](#5797)).
### Dependency updates
* Bump `github.com/databricks/databricks-sdk-go` from v0.147.0 to v0.152.0 ([#5773](#5773)).
* Bump Terraform provider from v1.118.0 to v1.120.0 ([#5792](#5792)).
Sign up for freeto 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.

3 participants

@denik@eng-dev-ecosystem-bot@pietern