direct: Exclude deploy-only fields from Apps update mask#5042
Merged
simonfaltum merged 1 commit intomainfrom Apr 21, 2026
Merged
direct: Exclude deploy-only fields from Apps update mask#5042simonfaltum merged 1 commit intomainfrom
simonfaltum merged 1 commit intomainfrom
Conversation
The Apps Update API rejects update_mask values containing fields like lifecycle that are managed via the Deploy API. DoUpdate was collecting every changed path (including deploy-only ones), so when a deploy changed both description and lifecycle.started, the mask became "description,lifecycle" and the request failed with INVALID_PARAMETER_VALUE. Filter deployOnlyFields out of the collected paths before building the update mask. The hasAppChanges gate already applies the same filter to decide whether to call Update at all; this matches the mask to the same set of fields. Co-authored-by: Isaac
andrewnester
approved these changes
Apr 21, 2026
bernardo-rodriguez
pushed a commit
to bernardo-rodriguez/b-cli
that referenced
this pull request
Apr 22, 2026
## Summary - Add Lakebase destroy/recreate prompt (databricks#5052) and fail-on-active-runs deleted-resource fix (databricks#5044) to the Bundles section. - Note the `jobs list` / `jobs list-runs` `--page-size` rename that came with the repo-wide `--limit` flag from the SDK v0.127.0 bump. - Attribute the Apps update-mask change to databricks#5042 and databricks#5051 (the follow-up that made the mask a fixed allowlist). - Clean up inconsistencies: drop the empty `Notable Changes` and `API Changes` sections, normalize trailing periods, and tighten blank lines under section headers.
deco-sdk-tagging Bot
added a commit
that referenced
this pull request
Apr 22, 2026
## Release v0.298.0 ### CLI * Added `--limit` flag to all paginated list commands for client-side result capping ([#4984](#4984)). On `jobs list` and `jobs list-runs` the former API page-size flag was renamed to `--page-size` (hidden) to avoid collision. * Accept `yes` in addition to `y` for confirmation prompts, and show `[y/N]` to indicate that no is the default. * Cache `/.well-known/databricks-config` lookups under `~/.cache/databricks/<version>/host-metadata/` so repeat CLI invocations against the same host skip the ~700ms discovery round trip. * Deprecated `auth env`. The command is hidden from help listings and prints a deprecation warning to stderr; it will be removed in a future release. ### Bundles * Remove `experimental-jobs-as-code` template, superseded by `pydabs` ([#4999](#4999)). * Prompt before destroying or recreating Lakebase resources (database instances, synced database tables, postgres projects and branches) ([#5052](#5052)). * Treat deleted resources as not running in the `fail-on-active-runs` check ([#5044](#5044)). * engine/direct: Added support for Vector Search Endpoints ([#4887](#4887)). * engine/direct: Exclude deploy-only fields (e.g. `lifecycle`) from the Apps update mask so requests that change both `description` and `lifecycle.started` in the same deploy no longer fail with `INVALID_PARAMETER_VALUE` ([#5042](#5042), [#5051](#5051)). * engine/direct: Fix phantom diffs from `depends_on` reordering in job tasks ([#4990](#4990)). ### Dependency updates * Bump `github.com/databricks/databricks-sdk-go` from v0.126.0 to v0.128.0 ([#4984](#4984), [#5031](#5031)). * Bump Go toolchain to 1.25.9 ([#5004](#5004)).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When an Apps resource changes both
descriptionandlifecycle.startedin the same deploy, the direct engine produces anupdate_maskof"description,lifecycle". The Apps Update API rejects it:lifecycleis a deploy-only field managed by the CLI (via start/stop + the Deployments API), not by the App Update endpoint.This surfaced in the nightly run
lifecycle-started/DATABRICKS_BUNDLE_ENGINE=directacceptance test. Locally the mock server does not validate the update mask, so the bug slipped through.Changes
Before:
DoUpdatecollected everyUpdatepath in the plan entry, truncated each to its top-level field, and joined them into the mask. Deploy-only fields (source_code_path,config,git_source,lifecycle) leaked into the mask whenever they changed alongside a real App field.Now: filter
deployOnlyFieldsout of the collected paths before building the mask. ThehasAppChangesgate already applies the same filter to decide whether to call Update at all; this matches the mask to the same set of fields.Also updated
lifecycle-startedacceptance test to print//appsinstead of only//deploymentsfor the two steps that togglestartedand changedescriptiontogether, so theupdate_masknow appears in the recorded output. Without the fix the mask shows"description,lifecycle"; with the fix it shows"description"only.Test plan
go test ./bundle/direct/...passesgo test ./acceptance -run 'TestAccept/bundle/resources/apps/'passes (all engines)make checkspasseslifecycle-started/direct+ related tests pass on cloud