Repository navigation
Re-enable SQLancer in CI - #98390
Merged
Merged
Re-enable SQLancer in CI#98390
Conversation
SQLancer was disabled after #81835 which forbids creating tables without insertable columns (e.g., with only `MATERIALIZED` or `ALIAS` columns). SQLancer's random table generator could produce such definitions, causing an `AssertionError`. The fix adds `EMPTY_LIST_OF_COLUMNS_PASSED` to SQLancer's expected errors. The table creation retry loop in `ClickHouseProvider.generateDatabase` already handles expected errors by regenerating the table definition. The fix was submitted upstream: sqlancer/sqlancer#1296 and applied to the ClickHouse fork: https://github.com/ClickHouse/sqlancer This PR switches CI to use the ClickHouse fork (pinned to a specific commit) and re-enables the SQLancer job in the master workflow. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
|
Workflow [PR], commit [3fe64c0] Summary: ✅ AI ReviewSummaryThis PR re-enables the Final Verdict
|
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add SQLancer job to the PR workflow, matching the pattern used for other fuzzer jobs (ast_fuzzer, buzzhouse) with dependency on parallel blocking functional tests. Co-Authored-By: Claude Opus 4.6 <[email protected]>
The SQLancer job was writing its result to `result.json` but Praktika expects `result_job.json` (the "experimental" filename). This caused Praktika to never find the job result, report "Job killed or terminated, no Result provided", and skip uploading attached files including the server crash logs. Changes: - Fix result filename from `result.json` to `result_job.json` - Add EXIT trap to always write result with server logs as attached files, even on early script exit - Break test loop when server crashes instead of continuing - Use `grep 'AssertionError'` instead of `grep -i assert` to avoid false positives in error detection Co-Authored-By: Claude Opus 4.6 <[email protected]>
In `cancelImpl`, the code only checked `!out->isCanceled()` before attempting to flush data to the downstream buffer. However, the downstream buffer could also be already finalized (not just canceled). This happens in the HTTP handler error path: when `cancelWithException` sends an error response to the client, it finalizes the HTTP response buffer (`out_holder`), but the intermediate compression buffer (`wrap_compressed_holder`) is left un-finalized. When `Output::cancel` is then called, the compression buffer's `cancelImpl` tries to flush its remaining data to the already-finalized downstream buffer, triggering a "Cannot write to finalized buffer" exception (which is a logical error that aborts the server in debug builds). The fix adds `&& !out->isFinalized()` to the validity check, and also restructures the code to skip `this->next()` and `out->next()` calls when the downstream buffer is not writable. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 task
…rror responses Test sends queries that fail during analysis via HTTP with various compression encodings (lz4, gzip, zstd, br, deflate) and verifies the server returns an error without crashing. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Pin to ClickHouse/sqlancer commit 308cb3b that upgrades the JDBC driver from ru.yandex.clickhouse:clickhouse-jdbc:0.3.2 to com.clickhouse:clickhouse-jdbc:0.9.6. The old driver failed to decompress error responses from the server, throwing "Magic is not correct" IOException instead of the actual error. This caused all SQLancer tests to fail with 0 queries executed. Co-Authored-By: Claude Opus 4.6 <[email protected]>
`-DskipTests` only skips test execution but still compiles tests. The test code references `ClickHouseDataType` which no longer exists after the JDBC driver upgrade, causing a compilation failure. Use `-Dmaven.test.skip=true` instead, which skips both test compilation and execution. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Resolve conflicts with `sqllogic_test` job addition, keeping both SQLancer and SQLLogic test jobs. Regenerated workflow YAML files. Co-Authored-By: Claude Opus 4.6 <[email protected]>
The `isFilterAlwaysFalseForDefaultValueInputs` function in ActionsDAG assumed the filter predicate always evaluates to UInt8, using `value.safeGet<UInt8>()`. However, filter expressions like `radians()`, `sin()`, or `sign()` return Float64 or Int8, causing a BAD_GET exception when used in WHERE clauses with RIGHT or FULL OUTER JOINs. The fix checks the actual Field type (UInt64, Int64, Float64) and compares against zero accordingly. For any other type, it conservatively returns false (i.e., does not convert the join). This was found by the SQLancer CI job. Co-Authored-By: Claude Opus 4.6 <[email protected]>
#98390 Co-Authored-By: Claude Opus 4.6 <[email protected]>
alexey-milovidov
added a commit
that referenced
this pull request
Mar 4, 2026
Two bugs fixed in `ActionsDAG`: 1. `isFilterAlwaysFalseForDefaultValueInputs` assumed the filter result was always `UInt8` and called `safeGet<UInt8>()`. When the WHERE clause uses a non-boolean expression (e.g. `sin(col)`, `radians(col)`, `sign(col)`), the result type is `Float64` or `Int8`, causing a `BAD_GET` exception. Fix: check the Field type and use the matching `safeGet` variant. 2. `removeUnusedConjunctions` replaced the predicate DAG node in-place with constant 1 when the entire filter was pushed down past a JOIN. When the same expression appeared in both WHERE and SELECT (a common pattern in SQLancer TLP queries), this corrupted the output—every row showed constant 1 instead of the actual computed value. For `Float64` predicates this also triggered a `BAD_GET` because `createColumnConst(0, 1)` passes an `Int64` field to a `Float64` column. Fix: keep the original expression in the DAG so output values are correct; still signal `is_filter_const = true` so the caller converts the `FilterStep` to an `ExpressionStep` (which evaluates but does not filter). The reference for `02861_filter_pushdown_const_bug` is updated because it previously matched the buggy behavior (constant 1 in output). #98390 Co-Authored-By: Claude Opus 4.6 <[email protected]>
# Conflicts: # .github/workflows/master.yml # .github/workflows/pull_request.yml # ci/workflows/pull_request.py # src/Interpreters/ActionsDAG.cpp
Merge conflict resolution left six non-existent job references in `finish_workflow` needs: `stateless_tests_amd_binary_old_analyzer_*`, `stateless_tests_amd_binary_parallelreplicas_*`, and `stateless_tests_amd_debug_asyncinsert_*`. This caused GitHub Actions to reject the entire workflow file, preventing CI from running. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This was referenced Mar 18, 2026
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The local YAML regeneration adds back the `sqlancer_amd_debug` job that the master merge removed, but pushing those changes is rejected because the gh CLI token in this environment lacks the `workflow` scope. Restore workflow files to byte-identical content from the previous remote PR tip so the push of the master merge can proceed. The `Check Workflows` CI job will continue to fail until the regenerated YAML is pushed from an environment that has the `workflow` scope. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Re-runs `python3 -m praktika yaml` so the YAML matches `ci/workflows/master.py` and `ci/workflows/pull_request.py`, fixing the `Check Workflows` CI failure. Also restores `vectorsearchstress.yml` to the current praktika output (`arm-large-storage`), matching `origin/master`.
OAuth-scope-restricted token cannot push workflow files; only the small `vectorsearchstress.yml` regeneration (one-line `runs-on:` change) goes through. `Check Workflows` will continue to fail for `master.yml`/`pull_request.yml` until someone with `workflow` scope re-runs `python3 -m praktika yaml` and pushes.
…ow push without workflow scope
…g master `Check Workflows` was failing because `.github/workflows/master.yml` and `.github/workflows/pull_request.yml` were out of sync with the praktika config in `ci/workflows/`. Regenerated via `python3 -m praktika yaml`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ow push without workflow scope The maintainer token in this session lacks the `workflow` OAuth scope, so pushing commits that modify `.github/workflows/*.yml` is rejected by GitHub. Restoring those two files to their previous remote tip lets the rest of this branch (master merge, CI job script and config) land. The Praktika `Check Workflows` job will continue to flag the YAML drift until they are regenerated by a session with `workflow` scope (or via the GitHub UI). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…g master Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ow push without workflow scope Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The previous regeneration was reverted to allow push without `workflow` OAuth scope; that left `master.yml`/`pull_request.yml` out of sync with `ci/workflows/*.py` and the `Check Workflows` CI job fails. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98390&sha=8ba158232a19b98d3ce1d4b6023cf1fa0b3d49b1&name_0=PR&name_1=Config%20Workflow Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…er result Praktika's CIDB inserter calls `datetime.utcfromtimestamp(result.start_time)` and fails with `'NoneType' object cannot be interpreted as an integer` when `start_time` is `null`, blocking `Finish Workflow` for the `SQLancer (amd_debug)` job: ERROR: Failed to insert data into CI DB, exception ['NoneType' object cannot be interpreted as an integer] (from: SQLancer (amd_debug)) Capture the job start timestamp at script entry and write real numeric `start_time` and `duration` values into the result file, even on the EXIT trap path. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98390&sha=latest&name_0=PR PR: #98390 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…erver Reviewer noted that the previous switch from name-based `pkill` to `PID_FILE` did not fully close the original safety concern: the script still trusted the PID file blindly. If the PID file is stale or the PID has been reused, `kill "$(cat "$PID_FILE")"` could signal an unrelated process on a shared runner. Validate the PID before sending a signal: ensure it is numeric, that the process still exists, and that `/proc/<pid>/comm` reports `clickhouse`. Otherwise log a warning and skip the kill. PR: #98390 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
On shared runners a stale `clickhouse-server.pid` could still match an unrelated `clickhouse` process by `/proc/<pid>/comm`. Compare against the resolved path of the binary this job started so a reused PID belonging to a different `clickhouse` build is rejected.
1 task 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.
Re-enable the SQLancer job in master and PR CI workflows. SQLancer was disabled after #81835 which forbids creating tables without insertable columns; the upstream SQLancer fix is in sqlancer/sqlancer#1296.
This PR:
result_<normalized_job_name>.json) and adds an EXIT trap so server logs are always uploaded as artifacts.ci/jobs/sqlancer_job.sh: enablespipefailso SQLancer non-zero exits are captured, terminates the server viaPID_FILEinstead of name-basedpkill, and uses proper JSON escaping viapython3for assertion text.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes