Skip to content

fix(api): add Postgres private endpoint operations (#1482) - #1487

Open
sdairs wants to merge 1 commit into
claude/drift-1482-api-rolesfrom
claude/drift-1482-api-postgres-private-endpoint
Open

sdairs wants to merge 1 commit into
claude/drift-1482-api-rolesfrom
claude/drift-1482-api-postgres-private-endpoint

Conversation

@sdairs

@sdairs sdairs commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Fixes #1482. API PR 2 of 2, stacked on the roles API PR. CLI exposure follows in #1485.

  • Four beta methods: postgres_private_endpoint_get, _post, _patch and _delete. Operation descriptors are regenerated, and the four are added to BETA_OPERATIONS (regenerated; DEPRECATED_FIELDS unchanged).
  • Models:
    • PostgresPrivateEndpoint and PostgresPrivateEndpointPort: response only, all Option.
    • PostgresPrivateEndpointPostRequest and PostgresPrivateEndpointPatchRequest: all Option.
    • The split pair PostgresPrivateEndpointVpcEndpoint (strict vpc_endpoint_id) and PostgresPrivateEndpointVpcEndpointResponse, with TryFrom for writing a fetched list back. The PATCH replaces each list in full, and the CLI PR (cloud postgres private-endpoint: manage Postgres AWS private endpoints #1485) is the read-modify-write caller.
  • Analyzer: PostgresPrivateEndpointPostRequest joins optional_request_schemas. It has no required[] and no "Optional" description, so the fallback marks supportedRegions required. But the operation does not require a body, and the field needs cross-region private endpoints, which most organizations do not have. Not yet confirmed against the live API.
  • Tests:
    • wiremock coverage for each method, including the 404 before create, an empty create body and a PATCH that omits unset lists;
    • model strictness and TryFrom;
    • facade paths.
  • Live Postgres suite: a non-blocking private endpoint phase (get 404, create, wait for available, patch empty lists, delete). It runs only on AWS with CLICKHOUSE_CLOUD_POSTGRES_PRIVATE_ENDPOINT set, because the feature is per organization and creation adds 5 to 10 minutes. This is documented in docs/development.md, but the workflow is not wired up.

spec_coverage_test passes from here, and the live drift dry-run reports no #1482 findings.

🤖 Generated with Claude Code


Note

Low Risk
Additive API surface with thorough tests; live private-endpoint flows are gated and non-blocking, with no changes to existing Postgres operations.

Overview
Adds beta support for managing AWS private endpoint services on Postgres instances through four new Client methods: postgres_private_endpoint_get, _post, _patch, and _delete. Operation metadata and BETA_OPERATIONS are regenerated accordingly.

New request/response models cover endpoint state, ports, supported regions, and approved VPC endpoints. PATCH list fields (allowed_vpc_endpoints, supported_regions) replace existing values in full; a TryFrom on VPC endpoint responses supports read-modify-write. PostgresPrivateEndpointPostRequest is exempted in the OpenAPI analyzer so supported_regions stays optional (orgs without cross-region private endpoints can send an empty body).

Coverage includes wiremock tests per method, model/facade tests, an opt-in live integration phase (AWS + CLICKHOUSE_CLOUD_POSTGRES_PRIVATE_ENDPOINT), and changelog/docs updates.

Reviewed by Cursor Bugbot for commit 26231a6. Bugbot is set up for automated code reviews on this repo. Configure here.

Adds the four beta `postgresPrivateEndpoint*` operations as
`postgres_private_endpoint_{get,post,patch,delete}`, their models
(`PostgresPrivateEndpoint`, `PostgresPrivateEndpointPort`, the post and
patch requests, and the split `PostgresPrivateEndpointVpcEndpoint` /
`PostgresPrivateEndpointVpcEndpointResponse` pair with a `TryFrom`
write-back), the operation descriptors and the Beta list entries.
`PostgresPrivateEndpointPostRequest` is listed as an optional request
schema: its only field needs a feature most organizations lack.

The live Postgres suite gains a private endpoint phase, gated on AWS and
`CLICKHOUSE_CLOUD_POSTGRES_PRIVATE_ENDPOINT`.

Fixes #1482

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdairs
sdairs requested a review from iskakaushik as a code owner November 17, 2026 17:08
@sdairs
sdairs added this pull request to stack #1483 November 17, 2026 17:08

This branch has not been deployed

No deployments
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.

OpenAPI drift: 32 gaps between live spec and library

1 participant