Repository navigation
ci: run the upstream SQL tests on a PR with the tests:run-core-sql label - #1163
Conversation
The `paths` filter of the pull_request trigger of upstream-sql-tests.yml also applies to a `labeled` event, so a PR that changes only a client cannot start the harness. Add upstream-sql-tests-label.yml: on `pull_request` `labeled`, it calls upstream-sql-tests.yml (new `workflow_call:` trigger) when the label is `tests:run-core-sql`, and then removes the label, as `tests:run-cloud` does for the Cloud tests. Document the label in the harness README (CI). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the changes enabling label-triggered SQL test runs.
No open issues 🎉
What changed in this PR
Adds label-triggered runs of the upstream SQL test harness for PRs that do not match its existing path filters. Changes are limited to CI and documentation; package behavior and public APIs are unchanged.
Changes:
- Adds a
tests:run-core-sqllabel workflow that calls the existing harness. - Keeps test jobs without write permissions and isolates label removal in a separate job that skips fork PRs.
- Documents how to trigger runs again, including manual label removal for forks.
| File | Description |
|---|---|
tests/clickhouse-test-runner/README.md |
Documents label-triggered runs and fork handling. |
.github/workflows/upstream-sql-tests.yml |
Adds a reusable-workflow trigger and explanatory comment. |
.github/workflows/upstream-sql-tests-label.yml |
Adds the label trigger, harness call, and label cleanup job. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
AI review gate — auto-approval withheldThe AI review gate is green, but the approver did not approve What to do: ask someone with write access who is not the PR author to approve this pull request. History (latest 5 heads, newest first) |
Summary
upstream-sql-tests.yml(the core SQL test harness) runs nightly, by hand, and on pushes and PRs that changetests/clickhouse-test-runner/**or the workflow. A PR that changes only a client does not start it. This PR adds thetests:run-core-sqllabel, which runs the harness on any PR, astests:run-clouddoes for the Cloud tests.upstream-sql-tests-label.yml: it starts onpull_requestlabeled, callsupstream-sql-tests.yml(uses: ./.github/workflows/upstream-sql-tests.yml) 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 and one header comment. 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).permissions: {}, the same as the top-levelpermissionsofupstream-sql-tests.yml. Only the separateremove-labeljob getspull-requests: write, so the PR code never runs with a token that can write.github.event.inputs.upstream_refis empty, so the pinnedUPSTREAM_REFapplies.github.workflowis the name of the calling workflow), so it does not cancel a run that a push to the same PR started.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
prettier --checkon the changed files), actionlint 1.7.12 (both workflows: no findings), zizmor 1.29.0 (new workflow: no findings).{passthrough, rowbinary} × 10shards: all passed; thenremove-label). The path-triggered run of the same PR (run 44557496068) ran at the same time, was not cancelled, and passed.🤖 Generated with Claude Code