Repository navigation
Update SettingsChangesHistory.cpp - #104097
antaljanosbenjamin merged 2 commits into
Conversation
|
Workflow [PR], commit [a1f746a] Summary: ❌
AI ReviewSummaryThis PR corrects Missing context
ClickHouse Rules
Final Verdict
|
LLVM Coverage Report
Changed lines: 100.00% (12/12) · Uncovered code |
|
Why did |
Good question. I briefly tried to figure it out, but failed in 10 minutes. I will have a look at it, but based on CIDB it doesn't look like a unique issue. |
|
Claude helped to find the issue: What happened The flaky check ran with clickhouse-test ... -- 02995_settings_26_4_1. (the filter ends with a regex ., so it matches any test whose name starts with 02995_settings_26_4_1). Result: Found 0 parallel tests and 0 sequential tests Why it picked that filter PR #104097 changes only two files:
The flaky-check driver derives the test name from each changed file under tests/queries/0_stateless/ by stripping the extension. It produced 02995_settings_26_4_1 and asked clickhouse-test to re-run it 50 times. But there is no test named 02995_settings_26_4_1.sql / .sh — the .tsv is a data file consumed by |
The flaky-check driver derives a test name from each changed file under `tests/queries/0_stateless/` by stripping the file extension. When PR ClickHouse#104097 changed only `02995_settings_26_4_1.tsv` (a data file consumed by `02995_new_settings_history.sh`), the driver produced the bogus pattern `02995_settings_26_4_1.` and asked `clickhouse-test` to re-run it 50 times. No test matches that pattern, so `clickhouse-test` printed `Found 0 parallel tests and 0 sequential tests` and exited with code 1, failing the flaky check. Match files first against the known test extensions (`.sql`, `.sql.j2`, `.sh`, `.py`, `.expect`); for supporting files such as `.reference` or `.reference.j2`, walk back one extension at a time looking for a sibling test source. Orphan data files like `02995_settings_26_4_1.tsv` are now skipped instead of producing a filter that matches zero tests. See ClickHouse#104097 (comment)
The merge-queue flaky check (and the regular flaky check it is built on)
selected tests via `Targeting.get_changed_tests`, which only mapped a changed
path back to a test when the path was itself a test source or a supporting
file with a same-named sibling test. A data fixture consumed by a test — either
a root-level orphan like `02995_settings_26_4_1.tsv` or, worse, one nested in a
subdirectory like `data_parquet/02716_data.parquet` (which the old
`\d{5}`-after-prefix regex did not even consider) — resolved to no test. A PR
that changed only such a fixture was therefore treated as "no changed tests",
so `should_skip_merge_queue_job` skipped the drift guard and the merge group
never reran the affected test surface: a false green for the exact drift this
check exists to catch.
Map auxiliary fixtures back to their owning test(s). Fixtures carry the owning
test's five-digit prefix by convention, so the prefix narrows the candidates to
the `NNNNN_*` tests at the suite root (a handful of files, never the whole
suite); among those, prefer the ones whose body actually references the fixture
by name, and fall back to all prefix siblings only when the reference is
constructed dynamically. Only real tests are emitted, so a run never fabricates
a zero-match pattern (which would make `clickhouse-test` exit 1, the failure
mode `PR #104097` fixed). Because both the config-time skip and the in-job
selection call `get_changed_tests`, they stay in sync automatically.
As a side effect this also fixes a latent gap: root-level tests with a
four-digit prefix (`4060_*`, `4061_*`), which the old `\d{5}` regex skipped, are
now selected.
Tests: `ci/tests/test_find_tests.py` covers the subdirectory fixture, the
root-level orphan, unmappable fixtures, and the end-to-end `get_changed_tests`
path.
The merge-queue flaky check (and the regular flaky check it is built on)
selected tests via `Targeting.get_changed_tests`, which only mapped a changed
path back to a test when the path was itself a test source or a supporting
file with a same-named sibling test. A data fixture consumed by a test — either
a root-level orphan like `02995_settings_26_4_1.tsv` or, worse, one nested in a
subdirectory like `data_parquet/02716_data.parquet` (which the old
`\d{5}`-after-prefix regex did not even consider) — resolved to no test. A PR
that changed only such a fixture was therefore treated as "no changed tests",
so `should_skip_merge_queue_job` skipped the drift guard and the merge group
never reran the affected test surface: a false green for the exact drift this
check exists to catch.
Map auxiliary fixtures back to their owning test(s). Fixtures carry the owning
test's five-digit prefix by convention, so the prefix narrows the candidates to
the `NNNNN_*` tests at the suite root (a handful of files, never the whole
suite); among those, prefer the ones whose body actually references the fixture
by name, and fall back to all prefix siblings only when the reference is
constructed dynamically. Only real tests are emitted, so a run never fabricates
a zero-match pattern (which would make `clickhouse-test` exit 1, the failure
mode `PR ClickHouse#104097` fixed). Because both the config-time skip and the in-job
selection call `get_changed_tests`, they stay in sync automatically.
As a side effect this also fixes a latent gap: root-level tests with a
four-digit prefix (`4060_*`, `4061_*`), which the old `\d{5}` regex skipped, are
now selected.
Tests: `ci/tests/test_find_tests.py` covers the subdirectory fixture, the
root-level orphan, unmappable fixtures, and the end-to-end `get_changed_tests`
path.
Changelog category (leave one):
FYI @alexey-milovidov
Documentation entry for user-facing changes
Version info
26.5.1.326