Skip to content

Read postgres IDs from top-level response field - #5642

Merged
pietern merged 2 commits into
mainfrom
postgres-top-level-ids
Jun 29, 2026
Merged

Read postgres IDs from top-level response field#5642
pietern merged 2 commits into
mainfrom
postgres-top-level-ids

Conversation

@pietern

@pieternpietern commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Changes

Read the top-level ID field directly in the postgres make*Remote helpers instead of digging it out of status.

Why

The SDK bump to v0.147.0 (#5636) added top-level ID fields that the Lakebase GET APIs now return, making the status indirection unnecessary. Example API docs: https://docs.databricks.com/api/workspace/postgres/getproject

This pull request and its description were written by Isaac.

The SDK bump to v0.147.0 (#5636) added top-level ID fields (project_id,
branch_id, endpoint_id, database_id, role_id) to the postgres resource types,
which the real Lakebase GET APIs now return. The direct engine make*Remote
helpers previously dug the ID out of the status subobject; read the top-level
field directly instead.
Co-authored-by: Isaac
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 268c9d6

Run: 28366331991

Env🟨​KNOWN💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
🟨​aws linux711323210364:44
🟨​aws windows711323410345:43
💚​aws-ucws linux8133169544:16
💚​aws-ucws windows8133189523:11
💚​azure linux21523210353:38
💚​azure windows21523410332:43
💚​azure-ucws linux2153189514:39
💚​azure-ucws windows2153209493:03
💚​gcp linux21523110373:01
💚​gcp windows21523310352:55
21 interesting tests: 13 SKIP, 7 KNOWN, 1 RECOVERED
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp windows
🟨​TestAccept🟨​K🟨​K💚​R💚​R💚​R💚​R💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/invariant/no_drift🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/permissions🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions🟨​K🟨​K💚​R💚​R🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct🟨​K🟨​K💚​R💚​R
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform🟨​K🟨​K💚​R💚​R
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions🟨​K🟨​K💚​R💚​R🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct🟨​K🟨​K💚​R💚​R
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform🟨​K🟨​K💚​R💚​R
🙈​TestAccept/bundle/resources/postgres_branches/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/recreate🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/replace_existing🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/update_protected🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/without_branch_id🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_endpoints/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_projects/update_display_name🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/synced_database_tables/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/ssh/connection🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestFetchRepositoryInfoAPI_FromRepo💚​R💚​R💚​R💚​R💚​R💚​R💚​R💚​R💚​R💚​R

@pieternpietern changed the title acc: read postgres top-level ID fields directly in direct engineRead postgres ID fields from top-level response fieldJun 19, 2026
@pieternpietern changed the title Read postgres ID fields from top-level response fieldRead postgres IDs from top-level response fieldJun 19, 2026
@pietern
pieterntemporarily deployed to test-trigger-is June 29, 2026 10:43 — with GitHub Actions Inactive
@pietern
pieterntemporarily deployed to test-trigger-is June 29, 2026 10:43 — with GitHub Actions Inactive

@denikdenik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SDK bump to v0.147.0 (#5636) added top-level ID fields that the Lakebase GET APIs now return, making the status indirection unnecessary.

Did SDK bump added those fields or started to populate them?

If added, should we remove them from config and state struct?

type PostgresRoleConfig struct {
postgres.RoleRoleSpec
// RoleId is the user-specified ID for the role (becomes part of the hierarchical name).
// This is specified during creation and becomes part of Name: "projects/{project_id}/branches/{branch_id}/roles/{role_id}"
RoleId string `json:"role_id"`
// Parent is the branch containing this role. Format: "projects/{project_id}/branches/{branch_id}"
Parent string `json:"parent"`
}
// when parent comes from a resource reference.
type PostgresRoleState struct {
postgres.RoleRoleSpec
// RoleId is the leaf id, matching the user-facing config.
RoleId string `json:"role_id"`

@pietern

Copy link
Copy Markdown
ContributorAuthor

They're in the GET response at the top level. Those include the status type, not the spec type.

The spec type doesn't include these IDs, so they need to be called out explicitly.

@denikdenik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks

@pietern
pietern enabled auto-merge June 29, 2026 10:56
@pietern
pietern added this pull request to the merge queueJun 29, 2026
Merged via the queue into main with commit d8e7d46Jun 29, 2026
27 checks passed
@pietern
pietern deleted the postgres-top-level-ids branch June 29, 2026 11:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pietern@eng-dev-ecosystem-bot@denik