Skip to content

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

Merged
denik merged 4 commits into
mainfrom
denik/update-mask-oneof
Sep 1, 2026
Merged

denik merged 4 commits into
mainfrom
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
@denik
denik force-pushed the denik/update-mask-oneof branch from 192e171 to c0bd098 Compare September 1, 2026 09:52
@denik
denik force-pushed the denik/update-mask-index branch from ebac25f to dedcaa0 Compare September 1, 2026 10:34
@denik
denik force-pushed the denik/update-mask-oneof branch from c0bd098 to 4bd0399 Compare September 1, 2026 10:35
Base automatically changed from denik/update-mask-index to main September 1, 2026 11:12
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 4bd0399 to d254cd6 Compare September 1, 2026 11:14
The deploy output and the post-deploy read were split per engine only because direct
used to fail where terraform succeeded. Now that both apply the change they are byte
identical, so they go back inline in output.txt: 16 files gone.

out.requests stays split -- the mask each engine sends is what these tests are about --
and so does out.plan, which the two engines render differently. remove_suspend_timeout
keeps its deploy and drift files too: direct is rejected, terraform is accepted and then
ignored.

Also drops four titles claiming "only terraform applies it", and rewrites
remove_suspend_timeout's comment, which still blamed the oneof masking this PR fixes
rather than the real reason -- the API requires a masked field to be populated.

Co-authored-by: Isaac
@denik
denik added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 09b316d Sep 1, 2026
27 checks passed
@denik
denik deleted the denik/update-mask-oneof branch September 1, 2026 14:03
denik added a commit that referenced this pull request Sep 1, 2026
#6443 masks a Lakebase oneof member under its group name, and #6089 adds ./task doctest. The first
lands on rows this catalog was already recording as errors: nine of them, across postgres_projects,
postgres_branches and postgres_endpoints, become OK or SUPPRESSED.

Which is the point of the exercise -- those rows named the bug in the API's own words
("Unknown field path in update_mask") and now name its absence.

Co-authored-by: Isaac
deco-sdk-tagging Bot added a commit that referenced this pull request Sep 3, 2026
## Release v1.15.0

