acc: factcheck postgres_projects update_mask=* and =spec - #6767
Merged
Merged
Conversation
Collaborator
Integration test reportCommit: 30ac1fa
Top 3 slowest tests (at least 2 minutes):
|
denik
force-pushed
the
denik/investigate-star-mask
branch
3 times, most recently
from
September 21, 2026 13:55
db06fe2 to
d102dd8
Compare
pietern
approved these changes
Sep 22, 2026
Contributor
There was a problem hiding this comment.
Looks like these are the scripts that seeded the acc tests?
If so they can be omitted.
Contributor
Author
There was a problem hiding this comment.
the other way around - I made tests and then these scripts so lakebase team can run them easily. They won't be merged.
andrewnester
approved these changes
Sep 22, 2026
Two raw-$CLI acceptance tests (no bundle) that run the same sequence of updates, one under update_mask=* and one under update_mask=spec, so the goldens document where the masks agree and differ against the real API: - create accepts a minimal body (the server materializes the rest); - a partial body under * is rejected field by field, while under spec it is applied and the omitted fields are preserved (spec is a patch, not a replace); - after a field is set non-default, a body that omits it is again rejected by *, while spec 500s — masking the whole spec resets the omitted sub-message and its emptied autoscaling limits fail validation; the other fields are applied first, so it is a partial write (the display change persists, only the response errors). The sequence is inlined in each test's script (they differ only by the mask); a header comment shows how to run it standalone against a real workspace by stubbing the harness helpers. It uses `postgres update-project NAME UPDATE_MASK`, which waits for the operation, so every mutation is committed before the next read and the outcomes are deterministic; the update result is piped through project_fields so a success records an allow-listed project and a failure (empty stdout) is a no-op with its error shown. After each update, print_requests.py prints the exact PATCH sent — including update_mask=* verbatim, confirming the wire value. Both inherit Cloud = true. Testserver: validateUpdateMask now accepts the * wildcard and then requires every leaf of the resource's mask-path list (a oneof group satisfied by any member), matching the API's field-by-field rejection. PostgresProjectUpdate reproduces the whole-spec-drops-a-non-default-sub-message 500 as a partial write, with a 32-hex trace id so goldens normalize like cloud. Co-authored-by: Isaac
denik
force-pushed
the
denik/investigate-star-mask
branch
from
September 22, 2026 11:55
269b04b to
30ac1fa
Compare
denik
enabled auto-merge
September 22, 2026 11:57
Collaborator
Integration test reportCommit: 25fdfe5
29 interesting tests: 24 FAIL, 5 flaky
Top 50 slowest tests (at least 2 minutes):
|
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
Raw-
$CLIacceptance tests that document, against the real API, what the Postgres projectUpdateendpoint actually accepts — nobundle deployinvolved. These pin the behavior the direct engine's mask logic has to work around.Changes
Two tests under
postgres_projects/factcheck/:update_mask_star: create accepts a minimal body (display_name+pg_version; the server materializes the rest), but that same body withupdate_mask=*is rejected field by field (Field '...' is in update_mask but not provided). Which field comes first isn't contractual, so aReplnormalizes it.update_mask_spec:update_mask=specapplies the body but, unlike*, does not require every field — a body that omitshistory_retention_durationsucceeds and the omitted scalar is preserved, not reset. (Sospecis a lenient patch, not a full replace.)Both inherit
Cloud = true, so they also run against a real workspace; verified on AWS.To make the local run match cloud,
validateUpdateMaskin the testserver now handles the wildcard:*is accepted, then every leaf of the resource's update-mask path list must be present in the body (a oneof group satisfied by any member), returning the first missing. Previously the fake rejected*as an unknown path.