Repository navigation
direct: use the Lakebase catalog a failed create request created - #7801
Merged
Merged
Conversation
database_catalogs and postgres_catalogs creates now get the same recovery as postgres branches, projects and roles: on a transient error, look the catalog up, use it if this deployment created it, and repeat the create while it is missing. Co-authored-by: Isaac <no-reply@databricks.com>
cloud: TestAccept/bundle/resources/database_catalogs TestAccept/bundle/resources/postgres_catalogs TestAccept/bundle/resources/synced_database_tables/basic TestAccept/bundle/resources/postgres_synced_tables/basic Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 2 changed tests (limit=20, 0 not selected) 16 tests: regression=4 unreleased=0 coverage=12 failing=0
TestAccept/bundle/resources/database_catalogs/create_504/DMS=: branch ✅ | main (ab7c938) ❌ | latest (v1.27.0) ❌main (ab7c938): latest (v1.27.0): same output as main (ab7c938) TestAccept/bundle/resources/database_catalogs/create_504/DMS=true: branch ✅ | main (ab7c938) ❌ | latest (v1.27.0) ❌main (ab7c938): latest (v1.27.0): same output as main (ab7c938) TestAccept/bundle/resources/postgres_catalogs/create_transient_500/DMS=: branch ✅ | main (ab7c938) ❌ | latest (v1.27.0) ❌main (ab7c938): latest (v1.27.0): same output as main (ab7c938) TestAccept/bundle/resources/postgres_catalogs/create_transient_500/DMS=true: branch ✅ | main (ab7c938) ❌ | latest (v1.27.0) ❌main (ab7c938): latest (v1.27.0): same output as main (ab7c938) |
Collaborator
✅ Integration test reportCommit: a2d3ad0
Top 13 slowest tests (at least 2 minutes):
|
andrewnester
approved these changes
Nov 19, 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
Lakebase catalog creates now recover from transient errors the way postgres branches, projects and roles already do (#7602, #7747, #7767). Until now,
database_catalogsandpostgres_catalogsfailed the deploy on any create error. If the catalog had actually been created, the next deploy also failed, with "already exists".recoverPostgresCreatelooks the catalog up. It uses the catalog if itscreate_timeshows this deployment created it, and repeats the create while the catalog is missing. This is the same code path roles use.recoverCreate, as features, serving endpoints and AI Gateway services do (#7757, #7782). The Database API returns no create time, so the time check usescreated_atof the Unity Catalog catalog the database catalog registers. I checked on AWS that it is there, withcatalog_type: MANAGED_ONLINE_CATALOG. If the database catalog exists but its UC catalog can't be found, the deploy fails with "has no create time" rather than repeating the create.400 CATALOG_ALREADY_EXISTS("Catalog '...' already exists"; checked on AWS).isPostgresAlreadyExistsalready matches that response.isAlreadyExistsnow matches it as well, so a repeated database catalog create that lands after an earlier one triggers another lookup.Testserver, to match the cloud:
created_at, and the delete removes it.404 CATALOG_DOES_NOT_EXISTinstead of a plain-text 404. Without the error code the SDK doesn't report it as missing.400 CATALOG_ALREADY_EXISTS, not 409 or silently overwriting.Judgment calls:
retry.IsTransient, like its postgres siblings, not on the widerisUncertainCreateError(499, stream resets). Neither of those has been seen on Lakebase creates.Why
These create errors fail cloud runs on main. The two dashboard errors this PR fixes:
Dashboard
Error: cannot create resources.database_catalogs.my_catalog: (504 DEADLINE_EXCEEDED)(Azure, 4 failures since 2026-10-26)Error: cannot create resources.postgres_catalogs.my_catalog: The request could not be processed. Please try again later and contact Databricks if the problem persists. [TraceId: [TRACE_ID]] (500 INTERNAL_ERROR)(AWS, GCP)Tests: TestAccept/bundle/resources/synced_database_tables/basic/DMS=, TestAccept/bundle/resources/synced_database_tables/basic/DMS=true, TestAccept/bundle/resources/postgres_synced_tables/basic/DMS=true
Tests
database_catalogs/create_504covers a catalog created despite a 504, a catalog that was not created, a catalog that only shows up after the repeat hits "already exists", and an unreadable catalog.postgres_catalogs/create_transient_500covers created, not created (504) and unreadable.testme-aws: UCcreated_aton a database catalog, and the duplicate-create error from both APIs.This pull request and its description were written by Isaac.