Skip to content

acc: cover field removals on postgres resources against the real API - #7805

Open
denik wants to merge 2 commits into
mainfrom
denik/postgres-removal-tests
Open

denik wants to merge 2 commits into
mainfrom
denik/postgres-removal-tests

Conversation

@denik

@denik denik commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Changes

New bundle tests that remove a field from each postgres resource and record the deploy, the PATCH, the read-back and the following plan: project custom_tags (shrink, then remove), default_endpoint_settings.pg_settings key, enable_pg_native_login; endpoint settings.pg_settings key, disabled; branch is_protected; role attributes.createdb, membership_roles.

New raw-API factcheck postgres_projects/factcheck/clear_field: for each resource, clears a field by masking it with the field omitted, by masking spec with it omitted, and by masking spec with the zero value sent.

The testserver is updated to match what the real API returned for these requests: a masked repeated field the body omits is cleared, a masked map the body omits is kept, update_mask=spec keeps an omitted is_protected / disabled / role attribute, role updates reject a masked scalar with no value, and project/endpoint status reflect custom_tags, pg_settings and enable_pg_native_login.

Why

To see what changes if postgres resources switch to update_mask=spec (#7806), we need a baseline of what removals do today on a real workspace. Today: removing a list entry, a whole list or a map key works; removing a bool fails with 400 (is in update_mask but not provided in request), recorded as Badness.

The factcheck is meant for the Lakebase team: an omitted scalar cannot be cleared under either mask, and under spec an omitted repeated field is kept for project custom_tags but cleared for role membership_roles.

Tests

All new tests were generated against an AWS workspace and pass locally against the testserver.

This pull request and its description were written by Isaac.

Bundle tests for removing a field from each postgres resource, plus a raw-API
factcheck showing how each Update API clears a field under a field mask and
under update_mask=spec. The testserver now matches what the real API did on
2026-11-19 for these requests.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik requested review from a team as code owners November 19, 2026 13:54
@github-actions github-actions Bot added DABs DABs related issues test-only-fix PRs that update failing of flaky tests without changing CLI code. labels Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 486c1715e | Workflow run

Regression test report

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

17 tests: regression=0 unreleased=0 coverage=17 failing=0
test branch main (fb245a2) latest (v1.27.0)
TestAccept/bundle/resources/postgres_branches/remove_is_protected/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_branches/remove_is_protected/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/remove_disabled/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/remove_disabled/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/remove_pg_settings_key/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_endpoints/remove_pg_settings_key/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/factcheck/clear_field ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/remove_default_pg_settings_key/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/remove_default_pg_settings_key/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/remove_enable_pg_native_login/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_projects/remove_enable_pg_native_login/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/remove_attribute/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/remove_attribute/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/remove_membership_roles/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/postgres_roles/remove_membership_roles/DMS=true ✅ ✅ ✅

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 486c171

Run: 44539771067

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 297 19 16:02
💚​ aws-windows-latest-4core-16gb 1 299 17 12:11
💚​ azure linux-2core-8gb 1 296 19 16:38
🔄​ azure-windows-latest-4core-16gb 3 296 17 20:20
💚​ gcp linux-2core-8gb 1 297 19 16:01
💚​ gcp-windows-latest-4core-16gb 1 299 17 14:12
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 🔄​f 💚​R 💚​R
🔄​ TestAccept/bundle/resources/postgres_projects/remove_custom_tags ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=true ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
Top 50 slowest tests (at least 2 minutes):
duration env testname
5:44 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
4:41 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/remove_membership_roles/DMS=true
4:37 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=true
4:33 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=true
3:57 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/remove_attribute/DMS=true
3:51 aws linux-2core-8gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=
3:33 gcp-windows-latest-4core-16gb TestAccept
3:24 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/remove_membership_roles/DMS=
3:21 aws-windows-latest-4core-16gb TestAccept
3:13 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_branches/remove_is_protected/DMS=
3:10 azure linux-2core-8gb TestAccept/bundle/resources/postgres_endpoints/remove_disabled/DMS=true
3:07 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/remove_attribute/DMS=
3:06 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=
3:02 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/remove_attribute/DMS=
2:57 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
2:56 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/remove_membership_roles/DMS=
2:48 azure linux-2core-8gb TestAccept/bundle/resources/postgres_projects/remove_default_pg_settings_key/DMS=true
2:40 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
2:38 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=true
2:36 azure-windows-latest-4core-16gb TestFilerWorkspaceNotebook/rJupyterNb.ipynb
2:35 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_projects/remove_default_pg_settings_key/DMS=
2:35 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=
2:34 gcp linux-2core-8gb TestLock
2:33 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_endpoints/remove_pg_settings_key/DMS=
2:33 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/remove_attribute/DMS=
2:29 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_projects/remove_default_pg_settings_key/DMS=true
2:28 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_roles/remove_membership_roles/DMS=true
2:27 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=
2:26 gcp-windows-latest-4core-16gb TestImportDirWithOverwriteFlag
2:25 aws linux-2core-8gb TestAccept/bundle/resources/postgres_roles/remove_attribute/DMS=true
2:24 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=true
2:22 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_endpoints/remove_pg_settings_key/DMS=
2:21 azure linux-2core-8gb TestAccept/bundle/resources/postgres_roles/remove_attribute/DMS=true
2:21 aws linux-2core-8gb TestFilerReadWrite/workspace_files
2:20 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_endpoints/remove_pg_settings_key/DMS=true
2:13 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
2:12 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_endpoints/remove_disabled/DMS=
2:11 azure-windows-latest-4core-16gb TestSyncFullFileSync
2:10 azure linux-2core-8gb TestAccept/bundle/resources/postgres_projects/remove_custom_tags/DMS=true
2:09 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_branches/remove_is_protected/DMS=true
2:09 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:08 azure-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_branches/remove_is_protected/DMS=true
2:08 azure linux-2core-8gb TestImportDirWithOverwriteFlag
2:07 gcp-windows-latest-4core-16gb TestSyncNestedSpacePlusAndHashAreEscapedSync
2:05 aws linux-2core-8gb TestAccept/bundle/resources/postgres_projects/remove_default_pg_settings_key/DMS=true
2:03 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_projects/remove_default_pg_settings_key/DMS=
2:03 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
2:03 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_branches/remove_is_protected/DMS=true
2:01 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
2:01 aws-windows-latest-4core-16gb TestFilerWorkspaceNotebook/pyNb.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues test-only-fix PRs that update failing of flaky tests without changing CLI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants