Skip to content

ci: run the upstream SQL tests on a pull request with the tests:run-core-sql label - #625

Open
polyglotAI-bot wants to merge 1 commit into
masterfrom
polyglot/core-sql-tests-label
Open

polyglotAI-bot wants to merge 1 commit into
masterfrom
polyglot/core-sql-tests-label

Conversation

@polyglotAI-bot

@polyglotAI-bot polyglotAI-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

upstream-sql-tests.yml (the core SQL test harness, #621) runs nightly, by hand, and on pull requests that change the harness, the workflow, or the library (clickhouse/, contrib/, cmake/, CMakeLists.txt). Other pull requests, for example a change of the docs or of another workflow, do not start it. This PR adds the tests:run-core-sql label, which runs the harness on any pull request, as in ClickHouse/clickhouse-cs#749.

  • New workflow upstream-sql-tests-label.yml: it starts on pull_request labeled, calls upstream-sql-tests.yml (uses: ./…) 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 line. 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). Only the remove-label job has pull-requests: write; the called jobs get contents: read, the same as the top-level permissions of upstream-sql-tests.yml.
  • 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 pull request started.
  • tests/clickhouse-test-runner/README.md (CI) documents the label. tests/clickhouse-test-runner/AGENTS.md does not change: a client fix (rule 2) changes clickhouse/, so it already starts the workflow.

The label exists in the repository now.

Checklist

  • actionlint 1.7.12 on both workflow files: no findings. zizmor 1.29.0 on the new file: no findings. The new workflow adds no high-severity finding to .github/workflows/.
  • The label run on this pull request passes and removes the label: run 44557796628 (build and unit tests, native × 8 shards: all passed; then Remove the tests:run-core-sql label). The path-triggered run of the same pull request (run 44557786370) ran at the same time and was not cancelled.

🤖 Generated with Claude Code

…ore-sql label

upstream-sql-tests.yml starts only on pull requests that change the
harness, the workflow or the library. A new workflow,
upstream-sql-tests-label.yml, calls it on any pull request when a
maintainer adds the tests:run-core-sql label, and then removes the label.

The `paths` filter of the pull_request trigger also applies to a `labeled`
event, so the label needs a workflow of its own; upstream-sql-tests.yml
gets a workflow_call trigger and no other change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@polyglotAI-bot
polyglotAI-bot requested review from a team and slabko as code owners November 19, 2026 15:42
@polyglotAI-bot polyglotAI-bot added the tests:run-core-sql Run the ClickHouse core SQL tests (upstream-sql-tests.yml) on this PR (removed after the run) label Nov 19, 2026
@github-actions github-actions Bot removed the tests:run-core-sql Run the ClickHouse core SQL tests (upstream-sql-tests.yml) on this PR (removed after the run) label Nov 19, 2026
@security-ai-gate-reviewer

Copy link
Copy Markdown

AI review gate — auto-approval withheld

The AI review gate is green, but the approver did not approve 51bf91ca: it changes paths that always require a human reviewer: .github/workflows/upstream-sql-tests-label.yml, .github/workflows/upstream-sql-tests.yml (commit 51bf91c has no verified signature; commit 51bf91c has no verified signature).

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)

  • 51bf91ca4879 withheld — it changes paths that always require a human reviewer: .github/workflows/upstream-sql-tests-label.yml, .github/workflows/upstream-sql-tests.yml (commit 51bf91c has no verified signature; commit 51bf91c has no verified signature)

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.

1 participant