Skip to content

apps: stop planning an update on every deploy - #6328

Merged
shreyas-goenka merged 4 commits into
mainfrom
fix-apps-forward-token-drift
Aug 20, 2026
Merged

apps: stop planning an update on every deploy#6328
shreyas-goenka merged 4 commits into
mainfrom
fix-apps-forward-token-drift

Conversation

@shreyas-goenka

@shreyas-goenkashreyas-goenka commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Changes

The direct engine planned an Apps update on every deploy, so each bundle deploy issued a no-op Apps.CreateUpdate call. Every plan looked like this, with a remote value and no local one:

"forward_user_access_token": { "action": "update", "remote": true }

forward_user_access_token became part of apps.App in databricks-sdk-go v0.171.0 (#6320) and was added to the app update mask, but nothing classified it. The backend enables token forwarding and reports it as true even when the bundle omits the field, so the remote true read as drift, hasAppChanges returned true, and the update fired.

Declared under backend_defaults, exactly like compute_size: the remote value is skipped when the config omits the field, while an explicit value in the config still diffs normally (so real drift is still caught).

The backend enables user access token forwarding and reports
forward_user_access_token as true even when the bundle omits it. The field
became part of apps.App in databricks-sdk-go v0.171.0 and was added to the app
update mask, but nothing classified it, so the direct engine read the remote
true as drift: every plan reported "action": "update" with a remote value and no
local one, and every deploy issued a no-op Apps update call.
Declare it under backend_defaults, matching compute_size: the remote value is
skipped when the config omits the field, while an explicit value in the config
still diffs normally.
The fake workspace did not model this default, which is why the regression
reached the nightly integration tests instead of failing here. It now reports
the field the way the platform does, which reproduces the spurious update
without the fix.
Co-authored-by: Isaac
Co-authored-by: Isaac
@denik

Copy link
Copy Markdown
Contributor

This should have been caught by no_drift test on cloud. If it did not, could you take a look why not?

@shreyas-goenka
shreyas-goenka marked this pull request as ready for review August 20, 2026 08:14
The fake workspace now reports the field, so the two goldens that dump raw app state (bundle generate and the apps command output) include it.
Co-authored-by: Isaac
@@ -0,0 +1 @@
Fixed apps planning an update on every deploy. The backend enables `forward_user_access_token` and reports it as `true` even when the bundle omits it, which the direct engine read as drift and turned into a no-op update call on each deploy ([#6328](https://github.com/databricks/cli/pull/6328)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we don't need this changelog entry since the previous release wasn't affected (didn't have this SDK field)

The regression it described has not shipped in a release, so there is nothing user-visible to announce.
Co-authored-by: Isaac
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 5e44f76

Run: 32350951460

Env💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
💚​aws linux1427411625:55
💚​aws windows1427611603:22
💚​azure linux1427311626:46
💚​azure windows1427511604:36
💚​gcp linux1427411626:14
💚​gcp windows1427611605:03
Test Nameaws linuxaws windowsazure linuxazure windowsgcp linuxgcp windows
💚​TestAccept💚​R💚​R💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/invariant/no_drift🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/ssh/connection🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
Top 6 slowest tests (at least 2 minutes):
durationenvtestname
4:54gcp windowsTestAccept
4:29azure windowsTestAccept
3:52gcp linuxTestAccept
3:52aws linuxTestAccept
3:46azure linuxTestAccept
3:11aws windowsTestAccept

@shreyas-goenka
shreyas-goenka added this pull request to the merge queueAug 20, 2026
Merged via the queue into main with commit e5662e7Aug 20, 2026
25 checks passed
@shreyas-goenka
shreyas-goenka deleted the fix-apps-forward-token-drift branch August 20, 2026 10:17
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: e5662e7

Run: 32358240449

Env❌​FAIL🔄​flaky💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
🔄​aws linux7321159965231:23
❌​aws windows13221102984209:14
🔄​azure linux31210591002131:56
💚​azure windows329991021137:07
💚​gcp linux3210501006144:06
🔄​gcp windows3229871025169:36
18 interesting tests: 14 flaky, 2 SKIP, 1 RECOVERED, 1 FAIL
Test Nameaws linuxaws windowsazure linuxazure windowsgcp linuxgcp windows
🔄​TestAccept💚​R🔄​f🔄​f💚​R💚​R🔄​f
🔄​TestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1🔄​f✅​p✅​p✅​p✅​p✅​p
🔄​TestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=🔄​f✅​p✅​p✅​p✅​p✅​p
🔄​TestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1🔄​f✅​p✅​p✅​p✅​p✅​p
💚​TestAccept/bundle/invariant/no_drift💚​R💚​R💚​R💚​R💚​R💚​R
🔄​TestAccept/bundle/resources/apps/lifecycle-started✅​p✅​p✅​p✅​p✅​p🔄​f
🔄​TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct✅​p✅​p✅​p✅​p✅​p🔄​f
🔄​TestAccept/bundle/resources/clusters/lifecycle-started🔄​f✅​p✅​p✅​p✅​p✅​p
🔄​TestAccept/bundle/resources/clusters/lifecycle-started-toggle🔄​f✅​p✅​p✅​p✅​p✅​p
🔄​TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct🔄​f✅​p✅​p✅​p✅​p✅​p
🔄​TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct🔄​f✅​p✅​p✅​p✅​p✅​p
🔄​TestAccept/bundle/resources/grants/schemas/remove_all✅​p🔄​f✅​p✅​p✅​p✅​p
🔄​TestAccept/bundle/resources/grants/schemas/remove_all/DATABRICKS_BUNDLE_ENGINE=terraform✅​p🔄​f✅​p✅​p✅​p✅​p
🔄​TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name💚​R💚​R🔄​f💚​R💚​R💚​R
🔄​TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name/DATABRICKS_BUNDLE_ENGINE=direct✅​p✅​p🔄​f✅​p✅​p✅​p
🙈​TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/ssh/connection🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
❌​TestSetupLocalServerlessProvision✅​p❌​F✅​p✅​p✅​p✅​p
Top 50 slowest tests (at least 2 minutes):
durationenvtestname
27:53aws windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
23:39aws windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
18:02aws windowsTestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
18:01aws windowsTestAccept/bundle/resources/clusters/deploy/data_security_mode/DATABRICKS_BUNDLE_ENGINE=direct
16:05aws linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
15:34aws linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
14:48aws windowsTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
14:34aws linuxTestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
14:04aws windowsTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
14:02aws linuxTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
13:28gcp windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
13:18gcp linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
12:38aws windowsTestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
11:15aws windowsTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
10:36aws linuxTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
10:23aws windowsTestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
10:15aws linuxTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
9:45aws linuxTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
9:41aws windowsTestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
9:24gcp windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
9:04aws windowsTestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
8:53gcp linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:50aws windowsTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
8:44aws windowsTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
8:36aws windowsTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
8:30aws linuxTestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
8:15aws windowsTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
8:13aws linuxTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
8:11aws linuxTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
8:11gcp windowsTestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
8:07aws linuxTestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
7:54aws linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:52aws windowsTestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
7:50aws windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:46aws windowsTestAccept/bundle/resources/clusters/deploy/simple/DATABRICKS_BUNDLE_ENGINE=direct
7:45azure windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:45azure windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:41aws linuxTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
7:39azure linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:39aws linuxTestAccept/bundle/resources/clusters/deploy/data_security_mode/DATABRICKS_BUNDLE_ENGINE=direct
7:38aws linuxTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
7:30gcp linuxTestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
7:29aws linuxTestAccept/bundle/resources/clusters/resize-terminated-fallback/DATABRICKS_BUNDLE_ENGINE=direct
7:24aws linuxTestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
7:24gcp linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
7:21aws windowsTestAccept/bundle/resources/clusters/resize-terminated-fallback/DATABRICKS_BUNDLE_ENGINE=direct
7:15aws linuxTestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
7:09aws linuxTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
7:04aws windowsTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
6:59azure linuxTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=

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.

5 participants

@shreyas-goenka@denik@eng-dev-ecosystem-bot@janniklasrose@andrewnester