Skip to content

Tag the tests that cannot run on a Replicated database with no-replicated-database - #121863

Merged
alexey-milovidov merged 2 commits into
masterfrom
tag-no-replicated-database-coverage-hidden
Sep 24, 2026
Merged

alexey-milovidov merged 2 commits into
masterfrom
tag-no-replicated-database-coverage-hidden

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Related: #112247
Related: #111561

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

Ten tests fail in every run of Stateless tests (amd_llvm_coverage, s3 storage, DBReplicated, parallel, 3/3) (and three more of the same dialect kind in shard 2/3) because they cannot run on a Replicated database. The failures stay hidden: the DIAGNOSTICS stage reruns failed tests without --replicated-database, the reruns pass, the tests get the flaky label, and llvm_coverage jobs turn flaky into OK. When one more, unrelated failure appears (here the one-off 04604_parallel_replicas_unsent_query_not_cancelled), the job has 11 failures, the stage is skipped as "Too many failed tests", and all of them surface at once:

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=371ca763d0d598f17a9df2f52d21b87e36bfd4c1&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%20s3%20storage%2C%20DBReplicated%2C%20parallel%2C%203%2F3%29

The job logs of neighbouring green master commits show the same set rerun every time (Running diagnostics for 9 test(s) / 10 test(s)), so the job was one flake away from red.

Each test gets a no-replicated-database tag with the reason:

  • 04498_database_max_tables, 05042_rename_full_database_error_order: moving tables between databases is not supported.
  • 03971_rename_tables_race_read_consistency: the chained exchange RENAME is not supported.
  • 04724_parallel_replicas_right_join_materialized_left_mv: CREATE ... POPULATE is not supported.
  • 05218_alter_reset_setting_implicit_indices: replicated and non-replicated ALTERs cannot be mixed in one query.
  • 04418_create_table_as_select_subquery_access: the fix under test only covers Atomic databases.
  • 05042_query_log_join_columns_more_cases: only its CREATE ... POPULATE case is incompatible (the DDL worker logs an extra row), so that case moves into the new 05243_query_log_join_columns_create_populate with the tag, and the rest of the file keeps running on Replicated databases.
  • 04283_sparsity_trivial_count_seq_consistency: explicit replicas of the same table in one database give different counts.
  • 05023_trino_conformance_tempto, 05019_trino_dialect, 05227_ast_json_constraint_argumentless_function_dialect, 05231_ast_json_storage_argumentless_function_dialect, 05235_alter_modify_setting_default_json_dialect: the DDL worker re-parses the DDL with the session dialect, so non-ClickHouse dialects break for DDL on Replicated databases. This is a real limitation that may deserve a separate fix.

The other shards of these jobs hide fewer tests the same way (6 in 1/3, 7 in 2/3, 1-2 in each sequential shard). #112247 fixes the underlying problem by passing the job's runner options to the rerun. This PR removes the known incompatibilities so the jobs don't turn red when it lands.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/121863]

Version info

  • Merged into: 26.10.1.619-master (included in 26.10 and later)

…licated-database`

These ten tests fail deterministically in every run of the `DBReplicated`
stateless jobs. The failures were hidden: the `DIAGNOSTICS` stage reruns failed
tests without `--replicated-database`, the reruns pass, the tests get the
`flaky` label, and `llvm_coverage` jobs turn `flaky` into `OK`. Once an eleventh,
unrelated failure appears, the stage is skipped as "Too many failed tests" and
all of them surface at once.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=371ca763d0d598f17a9df2f52d21b87e36bfd4c1&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%20s3%20storage%2C%20DBReplicated%2C%20parallel%2C%203%2F3%29

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ff09a80]

Summary: ✅


AI Review

Summary

This PR tags known stateless tests out of the --replicated-database jobs and splits the CREATE ... POPULATE case out of 05042 so the rest of that system.query_log coverage still runs. The remaining issue is that two Trino files now skip the whole replicated-database pass even though only their fixture DDL is incompatible, so the change still drops avoidable DBReplicated coverage.

Findings

⚠️ Majors

  • tests/queries/0_stateless/05019_trino_dialect.sql:1 The new no-replicated-database tag overstates the limitation. Only the CREATE TABLE / DROP TABLE around the INSERT round-trip block at lines 127-132 depends on replicated DDL under the Trino session dialect; the rest of the file is SELECT-only dialect coverage that can still run in DBReplicated jobs.
    Suggested fix: split the INSERT round-trip block into its own tagged test, or move the fixture CREATE / DROP TABLE outside SET dialect = 'trino'.

  • tests/queries/0_stateless/05023_trino_conformance_tempto.sql:1 This file-level tag drops the whole Tempto Trino suite from replicated-database coverage even though the actual incompatibility is only the fixture CREATE / DROP TABLE at lines 13-62 and 213-217. The query body between them is SELECT-only coverage over Memory tables.
    Suggested fix: create/drop the fixtures outside Trino mode, or split the DDL setup from the Trino query coverage so the replicated-database job still exercises the SELECT surface.

Final Verdict

Changes requested.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Sep 23, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clickhouse-gh clickhouse-gh Bot added the comp-testing Test content only (no production code). label Sep 23, 2026
…ATE` case

