Skip to content

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

Merged
ccoltx merged 1 commit into
masterfrom
polyglot/core-sql-tests-label
Nov 19, 2026
Merged

ccoltx merged 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, #624) runs nightly, by hand, and on pull requests that change the harness or the workflow. A pull request that changes only the driver does not start it. This PR adds the tests:run-core-sql label, which runs the harness on any pull request.

  • New workflow upstream-sql-tests-label.yml: it starts on pull_request labeled, calls upstream-sql-tests.yml (uses: ./…, the merge commit of the pull request) 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. 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. The calling job has contents: read, as the top-level permissions: of upstream-sql-tests.yml. The fork token cannot remove the label, so the remove-label job (the only job with pull-requests: write) skips forks; the README says to remove the label by hand there.
  • 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.
  • README.md (CI) and AGENTS.md (rule 2: check a driver fix with the label) document the label.

The label exists in the repository now. The same label was added to clickhouse-cs (ClickHouse/clickhouse-cs#749).

No changelog entry: CI only, no change to the driver.

Checklist

  • actionlint 1.7.12 on both files: no findings. zizmor 1.29.0 on the new file: no findings. On upstream-sql-tests.yml, zizmor reports only unpinned-uses for the action tags that are already on master (the repo has no zizmor policy; this PR does not change those lines).
  • The label run on this pull request starts the harness jobs and removes the label: run 44557552321 (build, {odbcdriver2} × 4 shards, then Remove the tests:run-core-sql label: the label is gone). The path-triggered run of the same commit ran at the same time and was not cancelled: run 44557541061, all jobs passed.

Shard 1 of the label run failed on one allowlisted test, 03024_total_rows_approx_is_set_for_system_zeros_and_generate_random: SQLGetData(column 9 "c9"): ... Cannot interpret '-688190331020160616889455.0792753657544' as Decimal/Numeric: value is too big for internal representation. generateRandom() without arguments makes a random structure and random values, so the test sometimes gets a Decimal value over 2^64-1, which the known driver bug of the [numeric-64bit] group in allowlist.txt cannot read. The same shard passed in the path-triggered run of the same commit. The push run on master also failed shard 1, on another allowlisted test (run 44552680110, 05325_string_filters_columns_cache_guard). This PR changes no driver or harness code; the intermittent allowlist tests are a separate change.

🤖 Generated with Claude Code

…ore-sql label

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

The new workflow upstream-sql-tests-label.yml starts on a pull_request
`labeled` event, calls upstream-sql-tests.yml (new `workflow_call:`
trigger) when the label is tests:run-core-sql, 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.

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. The
remove-label job is a separate job with `pull-requests: write`, and it
skips forks (their token cannot write).

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:40
@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
@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 cedeb7f9: it changes paths that always require a human reviewer: .github/workflows/upstream-sql-tests-label.yml, .github/workflows/upstream-sql-tests.yml (commit cedeb7f has no verified signature; commit cedeb7f 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)

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

@ccoltx
ccoltx merged commit d05280c into master Nov 19, 2026
27 of 31 checks passed
@ccoltx
ccoltx deleted the polyglot/core-sql-tests-label branch November 19, 2026 18:46
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.

2 participants