Skip to content

postgres: embed spec on Branch/Endpoint/Project remote types#5273

Merged
pietern merged 2 commits into
mainfrom
postgres-hoist-spec
May 19, 2026
Merged

postgres: embed spec on Branch/Endpoint/Project remote types#5273
pietern merged 2 commits into
mainfrom
postgres-hoist-spec

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented May 19, 2026

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).

This pull request and its description were written by Isaac.

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
@pietern pietern requested a review from denik May 19, 2026 14:15
# 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
@pietern pietern temporarily deployed to test-trigger-is May 19, 2026 14:21 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is May 19, 2026 14:21 — with GitHub Actions Inactive
pietern added a commit that referenced this pull request May 19, 2026
Apply the same hoist that #5273 does for Branch/Endpoint/Project. Define
PostgresCatalogRemote that embeds CatalogCatalogSpec and exposes 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
echoes 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.

Prompted by #5265 (comment).
Should land after #5273.

Co-authored-by: Isaac
@pietern pietern requested a review from janniklasrose May 19, 2026 14:57
"enable_pg_native_login",
"history_retention_duration",
"pg_version",
"project_id",
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.

Nice. This is technically a breaking change, worth changelog entry.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You mean because the .spec fields can no longer be referenced?

@pietern pietern added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 865d695 May 19, 2026
27 checks passed
@pietern pietern deleted the postgres-hoist-spec branch 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.

2 participants