`05019_trino_dialect`, `05231_ast_json_storage_argumentless_function_dialect`
and `05235_alter_modify_setting_default_json_dialect` fail in every run of
shard 2/3 of the `DBReplicated` jobs the same way: the DDL worker re-parses the
DDL with the session `dialect`. Tag them too.

Only the `CREATE ... POPULATE` case of `05042_query_log_join_columns_more_cases`
is incompatible with `Replicated` databases, so move it into its own test and
keep the rest of the file running there.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@@ -1,3 +1,6 @@
-- Tags: no-replicated-database

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The replicated-database limitation here is the CREATE TABLE / DROP TABLE around the INSERT round trip block at lines 127-132, not the whole dialect file. Tagging the file drops all of the SELECT-only Trino coverage in DBReplicated jobs even though sibling tests like 05153_trino_dialect_wrappers_and_set.sql keep their fixture DDL outside Trino and still exercise the dialect.

Could this block be split out or the fixture table be created/dropped outside SET dialect = 'trino' instead of skipping the whole test?

@@ -1,3 +1,6 @@
-- Tags: no-replicated-database

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file has the same broad skip pattern: the incompatibility is the fixture CREATE / DROP TABLE at lines 13-62 and 213-217, but the body between them is all Trino SELECT coverage over Memory tables. With the current tag we lose the replicated-database pass for the whole Tempto conformance suite even though moving setup/teardown outside Trino mode, as 05153_trino_dialect_wrappers_and_set.sql already does, would keep the query coverage.

Please narrow the exclusion or split the fixture DDL from the Trino queries.

@alexey-milovidov alexey-milovidov self-assigned this Sep 24, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 24, 2026
Merged via the queue into master with commit 96757f5 Sep 24, 2026
176 checks passed
@alexey-milovidov
alexey-milovidov deleted the tag-no-replicated-database-coverage-hidden branch September 24, 2026 16:14
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 24, 2026
pull Bot pushed a commit to AnotherGenZ/ClickHouse that referenced this pull request Sep 27, 2026
…ated lanes

05060_database_max_tables_rename_inner_tables,
03748_default_minmax_indices_alter and
04757_alter_modify_projection_settings fail the main pass of
Stateless tests (amd_llvm_coverage, s3 storage, DBReplicated, parallel, 2/3)
on every master commit, and the check still reports OK: 1023 whitewashed rows
over 7 days (341 each, 100% of their rows on that lane, 0 red). The lane's
DIAGNOSTICS stage reruns a failed test without --replicated-database, the
rerun passes, the test is labelled flaky, and llvm_coverage jobs force flaky
to OK.

Two intended DatabaseReplicated refusals are involved.
DatabaseReplicated::renameTable throws NOT_IMPLEMENTED (48) for a
cross-database RENAME before any existence check, so all 7 assertion arms of
05060 get 48 where they expect 724 TOO_MANY_TABLES.
validateReplicatedDatabaseSegments refuses one ALTER that mixes replicated and
non-replicated command kinds with QUERY_IS_PROHIBITED (392), and it runs
before every storage-level check, which is why 04757's mixed arm reports 392
instead of the 344 SUPPORT_IS_DISABLED it asserts.

Applying the tag-vs-split rule of ClickHouse#121863, which tags a whole file when the
refused statement is the file's subject and splits the refused minority out
otherwise:

- 05060: whole-file no-replicated-database tag. 7 of 7 arms are refused and
  the cross-database RENAME of a table group is the file's entire subject. Its
  siblings 04498_database_max_tables and
  05042_rename_full_database_error_order are tagged in ClickHouse#121863 with the same
  reason string.
- 03748: 4 of 14 assertion blocks are refused, split into
  05244_default_minmax_indices_alter_rename_with_setting. A whole-file tag
  would have made a coverage regression permanent, because the file had 1303
  clean rows on this lane until the week those four arms were added.
- 04757: 1 of 8 error arms is refused, split into
  05245_alter_modify_projection_fixed_granularity_guard. The settings-only arm
  stays in the parent: a lone MODIFY SETTING makes
  areNonReplicatedAlterCommands true, so it is not refused and reaches the
  storage guard that raises the SUPPORT_IS_DISABLED it expects.

Every moved statement is carried over verbatim, so no assertion is weakened.
A fixture rewrite was rejected for 03748 because the combined
(RENAME COLUMN), (MODIFY SETTING) shape is itself the regression under test
from ClickHouse#116063: a following settings ALTER is what re-derives the implicit
index's name-keyed entries, so splitting the statement in two would have
silently deleted that coverage.

Both changed references were regenerated with clickhouse-test --record. The
03748 reference loses exactly the 19 lines of the moved blocks and nothing
else; 04757's reference is byte-identical; 05245's is empty because its only
statement is a serverError arm.

Validated on a single-node Replicated rig with the master snapshot binary
26.10.1.1: before the change each test fails deterministically under
--replicated-database (48, 392, 392) and passes without it; after it, the
three tagged tests report SKIPPED with reason replicated-database while 03748
and 04757 pass on the lane for the first time. Misspelling a tag makes the
test run and fail again with the original code, which proves the skip comes
from the tag. 50 randomized runs of each test without the flag and 20 with it
produced no failure other than the local Code: 36 Invalid time zone
environment class.

Related: ClickHouse#121863

Co-Authored-By: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-testing Test content only (no production code). pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants