Skip to content

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

Open
pietern wants to merge 3 commits into
mainfrom
postgres-use-id-from-status
Open

postgres: read ids from Status instead of parsing Name#5274
pietern wants to merge 3 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
@github-actions
Copy link
Copy Markdown
Contributor

Waiting for approval

Based on git history, these people are best suited to review:

  • @denik -- recent work in bundle/direct/dresources/
  • @simonfaltum -- recent work in bundle/direct/dresources/

Eligible reviewers: @andrewnester, @anton-107, @janniklasrose, @lennartkats-db, @shreyas-goenka

Suggestions based on git history. See OWNERS for ownership rules.

Base automatically changed from postgres-hoist-spec to main May 19, 2026 15:55
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.

1 participant