Repository navigation
ci: run the upstream SQL tests on a pull request with the tests:run-core-sql label - #749
Merged
Merged
Conversation
…ore-sql label upstream-sql-tests.yml runs only for pull requests that change the harness or the workflow. The paths filter of its pull_request trigger also applies to a labeled event, so a label cannot start it. The new workflow upstream-sql-tests-label.yml starts on the labeled event, calls upstream-sql-tests.yml through a new workflow_call trigger, and removes the label when the run ends, as the tests:run-cloud label does. It uses pull_request, not pull_request_target: the tests need no secrets, and the code of a fork runs with a read-only token. That token cannot remove the label, so the job skips forks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
polyglotAI-bot
requested review from
a team and
alex-clickhouse
as code owners
November 19, 2026 15:29
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The label-triggered SQL test workflow changes have no active review issues.
No open issues 🎉
What changed in this PR
This PR adds an on-demand CI trigger for the upstream SQL test harness, so client-only pull requests can test both the HTTP and native TCP clients. It does not change client code.
Changes:
- Add a
tests:run-core-sqllabel workflow that calls the existing harness workflow. - Enable reusable workflow calls and remove the label after same-repository runs.
- Document reruns and manual label removal for fork pull requests.
| File | Description |
|---|---|
tests/clickhouse-test-runner/README.md |
Explain label-triggered runs, reruns, and fork handling. |
tests/clickhouse-test-runner/AGENTS.md |
Document use of the label to check client fixes. |
.github/workflows/upstream-sql-tests.yml |
Add the reusable workflow_call trigger. |
.github/workflows/upstream-sql-tests-label.yml |
Add label-triggered harness execution and label cleanup. |
Review effort: Balanced
ccoltx
approved these changes
Nov 19, 2026
AI review gate — Human approval in place of AI reviewApproved on the head commit by ccoltx (write access, not the author), standing in for the AI review:
What to do:
Evaluated at |
This was referenced Nov 19, 2026
ccoltx
pushed a commit
to ClickHouse/clickhouse-js
that referenced
this pull request
Nov 19, 2026
…bel (#1163) ## Summary `upstream-sql-tests.yml` (the core SQL test harness) runs nightly, by hand, and on pushes and PRs that change `tests/clickhouse-test-runner/**` or the workflow. A PR that changes only a client does not start it. This PR adds the `tests:run-core-sql` label, which runs the harness on any PR, as `tests:run-cloud` does for the Cloud tests. - New workflow `upstream-sql-tests-label.yml`: it starts on `pull_request` `labeled`, calls `upstream-sql-tests.yml` (`uses: ./.github/workflows/upstream-sql-tests.yml`) when the label is `tests:run-core-sql`, and then removes the label. To run the tests again, add the label again. - `upstream-sql-tests.yml` gets a `workflow_call:` trigger and one header comment. Nothing else changes in it. A second workflow is necessary because the `paths` filter of the `pull_request` trigger also applies to a `labeled` event. - The trigger is `pull_request`, not `pull_request_target`: the tests need no secrets, and the code of a fork runs with a read-only token. That token cannot remove the label, so the `remove-label` job skips forks (the README says to remove the label by hand there). - The calling job has `permissions: {}`, the same as the top-level `permissions` of `upstream-sql-tests.yml`. Only the separate `remove-label` job gets `pull-requests: write`, so the PR code never runs with a token that can write. - In a called run, `github.event.inputs.upstream_ref` is empty, so the pinned `UPSTREAM_REF` applies. - The label run has its own concurrency group (`github.workflow` is the name of the calling workflow), so it does not cancel a run that a push to the same PR started. - The harness `README.md` (CI) documents the label. The label exists in the repository now. The same label and workflow are in ClickHouse/clickhouse-cs#749. No changelog entry: CI only, no change to a package. ## Checklist - [x] Prettier 3.9.10 (`prettier --check` on the changed files), actionlint 1.7.12 (both workflows: no findings), zizmor 1.29.0 (new workflow: no findings). - [x] The label run on this PR passes and removes the label: [run 44557508132](https://github.com/ClickHouse/clickhouse-js/actions/runs/44557508132) (`{passthrough, rowbinary} × 10` shards: all passed; then `remove-label`). The path-triggered run of the same PR ([run 44557496068](https://github.com/ClickHouse/clickhouse-js/actions/runs/44557496068)) ran at the same time, was not cancelled, and passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Polyglot AI <293096396+polyglotAI-bot@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
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.
Summary
upstream-sql-tests.yml(the core SQL test harness, #747) runs nightly, by hand, and on pull requests that change the harness or the workflow. A pull request that changes only a client does not start it. This PR adds thetests:run-core-sqllabel, which runs the harness on any pull request, astests:run-clouddoes for the Cloud tests.upstream-sql-tests-label.yml: it starts onpull_requestlabeled, callsupstream-sql-tests.yml(uses: $/…, the commit that runs) when the label istests:run-core-sql, and then removes the label. To run the tests again, add the label again.upstream-sql-tests.ymlgets aworkflow_call:trigger. Nothing else changes in it. A second workflow is necessary because thepathsfilter of thepull_requesttrigger also applies to alabeledevent.pull_request, notpull_request_target: the tests need no secrets, and the code of a fork runs with a read-only token. That token cannot remove the label, so theremove-labeljob skips forks (the README says to remove the label by hand there).github.workflowis the name of the calling workflow), so it does not cancel a run that a push to the same pull request started.README.md(CI) andAGENTS.md(rule 2: check a client fix with the label) document the label.The label exists in the repository now.
No changelog fragment: CI only, no change to a client.
Checklist
./instead of$/, which actionlint does not know yet; it reports the same fortests-cloud-tcp-label.ymlonmain) and zizmor 1.29.0 (high severity on the merge tree, aszizmor.ymldoes: no findings; all severities on the new file: no findings).{http, tcp} × 8shards: all passed; thenRemove the tests:run-core-sql label). The path-triggered run of the same pull request ran at the same time and was not cancelled.🤖 Generated with Claude Code
Note
Low Risk
CI-only workflow and documentation changes; no client or harness runtime behavior changes.
Overview
Adds a
tests:run-core-sqllabel path so maintainers can run the upstream SQL harness on pull requests that do not touch the test runner (e.g. client-only fixes).A new
upstream-sql-tests-label.ymllistens forpull_requestlabeledevents, reusesupstream-sql-tests.ymlviaworkflow_call, and runs a separateremove-labeljob so the test job keeps read-only permissions. Fork PRs still run tests but skip automatic label removal.upstream-sql-tests.ymlgains aworkflow_calltrigger only.README.md(CI) andAGENTS.md(rule 2) document when and how to apply the label.Reviewed by Cursor Bugbot for commit 6897a75. Bugbot is set up for automated code reviews on this repo. Configure here.