Skip to content

Mask a Lakebase oneof member under its group name - #6443

Open
denik wants to merge 3 commits into
denik/update-mask-indexfrom
denik/update-mask-oneof
Open

Mask a Lakebase oneof member under its group name#6443
denik wants to merge 3 commits into
denik/update-mask-indexfrom
denik/update-mask-oneof

Conversation

@denik

@denik denik commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Stacked on #6441 (which is stacked on #6440) — review those first.

Four changes a bundle can express could not be deployed at all:

resource field
postgres_branches expire_time, ttl
postgres_endpoints suspend_timeout_duration
postgres_projects default_endpoint_settings.suspend_timeout_duration

expire_time / ttl / no_expiry are one oneof and suspend_timeout_duration / no_suspension another, and the API accepts them in update_mask only under the group name — masking the field itself is answered with Unknown field path in update_mask. All four now apply and their tests drop Badness.

The group names are in neither the OpenAPI spec nor the SDK doc comments, so each map is hand-written from what the backend accepts, probed on 2026-08-31. Two members of one group collapse onto a single mask entry.

remove_suspend_timeout still fails, and the mask is no longer why: the API requires a masked field to be populated in the body, so a removal has nothing to send. An absent value and an explicit null are both rejected; the supported way to express it is no_suspension: true. That test keeps a Badness saying so.

This pull request and its description were written by Isaac.

@denik
denik force-pushed the denik/update-mask-index branch from f9b090d to bcab355 Compare August 31, 2026 14:58
@denik
denik force-pushed the denik/update-mask-oneof branch from 0958e64 to 42c2ef7 Compare August 31, 2026 15:00
@@ -0,0 +1,3 @@
Fixed deploying a change to a Lakebase field that belongs to a oneof:
`postgres_branches.expire_time` and `.ttl`, `postgres_endpoints.suspend_timeout_duration`,
and `postgres_projects.default_endpoint_settings.suspend_timeout_duration` ([#6443](https://github.com/databricks/cli/pull/6443)).

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.

Should be unwrapped.

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.

And this also enables updating the no_suspend right?

@denik
denik force-pushed the denik/update-mask-index branch from bcab355 to e4fba84 Compare September 1, 2026 09:39
@denik
denik force-pushed the denik/update-mask-oneof branch from 42c2ef7 to 192e171 Compare September 1, 2026 09:40
@denik
denik force-pushed the denik/update-mask-index branch from e4fba84 to ebac25f Compare September 1, 2026 09:50
expire_time / ttl / no_expiry are one oneof, suspend_timeout_duration / no_suspension
another, and the API accepts them in update_mask only under the group name -- masking
the field itself is answered with "Unknown field path in update_mask". So four changes
a bundle can express could not be deployed at all: branch expire_time and ttl, endpoint
suspend_timeout_duration, and the project's default_endpoint_settings equivalent. All
four now apply, and their tests drop Badness.

The group names are not in the OpenAPI spec or in the SDK doc comments, so each map is
hand-written from what the backend accepts, probed on 2026-08-31.

Removing suspend_timeout_duration still fails, and the mask is no longer why: the API
requires a masked field to be populated in the body, so a removal has nothing to send.
That test keeps a Badness saying so.

Co-authored-by: Isaac
Co-authored-by: Isaac
@denik
denik force-pushed the denik/update-mask-oneof branch from 192e171 to c0bd098 Compare September 1, 2026 09:52
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