postgres: embed spec on Branch/Endpoint/Project remote types#5273
Merged
Conversation
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
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
This was referenced May 19, 2026
denik
approved these changes
May 19, 2026
| "enable_pg_native_login", | ||
| "history_retention_duration", | ||
| "pg_version", | ||
| "project_id", |
Contributor
There was a problem hiding this comment.
Nice. This is technically a breaking change, worth changelog entry.
Contributor
Author
There was a problem hiding this comment.
You mean because the .spec fields can no longer be referenced?
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.
Define
Postgres{Branch,Endpoint,Project}Remotetypes that embed the corresponding SDK*Specand expose the identifier and output-only fields at the top level.DoReadreturns 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-classifiedspec:input_onlyfrom the API field behaviors inresources.generated.yml, so drift is correctly suppressed.Follows the pattern set by
PipelineRemoteandAppRemote. Prompted by #5265 (comment).This pull request and its description were written by Isaac.