Skip to content

[CI Proof] no-parallel-replicas tag satisfies the check's no-parallel exemption - #121459

Closed
clickgapai wants to merge 1 commit into
ClickHouse:masterfrom
clickgapai:qa-bot/proof-pr120809-no-parallel-replicas-tag-satisfies-the
Closed

clickgapai wants to merge 1 commit into
ClickHouse:masterfrom
clickgapai:qa-bot/proof-pr120809-no-parallel-replicas-tag-satisfies-the

Conversation

@clickgapai

@clickgapai clickgapai commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ This is a CI proof PR — not a fix and not intended for merge. It submits a test that could not be confirmed locally (code analysis strongly suggests a bug but local test did not trigger it — CI sanitizers and stress runs may catch it). This PR will be closed automatically once CI completes. If CI confirms the bug (TSan/ASan/cluster failure), a bug Issue will be filed separately.

Suspected bug: no-parallel-replicas tag satisfies the check's no-parallel exemption

Root cause: ci/jobs/check_style.py:619 tests the raw tag LINE with a word-boundary substring pattern instead of testing membership in the parsed tag set. tests/clickhouse-test:4773 decides sequential scheduling with if "no-parallel" in tags or "sequential" in tags: over the set built at :4507-4508, so the check and the runner disagree for every test tagged no-parallel-replicas.

Affected locations:

  • ci/jobs/check_style.py:619 — NO_PARALLEL_TAG_RE - \bno-parallel\b also matches no-parallel-replicas
  • ci/jobs/check_style.py:704 — the DISABLE-ALL exemption that consumes the pattern

Why CI is needed: The guard the PR adds to keep SYSTEM DISABLE ALL FAILPOINTS out of tests that run in parallel is inoperative for any test carrying no-parallel-replicas - 528 stateless tests carry that tag today, 482 of them without no-parallel, and it is the standard tag for a test that must not run under --no-parallel-replicas. Nothing is broken on the current tree; the cost is that the new check will wave through precisely the file it was written to stop, and the resulting failure lands on the concurrently running test whose fail point was disarmed - a failure with no cause in its own source, which is the symptom this PR exists to eliminate.

Suggested fix: Decide the tag the way the runner does. Minimal: r"(--|#)\s*[Tt]ags:.*\bno-parallel\b(?!-)". Better: split the tag line on ,, strip, and test set membership as tests/clickhouse-test:4507-4508 does - that also picks up sequential, the runner's second sequential tag (tests/clickhouse-test:4773), which the current pattern rejects.

Assumptions

Unverified assumptions — tick to confirm, comment to refute:

  • A contributor adding a new fail-point test may reach for SYSTEM DISABLE ALL FAILPOINTS as cleanup while tagging the test no-parallel-replicas
    • Why unverifiable: no such file exists today - I ran the shipped check over all 15,512 functional test files and it reports zero errors, and the only three files using SYSTEM DISABLE ALL FAILPOINTS (05223, 05224, 05225) are all tagged no-parallel. The hazard is on the next test written that way.
    • Falsifiable test: Re-run check_failpoints_are_disabled over tests/queries/** after any new fail-point test lands; a file combining DISABLE-ALL with no-parallel-replicas will pass silently.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

Not applicable — temporary CI proof PR, will be closed automatically.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

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

`check_failpoints_are_disabled` credits `SYSTEM DISABLE ALL FAILPOINTS` in any
test whose tag line matches `\bno-parallel\b`, which also matches
`no-parallel-replicas`. `clickhouse-test` decides sequential scheduling from the
parsed tag set, so such a test runs in the parallel pass and its disable-all
disarms the fail points of the tests running alongside.

Six of the sixteen cases fail on master; all pass once the exemption is decided
on the tag set instead of a substring of the raw tag line.

Co-Authored-By: Claude Opus 5 <[email protected]>
@clickgapai

Copy link
Copy Markdown
Contributor Author
Pre-PR validation: 4/6 ✅

a) Deterministic repro? ❌
Could not reproduce locally — testability is THEORETICAL. Surfaced for CI/sanitizer verification.

b) Root cause explained? ✅
ci/jobs/check_style.py:619 tests the raw tag LINE with a word-boundary substring pattern instead of testing membership in the parsed tag set. tests/clickhouse-test:4773 decides sequential scheduling with if "no-parallel" in tags or "sequential" in tags: over the set built at :4507-4508, so the check and the runner disagree for every test tagged no-parallel-replicas.

c) Fix matches root cause? ✅
Decide the tag the way the runner does. Minimal: r"(--|#)\s*[Tt]ags:.*\bno-parallel\b(?!-)". Better: split the tag line on ,, strip, and test set membership as tests/clickhouse-test:4507-4508 does - that also picks up sequential, the runner's second sequential tag (tests/clickhouse-test:4773), which the current pattern rejects.

d) Test intent preserved? / New tests added? ❌
No regression test attached to this finding.

e) Both directions demonstrated? ✅
Pre-fix output: '-- Tags: no-parallel-replicas' -> NO ERROR '-- Tags: no-fasttest' -> FLAGGED '-- Tags: no-parallel' -> NO ERROR — Post-fix expected: '-- Tags: no-parallel-replicas' -> FLAGGED '-- Tags: no-fasttest' -> FLAGGED '-- Tags: no-parallel' -> NO ERROR.

f) Fix is general, not a narrow patch? ✅
Fix targets the root-cause condition; no remaining audit-style open risks.

@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Sep 22, 2026
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Sep 22, 2026
@alexey-milovidov
alexey-milovidov marked this pull request as draft September 22, 2026 23:13
@alexey-milovidov alexey-milovidov added the close in a month if not active This will be closed in case of no information label Sep 22, 2026
@alexey-milovidov alexey-milovidov self-assigned this Sep 22, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [1f8c568]

Summary: ✅


AI Review

Summary

This PR adds a focused CI-proof unit test for the SYSTEM DISABLE ALL FAILPOINTS exemption in check_failpoints_are_disabled, targeting the current false positive on no-parallel-replicas. The underlying mismatch is real, but the proof currently captures only part of the runner's lone-scheduling contract, so it can pass with a partial fix that still leaves the checker out of sync with clickhouse-test.

Findings

⚠️ Majors

  • [ci/tests/test_check_style_failpoints.py:67-74] The positive coverage is weaker than the contract the file points to. clickhouse-test schedules a test alone when its parsed tag set contains either no-parallel or sequential (tests/clickhouse-test:4773), but this proof only blesses no-parallel. A fix that merely stops NO_PARALLEL_TAG_RE from matching no-parallel-replicas would satisfy this file while still rejecting bare sequential tests, so the checker would remain inconsistent with the runner.
    Suggested fix: add positive cases for at least sequential and no-parallel-replicas, sequential, and update the docstring to describe the runner's full lone-scheduling predicate.
Final Verdict
  • Status: ⚠️ Request changes
  • Minimum required actions: extend the proof to cover the sequential lone-scheduling path so the test enforces the same predicate clickhouse-test uses.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Sep 22, 2026
@clickgapai

Copy link
Copy Markdown
Contributor Author

CI completed without detecting a CI failure for this hypothesis. The bug was not confirmed. Closing this proof PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors close in a month if not active This will be closed in case of no information comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants