Repository navigation
Revert "Revert "Make LLVM coverage opt-in in pull requests, run the same configurations on arm_binary"" - #123790
Conversation
…ame configurations on arm_binary""
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Workflow [PR], commit [17cc1c3] Summary: ✅ AI ReviewSummaryThis PR restores the PR-side replacement for the always-on LLVM coverage lanes: unlabeled pull requests run the equivalent Findings
Final Verdict
|
…ryVisitor `ApplyWithSubqueryVisitor` registered as a substitutable literal only the alias of a direct `WITH` child, so in `WITH tuple([7] AS nested) AS wrapper` it registered `wrapper` but not `nested`. A nested `SELECT` using `7 IN nested` then kept the identifier, and the full `AddDefaultDatabaseVisitor` traversal, which treats every name left in place as a table, qualified it as `<db>.nested`. A view, a materialized view, `MODIFY QUERY` and `ALTER TABLE ... UPDATE` with that shape read a same-named table instead of the alias, or failed with `UNKNOWN_IDENTIFIER` (reproduced on 26.8.2.7 and 26.3.33.24). The narrow pass that repairs a definition after SQL UDF expansion already takes the aliases at any depth of a `WITH` expression, not inside a lambda or a subquery, like the analyzer. A `Replicated` database writes that repaired text into the DDL log and every replica processes it again through the full pipeline, which re-qualified the alias. This made `05237_with_expression_alias_scope_descendant` fail on every run under `--replicated-database`. Register every such alias right after the expression is visited, as the direct child's alias was before, so it is inlined (`7 IN ([7] AS nested)`) the way a top-level alias has been since #100042. The rule now lives in one helper, `ApplyWithSubqueryVisitor::forEachWithExpressionAlias`, which the narrow pass also calls. The test gets back the mutation arms removed in the #114908 rework, each on its own row, and a hand-written view arm. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y are visited An alias inherited from an enclosing `WITH` was substituted even into a nested select that declares the same alias itself, where the analyzer resolves the local one. A non-CTE `WITH` child was visited as a whole before its aliases were registered, so a later part of the same expression did not see one. Test arms: a materialized view and `MODIFY QUERY`, a later part of the same `WITH` expression, and nested selects that shadow a descendant or a top-level alias. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…TH` alias A nested select's `ARRAY JOIN` and `JOIN ... ON` aliases were not counted as its own, so an inherited alias still replaced them. A lambda body got the inherited aliases unchanged, so one was substituted over a lambda parameter or a body alias of the same name. Add a stack check to the recursive alias walk. Test arms: `ARRAY JOIN`, `JOIN ... ON`, a lambda parameter and a lambda-body alias that bind the same name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The analyzer puts the aliases inside a table function's arguments into the select scope, so `ApplyWithSubqueryVisitor` now counts them among a nested select's own aliases, and `AddDefaultDatabaseVisitor::collectAliases` descends into those arguments (not into the table alias) so the dropped name stays bare. Both must change together, otherwise the name is either inlined or qualified as a table. 05237 gains a table function shadow arm. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The analyzer stops collecting aliases at a lambda, also inside a table function argument, but `collectAliases` walked into it there. A lambda-body alias then left an unrelated table name bare in a stored view, so the view read that name from the reader's current database. Take the argument aliases with `forEachExpressionAlias`, as the visitor does. Adds a test arm read through `USE system`, and moves the own-alias scan above the comment that describes the `scope_data` block. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drop a comment that restates its call and shorten the visitWithExpression comment to one line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes12 object files changed (+37.29 KiB total), 0 added.
719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units23 translation units recompiled, 184 s compile time in total, 23 of them have a recent master baseline. |
… `find_tests.py` to the pipeline paths A pull request changing the code that only the LLVM coverage jobs run (collection, merge, diff report) now runs those jobs as if it had the `ci-coverage` label, and skips their `arm_binary` replacements, since the replacements do not exercise that code. `ci/jobs/scripts/find_tests.py` narrows the `arm_binary` replacement jobs down to the batches containing a changed test, so a change to it now runs those jobs too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=123790&sha=623eb9f55ca9aa826d7ccf9c6e070ee2a5e19729&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29 ( The |
It failed intermittently in the `ParallelReplicas` lane: `timeSeriesTags` returned its rows twice, the same TimeSeries bug as the five tests tagged in 8d824dc (#118130, fix #118518). Report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=123790&sha=623eb9f55ca9aa826d7ccf9c6e070ee2a5e19729&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29
|
No separate PR from me: 69d620b in this PR already adds the |
…age pipeline path A pull request that only regenerates the workflow file changes the `needs` / `if` wiring of the coverage jobs and their `arm_binary` replacements, so it must not skip them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With parallel replicas the reads happen in the queries of other replicas, so the `ColumnsCache` hit and miss events are missing from the initiator's `query_log` entry. The `ParallelReplicas` configuration on `arm_binary` added by this PR exposes it. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=123790&sha=69d620b19ab28561a9b729590904256aada6a2fb&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20sequential%29 #123790 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 Merged |
| # The part of `_COVERAGE_PIPELINE_PATHS` used only by the LLVM coverage jobs: collecting, | ||
| # merging and reporting the coverage. The `arm_binary` replacement jobs do not run this code, | ||
| # so a pull request changing it runs the LLVM coverage jobs as if it had the `ci-coverage` label. | ||
| _LLVM_COVERAGE_ONLY_PATHS = ( |
There was a problem hiding this comment.
This new _LLVM_COVERAGE_ONLY_PATHS split is still too narrow for the "coverage-code changes auto-run real coverage" contract.
A PR that changes only ci/jobs/unit_tests_job.py, ci/jobs/functional_tests.py, or ci/jobs/integration_test_job.py still skips Unit tests (amd_llvm_coverage), the amd_llvm_coverage shards, and LLVM Coverage, and runs only the arm_binary replacements instead. I verified that with should_skip_job using changed_files = ['ci/jobs/unit_tests_job.py']: the coverage jobs return Skipped: pull requests run LLVM coverage only..., while the replacement jobs run.
That means LLVM-specific branches such as the *.profraw merge/publish paths in those runner files are no longer exercised unless someone remembers to add ci-coverage manually. Please either factor the LLVM-only helpers into dedicated modules and list those here, or treat these runner files as coverage-only triggers too.
There was a problem hiding this comment.
🕵 Agreed. Commit 955a0f5 adds ci/jobs/functional_tests.py, ci/jobs/integration_test_job.py and ci/jobs/unit_tests_job.py to _LLVM_COVERAGE_ONLY_PATHS, because their *.profraw collect/merge branches only run in the coverage jobs. With that change, _has_llvm_coverage_only_changes returns true for each of them. I could not push it here: the PR is in the merge queue (enqueued 2026-10-08T21:43:21Z), and GitHub refuses updates to queued branches. The commit is on branch continue-pr-123790-coverage-runners. It goes into this PR if the PR is dequeued, or into a small follow-up PR once this one merges.
…-parallel-replicas` The initiator reads only the granules assigned to it, so the `ReadCompressedBytes` comparison is not deterministic. Related: #124607 Related: #124015 CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=123790&sha=e3311dd605c48cd7d2114577030075216c63abcf&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29
… build Master no longer builds `amd_llvm_coverage` or runs the LLVM coverage functional, integration and unit test jobs, the `excluded_from_llvm` integration job and the `LLVM Coverage` report job. The `DBReplicated`, `ParallelReplicas` and `AsyncInsert` stateless configurations and the full integration run now use the `arm_binary` jobs defined by ClickHouse#123790, so master runs the same configurations as pull requests. Related: ClickHouse#124015
ClickHouse#123711 fixed ClickHouse#123993, which ClickHouse#123790 tagged the test `no-parallel-replicas` for. Co-Authored-By: Claude Opus 5.5 <[email protected]>
On the s3-storage stateless lanes all temporary data goes into cached_s3 (temporary_data_in_cache). The cache has no cache_policy, so it uses the default SLRU with slru_size_ratio 0.6, and new (temporary) file segments can only use the probationary share: 40% of max_size, i.e. 2 GiB of 5Gi. Segments that are being written are not evictable, so every concurrent spill of a parallel run shares a hard 2 GiB pool while the protected 3 GiB stays unused for them. With the ParallelReplicas lane settings 04033_tpc_ds_q04 spills 1.55 GiB and 04033_tpc_ds_q11 0.71 GiB (failing jobs' query_log); whichever of the two reserves past 2 GiB first fails with NOT_ENOUGH_SPACE "for temporary file: reason cannot evict enough space ... Ephemeral hold 2.00 GiB". They started overlapping when ClickHouse#123790 moved the ParallelReplicas + s3 configuration from amd_llvm_coverage (q04 skipped there) to arm_binary. 10Gi gives a 4 GiB probationary pool; the sum of every test's maximum spill in the failing jobs is about 3.5 GiB. Same knob as ClickHouse#95103. Validated with a master build, local MinIO and two configs that differ only in this file: a 2.45 GiB GROUP BY spill fails 3/3 on 5Gi and passes 3/3 on 10Gi (on 10Gi it fails at exactly 4.00 GiB); q04 + q11 run together failed 12/20 on 5Gi and passed 20/20 and 100/100 on 10Gi. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #122853
Related: #123789
Related: #124021
Related: #123657
Related: #124015
Changelog category (leave one):
Description
This brings back #122853 (reverted in #123789): pull requests run LLVM coverage only with the
ci-coveragelabel and run the same configurations onarm_binaryby default.What happened:
05237_with_expression_alias_scope_descendant, which fails when a view definition is replayed from the DDL log of aReplicateddatabase: an alias declared inside aWITHexpression is qualified as a table name.DBReplicatedconfigurations only asamd_llvm_coverage, which does not randomize settings, and the test passed there. After it,Stateless tests (arm_binary, s3 storage, DBReplicated, parallel, 1/2)failed this test on every pull request. The job does not run on master, so master stayed green.Changes compared to #122853:
WITHexpression alias bug is in its own pull request, Fix views and mutations treating an alias declared inside aWITHexpression as a table name #124021. Until it lands,05237_with_expression_alias_scope_descendantis taggedno-replicated-database.ParallelReplicasconfiguration are taggedno-parallel-replicas, each with the issue tracking its failure. The full list, including tests already fixed on master, is in Parallel replicas: tests failing in theParallelReplicasconfiguration (umbrella) #124015.parallel_replicas_local_planis randomized again except in theParallelReplicasconfiguration, the coverage and replacement jobs are not narrowed on CI-scripts-only pull requests, and more files count as coverage pipeline changes.ci-no-coveragewins overci-coverage, so with both labels thearm_binaryreplacement jobs still run.Workflow [PR]
Sync PR [sync-upstream/pr/123790]
Version info
26.10.1.1871-master(included in26.10and later)