Skip to content

fix(bundle/direct): construct UpdateApp update_mask dynamically based on changed fields (#6400) - #6424

Open
Shushankranjan wants to merge 1 commit into
databricks:mainfrom
Shushankranjan:fix-app-update-mask
Open

fix(bundle/direct): construct UpdateApp update_mask dynamically based on changed fields (#6400)#6424
Shushankranjan wants to merge 1 commit into
databricks:mainfrom
Shushankranjan:fix-app-update-mask

Conversation

@Shushankranjan

@Shushankranjan Shushankranjan commented Aug 28, 2026

Copy link
Copy Markdown

Changes

  • Dynamically construct update_mask in ResourceApp.DoUpdate using collectUpdatePathsWithPrefix(entry.Changes, "").
  • Filter out non-API / deploy-only fields (source_code_path, config, git_source, lifecycle, lifecycle.*) from update_mask.
  • Removed the static, hardcoded updateMask variable string in bundle/direct/dresources/app.go.
  • Updated the acceptance test request recording acceptance/bundle/resources/apps/update/out.requests.direct.json.
  • Added a changelog fragment in .nextchanges/bundles/app_update_mask.md.

Why

Previously, ResourceApp.DoUpdate sent a fixed update_mask string containing all updatable apps.App fields (including compute_size, compute_min_instances, compute_max_instances, etc.) on every UpdateApp call regardless of what was specified in the bundle config. Because apps.App fields use omitempty, omitted fields were dropped from the request body while still being specified in update_mask. Building the update_mask dynamically ensures it strictly matches the fields modified in entry.Changes.

Tests

  • Updated acceptance/bundle/resources/apps/update/out.requests.direct.json fixture to verify that updating only description yields "update_mask": "description".
  • Verified TestAppDoUpdate_UpdateMaskHasAllFields in bundle/direct/dresources/app_test.go.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

Files: acceptance/bundle/resources/apps/update/out.requests.direct.json
Suggested: @denik
Also eligible: @andrewnester, @shreyas-goenka, @janniklasrose, @pietern, @anton-107, @lennartkats-db

/bundle/ - needs approval

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

General files (require maintainer)

Files: .nextchanges/bundles/app_update_mask.md
Based on git history:

  • @denik -- recent work in .nextchanges/bundles/, bundle/direct/dresources/, acceptance/bundle/resources/apps/update/

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

@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 6424
  • Commit SHA: 59c46b44d40072ddb3ec0db425f25aba7336f516

Checks will be approved automatically on success.

@Shushankranjan Shushankranjan changed the title fix(bundle/direct): construct UpdateApp update_mask dynamically based… fix(bundle/direct): construct UpdateApp update_mask dynamically based on changed fields (#6400) Aug 28, 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.

1 participant