Skip to content

build(cli): package only crate sources in clickhousectl and classify ClickPipes live-test paths (#1442) - #1448

Merged
sdairs merged 1 commit into
claude/service-client-json-errorsfrom
claude/package-manifest-clickpipes-classifier
Nov 16, 2026
Merged

sdairs merged 1 commit into
claude/service-client-json-errorsfrom
claude/package-manifest-clickpipes-classifier

Conversation

@sdairs

@sdairs sdairs commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Why:

  1. live_clickpipe_postgres_cdc_test.rs and live_service_query_bind_test.rs live in crates/clickhousectl/tests/ (clickhouse-cloud-api carries tests that do not belong to it: CLI-driving live tests and AWS E2E dev-dependencies #1347) and reach into ../../clickhouse-cloud-api/tests/common/mod.rs via #[path]. Without an include filter in crates/clickhousectl/Cargo.toml, cargo publish -p clickhousectl bundles tests/, breaking cargo test --no-run and clippy --all-targets on the unpacked .crate.
  2. scripts/classify-cloud-integration.py mapped services/query*.rs to service for live_service_query_bind_test, but left the CLI files driven by live_clickpipe_postgres_cdc_test (cloud clickpipe create postgres) unmapped.

What:

  • Add include = ["src/**", "LICENSE"] to crates/clickhousectl/Cargo.toml (Cargo still bundles readme = "../../README.md" as README.md) and add a cargo package -p clickhousectl --list --locked check to .github/workflows/test-cli.yml.
  • Map src/cloud/clickpipes/{create.rs,destination.rs,table_mapping.rs,sources/mod.rs,sources/postgres.rs} to frozenset({"clickpipes"}) in scripts/classify-cloud-integration.py with unit tests.

QA: cargo package -p clickhousectl --list --locked and python3 -m unittest discover -s scripts/tests -p 'test_*.py'.

Risks: Low; packaging and CI classification only.

Closes #1442


Note

Low Risk
Changes affect crate packaging manifests, CI checks, and live-suite selection metadata only—no runtime CLI or API behavior.

Overview
Restricts the published clickhousectl crate to src/** and LICENSE (README still comes from the manifest) so cargo publish no longer bundles tests/, which would break downstream builds because live suites pull the API harness via #[path] outside the crate.

Test CLI workflow gains a cargo package --list gate that asserts required files are present and rejects anything outside an allowlist (src/, manifest metadata, LICENSE, README).

Cloud integration classification now maps the CLI cloud clickpipe create postgres code paths (clickpipes/{create,destination,table_mapping,sources/*}) to the clickpipes live suite, with unit tests and a short note in docs/development.md tying those sources to their live tests.

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

…ClickPipes live-test paths (#1442)

Restrict the published clickhousectl crate to src/** and LICENSE (Cargo
still adds the root README as README.md). The live tests include the API
library's harness through #[path] outside the crate, so shipping tests/
broke cargo test --no-run and clippy --all-targets on the unpacked crate.
Test CLI now checks the cargo package --list contents.

Map the CLI sources that live_clickpipe_postgres_cdc_test drives through
`cloud clickpipe create postgres` (create.rs, destination.rs,
table_mapping.rs, sources/mod.rs, sources/postgres.rs) to the clickpipes
suite, matching services/query.rs and query_key.rs for the service suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdairs
sdairs requested a review from iskakaushik as a code owner November 13, 2026 12:49
@sdairs
sdairs added this pull request to stack #1285 November 13, 2026 22:43

@iskakaushik iskakaushik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sdairs
sdairs merged commit 67fb66f into main Nov 16, 2026
21 of 22 checks passed
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.

build/ci: restrict clickhousectl crate package manifest and map ClickPipes CLI live-test paths

2 participants