Repository navigation
Conversation
When the request to create a postgres role fails with a transient error, look for the role before repeating the request, as branches and projects already do. cloud: TestAccept/bundle/resources/postgres_roles TestAccept/bundle/resources/postgres_databases/basic TestAccept/bundle/resources/postgres_databases/replace_existing Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 18 tests: regression=2 unreleased=0 coverage=16 failing=0
TestAccept/bundle/resources/postgres_roles/create_transient_500/DMS=: branch ✅ | main (61f1fc5) ❌ | latest (v1.26.0) ❌main (61f1fc5): latest (v1.26.0): same output as main (61f1fc5) TestAccept/bundle/resources/postgres_roles/create_transient_500/DMS=true: branch ✅ | main (61f1fc5) ❌ | latest (v1.26.0) ❌main (61f1fc5): latest (v1.26.0): |
Collaborator
✅ Integration test reportCommit: 09588af
Top 50 slowest tests (at least 2 minutes):
|
denik
marked this pull request as ready for review
November 18, 2026 13:21
denik
requested review from
Sankalp-Mittal,
andrewnester,
janniklasrose and
rugpanov
and removed request for
rugpanov
November 18, 2026 13:21
andrewnester
approved these changes
Nov 18, 2026
Sankalp-Mittal
left a comment
Contributor
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Fable 5.2 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
- Add .nextchanges/bundles/7767.md. - The duplicate-role fixture uses the 400 BAD_REQUEST the API sends. - The failing scenario asserts the failure with musterr; destroy output goes to LOG.destroy. cloud: TestAccept/bundle/resources/postgres_roles TestAccept/bundle/resources/postgres_databases/basic Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
left a comment
Contributor
There was a problem hiding this comment.
[AI Generated] Follow-up review by review-factory (Claude Fable 5.2 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
No new issues found.
This branch has not been deployed
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
When the request to create a postgres role fails with a transient error (5xx, 408, inactivity timeout), the direct engine now looks for the role before giving up, using the look-then-repeat loop branches (#7602) and projects (#7747) already use (
recoverPostgresCreate):create_time, allowing a minute of clock skew): use it, logged at Info.role ... exists but was not created by this deployment. It isn't taken over.retrying after ...warning), then repeat the create, up toretry.MaxRetriestimes. A repeat that fails withALREADY_EXISTSgoes back to the lookup.replace_existing: true: the error is markedretrySafe, andDeploymentUnit.Createrepeats the create without reading the role, as for branches.Judgment calls:
create_time, not the child branch's. It falls inside the window only if the parent role was created less than a minute before this create request, and the request also fails with a transient error.Why
On every cloud, the role create request made right after a new branch is created is answered with a 500 now and then. Nothing retried it, so the deploy failed, and so did every database that depends on the role. This happened 6 times in 7 days on AWS, Azure and GCP, on main and in PRs.
Dashboard:
Error: cannot create resources.postgres_roles.owner: The request could not be processed. Please try again later and contact Databricks if the problem persists. [TraceId: [TRACE_ID]] (500 INTERNAL_ERROR)onPOST [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles?role_id=app-ownerTests: postgres_databases/replace_existing/DMS=, postgres_databases/basic/DMS=, postgres_databases/recreate/DMS=, postgres_projects/update_keeps_children/DMS=true.
Tests
bundle/direct/dresources/postgres_role_test.godriveDoCreateagainst a testserver with scripted responses: the role is found and used; missing, then a successful repeat; missing, then a repeat that gets the API's 400 "role with that name already exists", then the role is found; missing on every attempt; a role that predates the request; a failed read;replace_existing; a non-transient error (no read). All but the last fail without the change.bundle/resources/postgres_roles/create_transient_500: the role was created despite the 500 and is used; it was not created and the create is repeated; the read fails and the deploy fails with the original error;replace_existingrepeats the create without a read.bundle/resources/postgres_*acceptance tests and thebundle/direct/...unit tests pass.postgres_roles,postgres_databases/basicandpostgres_databases/replace_existingon every cloud.This pull request and its description were written by Isaac.