Repository navigation
acc: match postgres GET now echoing spec - #7596
Merged
Merged
Conversation
Since 2026-11-12 the Lakebase postgres API returns spec on GET for projects, branches, endpoints, databases and roles, not only status. Plans now record remote values for spec fields, and fields that match no longer appear as "skip spec:input_only" changes. The testserver now echoes spec the way the cloud does: as sent on create, merged by update_mask on update (a masked field missing from the body keeps its value, and one oneof member replaces the others), without fields that stay input-only (project pg_version, branch source_branch*, role postgres_role/auth_method/identity_type). Goldens regenerated on AWS and checked locally. cloud: TestAccept/bundle/resources/postgres_projects TestAccept/bundle/resources/postgres_branches TestAccept/bundle/resources/postgres_endpoints TestAccept/bundle/resources/postgres_databases TestAccept/bundle/resources/postgres_roles Co-authored-by: Isaac <no-reply@databricks.com>
Review follow-ups: clear a stored oneof sibling only when the update mask covers the group; name the input-only spec field lists once; document the spec map helpers; say in the dresources comments that the input_only marks live in the generated configs and still suppress remote changes. cloud: TestAccept/bundle/resources/postgres_projects TestAccept/bundle/resources/postgres_branches TestAccept/bundle/resources/postgres_endpoints TestAccept/bundle/resources/postgres_databases TestAccept/bundle/resources/postgres_roles Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 15 changed tests (limit=20, 0 not selected) 90 tests: regression=0 unreleased=0 coverage=90 failing=0
|
Collaborator
✅ Integration test reportCommit: e86837f
Top 19 slowest tests (at least 2 minutes):
|
pietern
approved these changes
Nov 13, 2026
pietern
added a commit
that referenced
this pull request
Nov 13, 2026
- Classify materialized_features[*].notifications as immutable; the new spec no longer marks it output-only. - Regenerate postgres and bundle/invariant goldens against #7596's testserver, dropping the drift the bumper recorded. Co-authored-by: Isaac <no-reply@databricks.com>
pietern
added a commit
that referenced
this pull request
Nov 13, 2026
…oldens The bumper recorded 'Exit code: N' for these two tests instead of their real output; main's goldens are the correct ones. Postgres goldens regenerated with -update for the spec echo fix from #7596. Co-authored-by: Isaac <no-reply@databricks.com>
This was referenced Nov 13, 2026
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.
Changes
Since 2026-11-12 the postgres API returns
specon GET for projects, branches, endpoints, databases and roles, where before it returned onlystatus. The CLI already reads the embedded spec into the remote state, so plans now show remote values for spec fields. Fields that match the config no longer show up as"action": "skip", "reason": "spec:input_only"changes. This is a backend change: nothing postgres-related changed in the CLI on main in that window, and SDK v0.197.0→v0.198.0 has no change toservice/postgres/model.go.libs/testserver: postgres GET now echoes spec the way the cloud does:update_mask: a masked field missing from the body keeps its value, and setting one oneof member clears the others;pg_version; branchsource_branch,source_branch_lsn,source_branch_time; rolepostgres_role,auth_method,identity_type).-updateagainst AWS. The two local-only tests (postgres_branches/update_expire_time,recreate_source_branch_time) were updated locally.bundle/direct/dresourcesupdated.This also unblocks the SDK bump PRs (#7530, #7584). Their regenerated configs drop
spec:input_onlyfor these fields. Against a testserver that still strips spec, that turns into phantom drift, which is the "Unexpected action='update'" ininvariant/no_drift. With this PR's testserver plus #7530's*.generated.yml, allpostgres_*,invariantanddeploy/readplanacceptance tests pass on this PR's goldens with no further changes.Decision: I updated the goldens rather than recording less, because the change is a permanent backend fix (spec echo), and the remote values make the plans more precise.
Not in this PR: on main, the generated configs (
bundle/direct/dresources/configs/postgres_*.generated.yml) still mark these fieldsspec:input_only, so the CLI keeps ignoring remote-only changes to them. Those files are generated from the OpenAPI annotations, and the SDK bump PRs regenerate them. This PR only makes the tests match the new API and keeps them passing both before and after that regeneration.Tests
testme-aws -updateforpostgres_{projects,branches,endpoints,databases,roles}: pass.libs/testserver/bundle/direct/...unit tests: pass. New unit tests cover the spec merge rules.cloud:so CI runs them on all clouds.Dashboard
"new": "259200s", + "remote": "604800s"(postgres_branches/update_ttl)"new": "600s", "remote": "300s"Plan differs (out.plan.json): Unexpected output "display_name": ..., "history_retention_duration"Unexpected output "attributes": { "createdb": ...(postgres_roles/update)"old": "300s", "remote": "300s"Unexpected output "default_endpoint_settings": { "autoscaling_limit_max_cu": 4,"new": "16000", "remote": "8000""new": 4, "remote": 8(postgres_endpoints/update_autoscaling)+ "postgres_database": "initial_db_name", + "role": ".../roles/app-owner"Unexpected output "is_protected": false, "no_expiry": true,This pull request and its description were written by Isaac.