Repository navigation
feat(cli): pgConfig GUCs, MongoDB structured ingestion mappings, saved-query GA (#1093) - #1094
Merged
Merged
Conversation
…d-query GA (#1093) - Accept the seven new pgConfig GUCs in Postgres config writes. - `clickpipe create mongodb --table-mapping-json` accepts `structuredIngestion`; name entries are trimmed and must be nonempty, and `excludedColumns`/`sortingKeys` must be unique. - Drop the `(Beta)` label from `cloud saved-query`. - Reference docs for ClickPipe mappings and saved queries. Workload identity auth for database ClickPipes is deliberately not exposed yet; see #1093. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iskakaushik
approved these changes
Oct 20, 2026
sdairs
added a commit
that referenced
this pull request
Oct 21, 2026
Query API endpoint lists return an array in `result`, with cursor
metadata on the response envelope. The client decoded a nested
`items`/`pagination` object instead, causing the scheduled Cloud
Integration lifecycle and CLI list/name lookups to fail with `invalid
type: map, expected a sequence`. A nonempty array is interpreted as
positional struct fields; `{"result":[{}]}` reproduces the exact CI
error at line 1, column 11.
Return `ApiResponse<Vec<PublicQueryApiEndpointListItem>>` from the
library and consume its envelope pagination in the lifecycle test. The
CLI adapts the response to its existing `items`/`pagination` output.
Existing command flags, requests, authentication and name-selection
safety checks are preserved. The legacy nested container remains
exported for callers that use it independently; the library README
documents the return-type migration.
The corrected client/model and subprocess fixtures cover nonempty and
empty arrays, sparse/null responses, envelope metadata, opaque cursors,
OAuth, multiple pages and unsafe name-selection failures.
Stacked directly above #1094 (`claude/drift-cli-1088`). Related release
acceptance: #757; this PR does not close that tracker.
This is separate from #1088: neither its current gap list nor the normal
dry-run at #1094 identifies the endpoint-list mismatch. The dry-run
still reports the same 27 remaining findings after this change; no
snapshot or analyzer policy is changed.
Validation:
- The corrected client regression failed with the old decoder and passes
with this fix.
- Passed formatting, both CLI Clippy configurations, telemetry-disabled
compilation, API/analyzer all-target Clippy and tests, and 96
Python/classifier tests.
- Full CLI tests: all targets passed except
`failed_fresh_start_preserves_postgres_identity_without_polluting_clickhouse_selection`,
which reports `docker_unavailable` because the local Docker socket is
absent. Endpoint subprocess and pagination/name-selection tests passed.
- Read-only live smoke: the installed client reproduced the original
decoding failure; the patched binary read two cursor pages and resolved
an endpoint by name. No SQL ran and no Cloud resources changed.
- The full provisioning lifecycle was not rerun.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Breaking return type for Rust callers of `query_api_endpoint_list`,
but behavior matches the live API and fixes list/name-resolution
failures; CLI output shape is preserved via an adapter layer.
>
> **Overview**
> Fixes Query API endpoint **list** decoding so the Cloud API client
matches the real wire shape: `result` is an endpoint array and
pagination lives on the envelope (`next_cursor`, `limit`,
`total_count`), not a nested `items`/`pagination` object. That mismatch
caused JSON decode failures (e.g. `expected a sequence`) for nonempty
lists in integration and CLI name lookups.
>
> **`query_api_endpoint_list`** now returns
`ApiResponse<Vec<PublicQueryApiEndpointListItem>>`;
`QueryApiEndpointListResponse` stays exported as a legacy helper type.
**clickhousectl** rebuilds `items`/`pagination` from the envelope so
human/JSON list output and `--cursor` behavior stay the same;
missing/null `result` now fails the command instead of printing an empty
list.
>
> Docs note envelope vs CLI pagination fields; client, model,
integration, and CLI subprocess tests use the corrected list envelopes
and multi-page cursors.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b84d7b9. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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.
Fixes #1093. CLI exposure for the #1088 drift; stacked on #1092.
cloud postgres: config writes acceptautovacuum_analyze_threshold,autovacuum_freeze_max_age,autovacuum_vacuum_insert_threshold,autovacuum_vacuum_threshold,checkpoint_timeout,shared_memory_percentandwal_buffers.cloud clickpipe create mongodb --table-mapping-jsonacceptsstructuredIngestion. Nested unknown fields are already rejected by the strict parser. Column, excluded-column, sorting-key and partition entries are trimmed and must be nonempty, andexcludedColumns/sortingKeysmust be unique (the spec'suniqueItems).cloud saved-query: the(Beta)label is gone, since the operations graduated.docs/reference/clickpipe-configuration.md(structured ingestion example) anddocs/reference/query-api.md.Not exposed:
SERVICE_ACCOUNT_WORKLOAD_IDENTITYfor Postgres/MySQL ClickPipes. The credential shape isn't specified and can't be verified here; reasoning in #1093.Tests: pgConfig unit test; Mongo structured-ingestion parsing (minimal, maximal and invalid cases); a wiremock request-shape test for the create body. Both clippy configurations are clean.
cargo test -p clickhousectlpasses except the Docker-dependentlocal_postgres_readiness_test(Docker was not running locally).🤖 Generated with Claude Code