Skip to content

acc: match postgres GET now echoing spec - #7596

Merged
denik merged 2 commits into
mainfrom
denik/acc-postgres-spec-echo
Nov 13, 2026
Merged

denik merged 2 commits into
mainfrom
denik/acc-postgres-spec-echo

Conversation

@denik

@denik denik commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Since 2026-11-12 the postgres API returns spec on GET for projects, branches, endpoints, databases and roles, where before it returned only status. 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 to service/postgres/model.go.

  • libs/testserver: postgres GET now echoes spec the way the cloud does:
    • on create, the spec as sent;
    • on update, merged by update_mask: a masked field missing from the body keeps its value, and setting one oneof member clears the others;
    • without the fields that stay input-only (project pg_version; branch source_branch, source_branch_lsn, source_branch_time; role postgres_role, auth_method, identity_type).
  • Goldens regenerated with -update against AWS. The two local-only tests (postgres_branches/update_expire_time, recreate_source_branch_time) were updated locally.
  • Stale "GET does not echo spec" comments in bundle/direct/dresources updated.

This also unblocks the SDK bump PRs (#7530, #7584). Their regenerated configs drop spec:input_only for these fields. Against a testserver that still strips spec, that turns into phantom drift, which is the "Unexpected action='update'" in invariant/no_drift. With this PR's testserver plus #7530's *.generated.yml, all postgres_*, invariant and deploy/readplan acceptance 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 fields spec: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 -update for postgres_{projects,branches,endpoints,databases,roles}: pass.
  • Full local acceptance suite and libs/testserver / bundle/direct/... unit tests: pass. New unit tests cover the spec merge rules.
  • The last commit names the postgres suites with cloud: so CI runs them on all clouds.

Dashboard

error snippet
error/3387 "new": "259200s", + "remote": "604800s" (postgres_branches/update_ttl)
error/3389 "new": "600s", "remote": "300s"
error/3390 Plan differs (out.plan.json): Unexpected output "display_name": ..., "history_retention_duration"
error/3407 / error/3408 Unexpected output "attributes": { "createdb": ... (postgres_roles/update)
error/3409 / error/3414 "old": "300s", "remote": "300s"
error/3410 / error/3411 Unexpected output "default_endpoint_settings": { "autoscaling_limit_max_cu": 4,
error/3412 "new": "16000", "remote": "8000"
error/3413 / error/3424 / error/3415 / error/3419 "new": 4, "remote": 8 (postgres_endpoints/update_autoscaling)
error/3416 / error/3417 / error/3425 + "postgres_database": "initial_db_name", + "role": ".../roles/app-owner"
error/3418 / error/3420 Unexpected output "is_protected": false, "no_expiry": true,

This pull request and its description were written by Isaac.

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>
@denik denik added the ai-auto PRs made by AI loops & factories, label Nov 13, 2026
@github-actions github-actions Bot added the DABs DABs related issues label Nov 13, 2026
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>
@github-actions

Copy link
Copy Markdown
Contributor

Commit: e86837fb3 | Workflow run

Regression test report

Selected 15 changed tests (limit=20, 0 not selected)

90 tests: regression=0 unreleased=0 coverage=90 failing=0
test branch main (66d86c1) latest (v1.26.0)
TestAccept/bundle/resources/postgres_branches/basic/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/basic/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/purge_on_delete/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/purge_on_delete/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/purge_on_delete_transitions/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/purge_on_delete_transitions/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/recreate/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/recreate/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/recreate_source_branch_time/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/recreate_source_branch_time/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/replace_existing/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/replace_existing/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/update_expire_time/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/update_expire_time/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/update_protected/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/update_protected/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/update_ttl/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/update_ttl/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/without_branch_id/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/without_branch_id/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/basic/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/basic/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/live_errors/bad_database_id/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/live_errors/bad_database_id/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/live_errors/bad_role_ref/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/live_errors/bad_role_ref/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/recreate/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/recreate/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/replace_existing/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/replace_existing/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/update/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_databases/update/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/add_settings/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/add_settings/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/basic/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/basic/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/recreate/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/recreate/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/remove_suspend_timeout/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/remove_suspend_timeout/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/replace_existing/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/replace_existing/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/update_autoscaling/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/update_autoscaling/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/update_pg_settings/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/update_pg_settings/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/update_suspend_timeout/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/update_suspend_timeout/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/without_endpoint_id/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/without_endpoint_id/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/add_default_endpoint_settings/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/add_default_endpoint_settings/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/basic/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/basic/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/factcheck/update_mask_spec ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/factcheck/update_mask_star ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/purge_on_delete/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/purge_on_delete/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/purge_on_delete_transitions/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/purge_on_delete_transitions/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/recreate/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/recreate/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/remove_history_retention/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/remove_history_retention/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_default_endpoint_suspend/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_default_endpoint_suspend/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_display_name/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_display_name/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_history_retention/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_history_retention/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_keeps_children/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/update_keeps_children/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/without_project_id/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/without_project_id/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/basic/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/basic/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/inherited-role-bind/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/inherited-role-bind/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/inherited-role-conflict/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/inherited-role-conflict/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/recreate-postgres-role/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/recreate-postgres-role/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/recreate/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/recreate/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/replace_existing/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/replace_existing/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/update/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/update/DMS=true ✅ ✅ ✅

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: e86837f

Run: 43403801593

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 392 19 23:52
💚​ aws-windows-latest-4core-16gb 1 394 17 23:45
💚​ azure linux-2core-8gb 1 391 19 23:02
💚​ azure-windows-latest-4core-16gb 1 393 17 23:10
💚​ gcp linux-2core-8gb 1 392 19 23:30
💚​ gcp-windows-latest-4core-16gb 1 394 17 24:13
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 19 slowest tests (at least 2 minutes):
duration env testname
4:08 azure-windows-latest-4core-16gb TestAccept
4:01 gcp-windows-latest-4core-16gb TestAccept
3:25 aws linux-2core-8gb TestAccept
3:24 gcp linux-2core-8gb TestAccept
3:14 azure linux-2core-8gb TestAccept
2:54 aws-windows-latest-4core-16gb TestAccept
2:23 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/update/DMS=true
2:17 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_endpoints/add_settings/DMS=
2:17 aws linux-2core-8gb TestAccept/bundle/resources/postgres_endpoints/update_autoscaling/DMS=true
2:12 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_roles/update/DMS=true
2:11 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_branches/update_protected/DMS=true
2:07 azure linux-2core-8gb TestAccept/bundle/resources/postgres_branches/update_protected/DMS=true
2:07 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_databases/update/DMS=true
2:07 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_databases/replace_existing/DMS=true
2:05 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/update/DMS=
2:04 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_roles/recreate-postgres-role/DMS=true
2:03 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_endpoints/update_autoscaling/DMS=
2:02 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_projects/recreate/DMS=true
2:00 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/update/DMS=

@denik
denik marked this pull request as ready for review November 13, 2026 10:31
@denik
denik requested review from a team as code owners November 13, 2026 10:31
@denik
denik added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit eef3b54 Nov 13, 2026
27 checks passed
@denik
denik deleted the denik/acc-postgres-spec-echo branch November 13, 2026 10:58
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-auto PRs made by AI loops & factories, DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants