Mask a Lakebase map field as a whole, not per entry - #6441
Open
denik wants to merge 2 commits into
Open
Conversation
Contributor
Approval status: pending
|
The plan diffs maps entry by entry, so changing one pg_settings key produced the change path settings.pg_settings['statement_timeout'], and the mask repeated it verbatim. A map or repeated field is addressable only as a whole: the API answers the indexed form with "Unknown field path in update_mask" (probed against a real workspace on 2026-08-31, where spec.settings and spec.settings.pg_settings are both accepted). Drop everything from the first subscript on, and dedupe, since two changed entries of one map collapse onto the same path. update_pg_settings covers the edit. add_settings covers adding the block, which masks the message itself; that path was missing from the fake's allowed list, so a case the real API accepts failed locally. Co-authored-by: Isaac
Co-authored-by: Isaac
denik
force-pushed
the
denik/update-mask-index
branch
from
August 31, 2026 14:58
f9b090d to
bcab355
Compare
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.
Stacked on #6440 — review that one first.
A bundle that changes one key of
postgres_endpoints.settings.pg_settingscannot deploy:The plan diffs maps entry by entry, so the change path carries the map key and the mask repeated it verbatim. A map or repeated field is addressable only as a whole. Probed against a real endpoint on 2026-08-31:
spec.settingsandspec.settings.pg_settingsare both accepted, the indexed form is not.So drop everything from the first subscript on, and dedupe — two changed entries of one map collapse onto the same path. Terraform is unaffected; it masks the whole spec.
Two tests, both local and cloud:
update_pg_settings— edit a key. Fails without this change.add_settings— add the whole block, which leaves one change path and masks the message itself. That path was missing from the fake's allowed list, so a case the real API accepts was failing locally.This pull request and its description were written by Isaac.