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

@denik denik 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 denik temporarily deployed to test-trigger-is June 25, 2026 19:42 — with GitHub Actions Inactive
@denik denik temporarily 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 🙈​skip Time
🟨​ aws linux 7 1 13 232 1036 8:37
🟨​ aws windows 7 1 13 234 1034 6:05
💚​ aws-ucws linux 8 13 316 954 9:53
💚​ aws-ucws windows 8 13 318 952 6:13
💚​ azure linux 2 15 232 1035 7:23
💚​ azure windows 2 15 234 1033 3:22
🟨​ azure-ucws linux 1 1 15 316 951 13:40
❌​ azure-ucws windows 1 1 1 1 15 318 949 7:41
💚​ gcp linux 2 15 231 1037 8:24
💚​ gcp windows 2 15 233 1035 3:58
23 interesting tests: 13 SKIP, 8 KNOWN, 1 FAIL, 1 flaky
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/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):
duration env testname
2:34 azure-ucws linux TestFilerRecursiveDelete/dbfs
2:29 gcp linux TestFsCpDirToDirFileNotOverwritten/dbfs_to_dbfs
2:02 azure linux TestFsCpDir/dbfs_to_dbfs

@denik denik changed the title direct: fix apply_policy_default_values drift for job/pipeline clusters direct: fix apply_policy_default_values drift and for_each_task cluster gaps Jun 26, 2026
Comment thread acceptance/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 denik force-pushed the denik/job-clusters-apply_policy_default_values branch from cf95dd8 to 2effe19 Compare June 29, 2026 14:10
@denik denik temporarily deployed to test-trigger-is June 29, 2026 14:11 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 29, 2026 14:11 — with GitHub Actions Inactive
@denik denik merged commit 4337a2f into main Jun 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-tagging Bot 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 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.

3 participants