Skip to content

Fix CI: drop unrecognized --print-time flag from upstream-sql-tests#708

Merged
peter-leonov-ch merged 13 commits into
mainfrom
copilot/fix-ci-errors-from-pr-707
May 9, 2026
Merged

Fix CI: drop unrecognized --print-time flag from upstream-sql-tests#708
peter-leonov-ch merged 13 commits into
mainfrom
copilot/fix-ci-errors-from-pr-707

Conversation

Copilot AI commented May 8, 2026

Copy link
Copy Markdown
Contributor

Fix CI errors from #707.

  • Remove --print-time from workflow + README example (it isn't a valid tests/clickhouse-test flag)
  • Remove unused clickhouse_version workflow_dispatch input from upstream-sql-tests.yml
  • Remove unused UPSTREAM_REF env var from upstream-sql-tests.yml
  • Install jinja2 in upstream-sql-tests.yml
  • Fix MaxListenersExceededWarning in client backend by replacing pipeline(result.stream, process.stdout, { end: false }) with for await (const chunk of result.stream) so no error/close listeners accumulate on stdout
  • Keep --trace-warnings enabled in tests/clickhouse-test-runner/bin/clickhouse so any future Node warnings include their stack traces in CI logs

Copilot AI and others added 4 commits May 8, 2026 13:48
Agent-Logs-Url: https://github.com/ClickHouse/clickhouse-js/sessions/082ff17d-204a-4d87-8da8-e9a080a4a54b

Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ClickHouse/clickhouse-js/sessions/082ff17d-204a-4d87-8da8-e9a080a4a54b

Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ClickHouse/clickhouse-js/sessions/082ff17d-204a-4d87-8da8-e9a080a4a54b

Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
@CLAassistant

CLAassistant commented May 8, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ peter-leonov-ch
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@peter-leonov-ch peter-leonov-ch marked this pull request as ready for review May 8, 2026 18:52
Copilot AI review requested due to automatic review settings May 8, 2026 18:52

Copilot AI left a comment

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.

Pull request overview

This PR fixes the failing upstream ClickHouse SQL test workflow by removing the unsupported --print-time flag, and (via included #707 commits) adds the upstream SQL test harness + CI workflow that runs a curated subset of upstream tests against @clickhouse/client.

Changes:

  • Remove the invalid --print-time argument from the upstream test invocation and documentation examples.
  • Add a runner helper script + allowlist file to run a curated set of upstream tests/clickhouse-test cases locally.
  • Add an upstream-sql-tests GitHub Actions workflow (matrix over backend impl + ClickHouse image tag) and document the harness in contributor docs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/clickhouse-test-runner/upstream-allowlist.txt Adds curated list of upstream tests to run.
tests/clickhouse-test-runner/scripts/run-upstream-tests.sh Adds helper script to build/run the harness against upstream checkout with allowlist + env defaults.
tests/clickhouse-test-runner/README.md Updates usage docs and examples (removes --print-time).
tests/clickhouse-test-runner/.gitignore Ignores .upstream/ directory used for upstream sparse checkout.
CONTRIBUTING.md Adds pointer to the upstream SQL test harness docs.
AGENTS.md Adds guidance/links for maintaining the upstream SQL test harness.
.github/workflows/upstream-sql-tests.yml Adds CI workflow to run upstream SQL tests matrix and upload artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/clickhouse-test-runner/README.md Outdated
Comment thread .github/workflows/upstream-sql-tests.yml Outdated
Comment thread .github/workflows/upstream-sql-tests.yml Outdated
Comment thread .github/workflows/upstream-sql-tests.yml Outdated
@codecov

codecov Bot commented May 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

peter-leonov-ch and others added 2 commits May 8, 2026 21:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ClickHouse/clickhouse-js/sessions/c4b5a2ac-1a65-4042-b329-b06304df0542

Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
@peter-leonov-ch

Copy link
Copy Markdown
Collaborator

@copilot fix this warning from CI: "WARNING: jinja2 not installed! Template tests will be skipped."

…ts warning

Agent-Logs-Url: https://github.com/ClickHouse/clickhouse-js/sessions/cc1e7775-1f5b-4741-af43-506e5799a6e5

Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>

Copilot AI commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix this warning from CI: "WARNING: jinja2 not installed! Template tests will be skipped."

Done in f1647cf — added a pip install jinja2 step before the test run so upstream clickhouse-test no longer skips template tests.

Comment thread .github/workflows/upstream-sql-tests.yml Dismissed
Comment thread .github/workflows/upstream-sql-tests.yml Dismissed
@peter-leonov-ch

Copy link
Copy Markdown
Collaborator

@copilot

Fix this error from CI by first adding --trace-warnings and then waiting for CI to finish

Reason: having stderror:  
(node:6532) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [SyncWriteStream]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6532) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [SyncWriteStream]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit

…gnose CI MaxListenersExceededWarning

Agent-Logs-Url: https://github.com/ClickHouse/clickhouse-js/sessions/a4242f5c-e468-42b8-94fc-88f9b528e41c

Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>

Copilot AI commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot

Fix this error from CI by first adding --trace-warnings and then waiting for CI to finish
...

Added --trace-warnings to the node invocation in tests/clickhouse-test-runner/bin/clickhouse in 6a7580a. Waiting for CI to surface the stack trace for the MaxListenersExceededWarning so I can pinpoint the leak.

…iteration over result.stream

Agent-Logs-Url: https://github.com/ClickHouse/clickhouse-js/sessions/523648aa-0fff-488b-ba63-722a358c2bfe

Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread tests/clickhouse-test-runner/src/backends/client.ts
Comment thread tests/clickhouse-test-runner/scripts/run-upstream-tests.sh
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@peter-leonov-ch peter-leonov-ch merged commit 4949fbd into main May 9, 2026
63 checks passed
@peter-leonov-ch peter-leonov-ch deleted the copilot/fix-ci-errors-from-pr-707 branch May 9, 2026 09:36
Copilot stopped work on behalf of peter-leonov-ch due to an error May 9, 2026 09:36
Copilot AI mentioned this pull request May 9, 2026
1 task
peter-leonov-ch added a commit that referenced this pull request May 9, 2026
## Summary

Continues #708 by growing
`tests/clickhouse-test-runner/upstream-allowlist.txt` from 1 to 36
upstream ClickHouse stateless SQL tests.

Each added test was verified to pass through the harness on both
backends (`client`, `http`) and both server matrix versions (`head`,
`latest`). Coverage spans:

- Basic `SELECT`, parser numerics, `reinterpretAsString`
- Array functions, `ARRAY JOIN`, nested columns, `arrayEnumerateUniq`
- `GROUP BY` / `WITH TOTALS` / `HAVING`, `DISTINCT` in subqueries
- `FixedString` conversions, higher-order function constants,
`argMin`/`argMax`
- `IN` / set, ORDER BY descending on (Fixed)String
- `ANY`/`ALL` `LEFT`/`INNER` joins on numbers, strings, mixed types

## Checklist

- [x] A human-readable description of the changes was provided to
include in CHANGELOG

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
peter-leonov-ch added a commit that referenced this pull request May 9, 2026
Continues #708 / #710 by growing
`tests/clickhouse-test-runner/upstream-allowlist.txt` from 36 → 424
entries through the Node.js harness, validated on both `client` and
`http` backends.

- [x] Set up upstream ClickHouse sparse checkout, install Python deps,
build the test runner, start ClickHouse via docker-compose
- [x] Verify the existing 36-test allowlist passes through the harness
on both `client` and `http` backends
- [x] Build the per-batch driver (add 100, run both backends with
`--no-stateful --no-long`, keep passers, drop failures and skips)
- [x] Run batches 1-6 (600 candidates evaluated; 342 passed on both
`client` and `http` backends and were kept; 257 failures and 1 skip
dropped); allowlist 36 → 378
- [x] Fix CI failures from prior commit: drop 54 entries from the
allowlist that either failed in the CI matrix (`{client,http} ×
{head,latest}`) or that act as **prefix matches** for failing tests
(clickhouse-test treats positional args as substring/prefix matches, so
e.g. `00396_uuid` was unintentionally pulling in the failing
`00396_uuid_v7`). Net: allowlist now 424 entries (+388 vs the pre-#710
baseline of 36)
- [x] Document the harness purpose and the batch-add strategy (including
the prefix-match gotcha) in `AGENTS.md` so future agent runs have the
context
- [x] PR ready for review

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
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.

5 participants