Skip to content

postgres: read ids from Status instead of parsing Name#5274

Merged
pietern merged 5 commits into
mainfrom
postgres-use-id-from-status
May 21, 2026
Merged

postgres: read ids from Status instead of parsing Name#5274
pietern merged 5 commits into
mainfrom
postgres-use-id-from-status

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented May 19, 2026

The Postgres GET API now echoes the leaf id on the Status payload (BranchStatus.BranchId, EndpointStatus.EndpointId, ProjectStatus.ProjectId). Drop the regex-based ParsePostgresName recovery in the three make*Remote helpers and read the id directly from Status. The component helper and its unit test go with it; the one remaining call site in all_test.go now uses the project id literal it just created.

Fields added in SDK v0.129.0 (databricks/databricks-sdk-go#1644); available in the CLI since #5237 bumped the SDK to v0.132.0. The testserver was taught to populate these fields in the companion PR #5246, so local acceptance fixtures are unchanged.

Stacked on #5273 — base will retarget to main once that merges.

This pull request and its description were written by Isaac.

pietern added 3 commits May 19, 2026 16:14
Define Postgres{Branch,Endpoint,Project}Remote types that embed the
corresponding SDK *Spec and expose the identifier and output-only fields at
the top level. DoRead returns the new shape so state-side and remote-side
paths line up, which is a prerequisite for drift detection on spec fields
once the backend starts echoing spec on GET. Today the embedded fields are
auto-classified spec:input_only from the API field behaviors in
resources.generated.yml, so drift is correctly suppressed.

Follows the pattern set by PipelineRemote and AppRemote. Prompted by
#5265 (comment).

Co-authored-by: Isaac
# Conflicts:
#	acceptance/bundle/refschema/out.fields.txt
#	bundle/direct/dresources/postgres_branch.go
#	bundle/direct/dresources/postgres_endpoint.go
#	bundle/direct/dresources/type_test.go
The Postgres GET API now echoes the leaf id on the Status payload
(BranchStatus.BranchId, EndpointStatus.EndpointId, ProjectStatus.ProjectId).
Drop the regex-based ParsePostgresName recovery in the three make*Remote
helpers and read the id directly from Status. The component helper and its
unit test go with it; the one remaining call site in all_test.go now uses
the project id literal it just created.

Fields added in SDK v0.129.0 (databricks/databricks-sdk-go#1644); available
in the CLI since #5237 bumped the SDK to v0.132.0. The testserver was
taught to populate these fields in the companion PR #5246, so local
acceptance fixtures are unchanged.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is May 19, 2026 14:55 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is May 19, 2026 14:55 — with GitHub Actions Inactive
@pietern pietern requested review from denik and janniklasrose May 19, 2026 14:57
Base automatically changed from postgres-hoist-spec to main May 19, 2026 15:55
pietern added 2 commits May 20, 2026 10:28
…status

# Conflicts:
#	bundle/direct/dresources/postgres_branch.go
#	bundle/direct/dresources/postgres_endpoint.go
#	bundle/direct/dresources/postgres_project.go
@pietern pietern temporarily deployed to test-trigger-is May 20, 2026 09:12 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is May 20, 2026 09:12 — with GitHub Actions Inactive
@pietern pietern added this pull request to the merge queue May 21, 2026
@pietern pietern removed this pull request from the merge queue due to a manual request May 21, 2026
@pietern pietern added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 78d1747 May 21, 2026
25 checks passed
@pietern pietern deleted the postgres-use-id-from-status branch May 21, 2026 09:44
Sign up for free to 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.

2 participants