Skip to content

direct: fix apply_policy_default_values drift and for_each_task cluster gaps#5731

Open
denik wants to merge 1 commit into
mainfrom
denik/job-clusters-apply_policy_default_values
Open

direct: fix apply_policy_default_values drift and for_each_task cluster gaps#5731
denik wants to merge 1 commit 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/pipeline 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.

Tests

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

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 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
@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

8 files changed
Suggested: @pietern
Also eligible: @janniklasrose, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

/bundle/ - needs approval

Files: bundle/direct/dresources/resources.yml
Suggested: @pietern
Also eligible: @janniklasrose, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

General files (require maintainer)

Files: libs/testserver/jobs.go
Based on git history:

  • @pietern -- recent work in bundle/direct/dresources/, acceptance/bundle/invariant/configs/, libs/testserver/

Any maintainer (@andrewnester, @anton-107, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 91559ea

Run: 28195957097

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 13 240 1031 6:04
🟨​ aws windows 7 1 13 242 1029 10:34
💚​ aws-ucws linux 8 13 327 948 5:14
💚​ aws-ucws windows 8 13 329 946 6:08
💚​ azure linux 2 15 240 1030 4:26
🔄​ azure windows 2 2 15 240 1028 7:22
💚​ azure-ucws linux 2 15 329 945 5:02
💚​ azure-ucws windows 2 15 331 943 4:40
💚​ gcp linux 2 15 239 1032 4:07
💚​ gcp windows 2 15 241 1030 5:14
23 interesting tests: 13 SKIP, 7 KNOWN, 2 flaky, 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/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 💚​R 💚​R 💚​R 💚​R
🔄​ TestFetchRepositoryInfoAPI_FromRepo/root ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🔄​ TestFetchRepositoryInfoAPI_FromRepo/subdir ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
Top 4 slowest tests (at least 2 minutes):
duration env testname
3:48 gcp windows TestAccept
3:24 aws-ucws windows TestAccept
3:19 azure windows TestAccept
2:56 azure-ucws windows TestAccept

@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
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.

2 participants