acc: select asserted fields on postgres GETs instead of del-ing volatile ones#5911
Merged
Conversation
Collaborator
Integration test reportCommit: a93beda
8 interesting tests: 4 SKIP, 3 KNOWN, 1 RECOVERED
Top 10 slowest tests (at least 2 minutes):
|
de1f1e0 to
c81b986
Compare
c81b986 to
3d81bfe
Compare
…ile ones The Cloud postgres/database acceptance tests filtered each `get-<resource>` response with a deny-list — `jq 'del(.create_time, .update_time, ...)'` — then asserted on everything that was left. Every time the backend adds a response field the golden breaks even though the test does not care about it (that is what happened when the endpoint response gained pooled-host / last- active-time fields). Flip the deny-list to an allow-list: a `<resource>_fields()` helper in each resource dir's script.prepare that selects exactly the fields the test was already asserting. Same fields, so the goldens are unchanged; the difference is that a new field the backend starts returning is now ignored automatically instead of breaking the golden. Mirrors the existing endpoint_fields helper (postgres_endpoints/script.prepare). Converted: postgres_branches, postgres_databases, postgres_projects, postgres_roles, postgres_catalogs, database_instances. Notes: - No golden churn: each projection reproduces the previous filtered output byte-for-byte. The one exception is postgres_projects/recreate, whose get-project was previously piped straight to a file with no filter at all; it now drops create_time/update_time to match every other project test. - branch_fields null-drops the source_* provenance fields, present on forked branches but absent on the default branch. - Plan-file filters (bundle plan -o json) are left as-is; they already strip a single volatile field and do not assert a full GET payload. - Local-only tests (jobs, pipelines_recreate) keep asserting the full payload: the mock controls that shape, so there is no live backend to add fields. Verified local and against aws-ucws. Co-authored-by: Isaac
3d81bfe to
861fd2b
Compare
janniklasrose
approved these changes
Jul 13, 2026
janniklasrose
left a comment
Contributor
There was a problem hiding this comment.
Please update agent instructions (testing.md) to ensure they don't print unstable/extra fields in API responses
Add a rule to the acceptance-testing agent instructions requiring that a printed API GET/read response be projected to an allow-list of asserted fields (a <resource>_fields() helper in script.prepare) rather than dumped in full or filtered with a volatile-field deny-list. Addresses review feedback to keep acceptance goldens from breaking on unstable/extra fields in API responses. Co-authored-by: Isaac
Contributor
Author
|
Added a rule to This comment was generated with GitHub MCP. |
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
The Cloud postgres/database acceptance tests filtered each
get-<resource>response with a deny-list and then asserted on everything left:Every time the backend adds a response field the golden breaks — even though the test doesn't care about that field. That's what happened when the endpoint response gained
read_only_pooled_host/read_write_pooled_host/last_active_time.What changed
Flip the deny-list to an allow-list: a
<resource>_fields()helper in each resource dir'sscript.preparethatjq-selects exactly the fields the test was already asserting.