Skip to content

Add a tests:run-core-sql label that runs the upstream SQL tests on a pull request - #1237

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

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

Conversation

@polyglotAI-bot

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

Copy link
Copy Markdown
Collaborator

Summary

upstream-sql-tests.yml (the core SQL test harness, #1223) runs nightly, manually, and on pull requests that change the harness or the workflow. A pull request that changes only the client does not start it. This PR adds the tests:run-core-sql label, which runs the harness on any pull request. The same label exists in clickhouse-cs (ClickHouse/clickhouse-cs#749, merged).

  • New upstream-sql-tests-label.yml: on a pull_request labeled event with the label tests:run-core-sql, it calls upstream-sql-tests.yml and then removes the label. To run the tests again, add the label again. A second workflow is necessary because the paths filter of the pull_request trigger also applies to a labeled event.
  • upstream-sql-tests.yml gets a workflow_call: trigger. Nothing else changes in it.
  • 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 remove-label skips forks (the README says to remove it by hand). Only the separate remove-label job gets pull-requests: write.
  • The label run has its own concurrency group (github.workflow is the name of the calling workflow), so a push to the same pull request does not cancel it.
  • The harness README (CI) documents the label. The harness AGENTS.md does not change: a client fix for a harness finding changes allowlist.txt, so it already starts the workflow.

The label exists in the repository now. No changelog entry: CI only, no change to the client.

Checklist

  • actionlint 1.7.12: no findings except the runner label ubuntu-26.04, which this actionlint version does not know (it reports the same for upstream-sql-tests.yml on main). zizmor 1.29.0: no findings on the new file; on upstream-sql-tests.yml the same 5 findings as on main.
  • The label run on this pull request runs the harness jobs and removes the label: run 44846311162 (10 shards: all passed; then Remove the tests:run-core-sql label). The path run of the same pull request (44846270641) ran at the same time, passed, and was not cancelled.

🤖 Generated with Claude Code


Note

Low Risk
CI and documentation only; no application code, secrets, or client behavior changes.

Overview
Adds a tests:run-core-sql PR label so maintainers can run the curated ClickHouse upstream SQL harness on pull requests that would not otherwise trigger it (for example client-only changes).

A new upstream-sql-tests-label.yml workflow listens for pull_request labeled events, invokes the existing test workflow via workflow_call, and runs a follow-up job to delete the label when the run finishes (re-add the label to test a later push). Label removal is skipped for fork PRs because the read-only token cannot write; the harness README notes manual removal there. The test workflow job keeps contents: read only; pull-requests: write is isolated in the remove-label job.

upstream-sql-tests.yml gains a workflow_call trigger (plus a short comment); other triggers are unchanged. The harness README CI section documents the label workflow.

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

…pull request

upstream-sql-tests.yml runs nightly, manually, and on pull requests that change
the harness or the workflow. A pull request that changes only the client does
not start it.

- upstream-sql-tests-label.yml starts on a pull_request `labeled` event. When
  the label is tests:run-core-sql, it calls upstream-sql-tests.yml and then
  removes the label. A second workflow is necessary because the `paths` filter
  of the pull_request trigger also applies to a `labeled` event.
- upstream-sql-tests.yml gets a workflow_call trigger. Nothing else changes.
- 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 (CI) documents the label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@polyglotAI-bot
polyglotAI-bot requested a review from a team as a code owner November 21, 2026 00:48
@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 21, 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 21, 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 40d89226: it changes paths that always require a human reviewer: .github/workflows/upstream-sql-tests-label.yml, .github/workflows/upstream-sql-tests.yml (commit 40d8922 has no verified signature; commit 40d8922 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)

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

This branch has not been deployed

No deployments
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