### CLI

 * When `uv python install` fails, `databricks environments setup-local` now falls back to a compatible Python interpreter already installed on the machine. ([#6457](#6457))
 * Allow `databricks environments setup-local` to update `pyproject.toml` files containing TOML multi-line strings. ([#6445](#6445))

### Bundles

 * Before committing the automatic terraform→direct migration, run a deployment plan against the converted state; if the plan fails the migration is abandoned. ([#6486](#6486))
 * The `dbt-sql` bundle template now uses Databricks Runtime 16.4 LTS (up from 15.4 LTS) for classic (non-serverless) compute. ([#6418](#6418))
 * Fixed the direct engine silently ignoring edits to duration and timestamp fields, such as a Lakebase endpoint's `suspend_timeout_duration`. Such a change planned `0 to change` and was never applied. ([#6377](#6377))
 * Fixed `$${...}` not escaping a literal `${...}` on the direct engine, which failed with an `invalid dependency` error. ([#6484](#6484), [#6489](#6489))
 * direct: Fix deploying an update to `postgres_projects.default_endpoint_settings`. ([#6440](#6440))
 * direct: Fix deploying an update to `postgres_endpoints.settings.pg_settings`. ([#6441](#6441))
 * direct: Fix deploying an update to `expire_time`, `ttl` or `suspend_timeout_duration` on Lakebase resources. ([#6443](#6443))
 * Added PyDABs (Python) support for catalogs: `Resources.add_catalog` and the `catalog_mutator` decorator. ([#6408](#6408))
 * Bundle templates now use serverless [environment version 5](https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/five), which offers better performance, and `databricks-connect` 16.4. ([#6378](#6378))
 * Fixed a job with a `table_update` trigger never converging on the direct engine. ([#6442](#6442))

### Dependency Updates

 * Bump Go toolchain to 1.26.8. ([#6476](#6476))
deco-sdk-tagging Bot added a commit that referenced this pull request Sep 3, 2026
## Release v1.15.0

### CLI

 * When `uv python install` fails, `databricks environments setup-local` now falls back to a compatible Python interpreter already installed on the machine. ([#6457](#6457))
 * Allow `databricks environments setup-local` to update `pyproject.toml` files containing TOML multi-line strings. ([#6445](#6445))

### Bundles

 * Before committing the automatic terraform→direct migration, run a deployment plan against the converted state; if the plan fails the migration is abandoned. ([#6486](#6486))
 * The `dbt-sql` bundle template now uses Databricks Runtime 16.4 LTS (up from 15.4 LTS) for classic (non-serverless) compute. ([#6418](#6418))
 * Fixed the direct engine silently ignoring edits to duration and timestamp fields, such as a Lakebase endpoint's `suspend_timeout_duration`. Such a change planned `0 to change` and was never applied. ([#6377](#6377))
 * Fixed `$${...}` not escaping a literal `${...}` on the direct engine, which failed with an `invalid dependency` error. ([#6484](#6484), [#6489](#6489))
 * Remove forward_user_access_token from update_mask for Apps because it's not supported. Fixes regression in 1.14.1. ([#6510](#6510))
 * direct: Fix deploying an update to `postgres_projects.default_endpoint_settings`. ([#6440](#6440))
 * direct: Fix deploying an update to `postgres_endpoints.settings.pg_settings`. ([#6441](#6441))
 * direct: Fix deploying an update to `expire_time`, `ttl` or `suspend_timeout_duration` on Lakebase resources. ([#6443](#6443))
 * Added PyDABs (Python) support for catalogs: `Resources.add_catalog` and the `catalog_mutator` decorator. ([#6408](#6408))
 * Bundle templates now use serverless [environment version 5](https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/five), which offers better performance, and `databricks-connect` 16.4. ([#6378](#6378))
 * Fixed a job with a `table_update` trigger never converging on the direct engine. ([#6442](#6442))

### Dependency Updates

 * Bump Go toolchain to 1.26.8. ([#6476](#6476))
janniklasrose pushed a commit that referenced this pull request Sep 15, 2026
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.
janniklasrose pushed a commit that referenced this pull request Sep 15, 2026
## Release v1.15.0

### CLI

 * When `uv python install` fails, `databricks environments setup-local` now falls back to a compatible Python interpreter already installed on the machine. ([#6457](#6457))
 * Allow `databricks environments setup-local` to update `pyproject.toml` files containing TOML multi-line strings. ([#6445](#6445))

### Bundles

 * Before committing the automatic terraform→direct migration, run a deployment plan against the converted state; if the plan fails the migration is abandoned. ([#6486](#6486))
 * The `dbt-sql` bundle template now uses Databricks Runtime 16.4 LTS (up from 15.4 LTS) for classic (non-serverless) compute. ([#6418](#6418))
 * Fixed the direct engine silently ignoring edits to duration and timestamp fields, such as a Lakebase endpoint's `suspend_timeout_duration`. Such a change planned `0 to change` and was never applied. ([#6377](#6377))
 * Fixed `$${...}` not escaping a literal `${...}` on the direct engine, which failed with an `invalid dependency` error. ([#6484](#6484), [#6489](#6489))
 * direct: Fix deploying an update to `postgres_projects.default_endpoint_settings`. ([#6440](#6440))
 * direct: Fix deploying an update to `postgres_endpoints.settings.pg_settings`. ([#6441](#6441))
 * direct: Fix deploying an update to `expire_time`, `ttl` or `suspend_timeout_duration` on Lakebase resources. ([#6443](#6443))
 * Added PyDABs (Python) support for catalogs: `Resources.add_catalog` and the `catalog_mutator` decorator. ([#6408](#6408))
 * Bundle templates now use serverless [environment version 5](https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/five), which offers better performance, and `databricks-connect` 16.4. ([#6378](#6378))
 * Fixed a job with a `table_update` trigger never converging on the direct engine. ([#6442](#6442))

### Dependency Updates

 * Bump Go toolchain to 1.26.8. ([#6476](#6476))
janniklasrose pushed a commit that referenced this pull request Sep 15, 2026
## Release v1.15.0

### CLI

 * When `uv python install` fails, `databricks environments setup-local` now falls back to a compatible Python interpreter already installed on the machine. ([#6457](#6457))
 * Allow `databricks environments setup-local` to update `pyproject.toml` files containing TOML multi-line strings. ([#6445](#6445))

### Bundles

 * Before committing the automatic terraform→direct migration, run a deployment plan against the converted state; if the plan fails the migration is abandoned. ([#6486](#6486))
 * The `dbt-sql` bundle template now uses Databricks Runtime 16.4 LTS (up from 15.4 LTS) for classic (non-serverless) compute. ([#6418](#6418))
 * Fixed the direct engine silently ignoring edits to duration and timestamp fields, such as a Lakebase endpoint's `suspend_timeout_duration`. Such a change planned `0 to change` and was never applied. ([#6377](#6377))
 * Fixed `$${...}` not escaping a literal `${...}` on the direct engine, which failed with an `invalid dependency` error. ([#6484](#6484), [#6489](#6489))
 * Remove forward_user_access_token from update_mask for Apps because it's not supported. Fixes regression in 1.14.1. ([#6510](#6510))
 * direct: Fix deploying an update to `postgres_projects.default_endpoint_settings`. ([#6440](#6440))
 * direct: Fix deploying an update to `postgres_endpoints.settings.pg_settings`. ([#6441](#6441))
 * direct: Fix deploying an update to `expire_time`, `ttl` or `suspend_timeout_duration` on Lakebase resources. ([#6443](#6443))
 * Added PyDABs (Python) support for catalogs: `Resources.add_catalog` and the `catalog_mutator` decorator. ([#6408](#6408))
 * Bundle templates now use serverless [environment version 5](https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/five), which offers better performance, and `databricks-connect` 16.4. ([#6378](#6378))
 * Fixed a job with a `table_update` trigger never converging on the direct engine. ([#6442](#6442))

### Dependency Updates

 * Bump Go toolchain to 1.26.8. ([#6476](#6476))
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