Skip to content

PR CI: stress-test each sanitizer on one architecture, skip builds only skipped jobs use - #123764

Merged
fm4v merged 3 commits into
masterfrom
ci-pr-stress-one-arch-per-sanitizer
Oct 4, 2026
Merged

fm4v merged 3 commits into
masterfrom
ci-pr-stress-one-arch-per-sanitizer

Conversation

@fm4v

@fm4v fm4v commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Pull requests stress-test each sanitizer on one architecture and skip the builds whose binaries only the skipped jobs use. Expected saving: about $6.5k per week of PR CI (CIDB, 2026-09-28 to 2026-10-03, on-demand prices).

What pull requests skip (master, release and backport workflows are unchanged):

Job Why USD/week
Stress test (amd_asan_ubsan), (arm_debug), (arm_tsan), (arm_msan) the same sanitizer is stress-tested on the other architecture ~3.0k
Build (arm_debug), (arm_tsan), (arm_msan) only those stress tests use their binaries ~3.0k
Build (amd_fuzzers), below 100 changed product lines only no PR job uses the libFuzzer targets; it only checks that they compile ~0.6k

Each sanitizer is still stress-tested once per PR: TSan, MSan and debug on amd, ASan on arm next to its s3 variant and arm_release, so both architectures stay covered.

Why one architecture is enough, from PR and master runs over 2026-08-20 to 2026-10-02:

  • On PR commits where both architectures ran, the amd and arm runs of the same sanitizer failed together on 9 to 59 commits per sanitizer and alone on 135 to 344, evenly split between the architectures.
  • Of 109 distinct failure reasons (stack ids stripped), 71 occurred on both architectures. The reasons seen on arm only account for 31 of 1491 failing arm runs, and only three of them occurred three or more times (one is Unknown job error).
  • The second architecture is a second random sample of the same nondeterministic failures, not coverage of its own. Master keeps running both.

Exemptions: the stress skip and the build skips do not apply with the ci-force-all label, when a PR touches inputs of the build that the line count does not see (contrib/, the build scripts), the machinery of the stress jobs (as in #120996), cmake/ or base/glibc-compatibility/. A PR touching cmake/ or base/glibc-compatibility/ is also never treated as small. The ci-build label keeps all builds. Build (amd_fuzzers) also runs when a PR touches a fuzzers/ directory or tests/fuzz/. Over the same period it failed alone (all other builds green) in 13 PRs; the two below the threshold (#105118, #120870) failed on infrastructure.

Build (wasm64) also has no consumer, but keeps running: it compiles with the Emscripten clang, and in the same period it alone found compile errors in four PRs below the threshold (#123073, #119805, #117498, #121376).

A filtered build is marked like a cache hit, so the jobs that only wait for it (run_after) still run. A job that requires its binary would find no artifact, so ci/workflows/pull_request.py asserts that no other PR job requires the artifacts of the skipped arm builds. pull_request.yml does not change. This PR touches the stress machinery, so its own CI runs everything; the skips show up on the next regular PR.

Related: #120996

Changelog category (leave one):

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

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

Version info

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

fm4v added 2 commits October 3, 2026 23:36
…anitizer builds only they use

Pull requests now skip `Stress test (amd_asan_ubsan)`, `(arm_debug)`, `(arm_tsan)` and `(arm_msan)`, and the `Build (arm_debug)`, `(arm_tsan)` and `(arm_msan)` jobs whose binaries only these stress tests use. Each sanitizer is still stress-tested once per PR (TSan, MSan and debug on amd, ASan on arm next to its `s3` variant and `arm_release`). Master, release and backport workflows are unchanged.

The skip uses the exemptions of the small-PR rule (`ci-force-all`, uncounted build inputs, the stress machinery) plus changes under `cmake/` and `base/glibc-compatibility/`. On small PRs the three builds are skipped together with the stress tests. `ci/workflows/pull_request.py` asserts that no other PR job requires the skipped builds' artifacts.
No PR job uses the libFuzzer targets it builds; in a PR it only checks that they compile. Over 2026-08-20 to 2026-10-02 it failed alone in 13 PRs, and the two below 100 changed product lines failed on infrastructure (`Bus error` in the linker). It still runs when a PR touches a `fuzzers/` directory or `tests/fuzz/`, and master builds it on every commit.

`Build (wasm64)` keeps running: in the same period it alone found Emscripten-only compile errors in 4 PRs below the threshold.
@clickhouse-gh

clickhouse-gh Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [cec556f]

Summary: ✅


AI Review

Summary

This PR reduces PR CI cost by stress-testing each sanitizer on only one architecture and by skipping a few builds that no remaining PR job consumes. The previously reported cmake/ and ci-build regressions are fixed, but one coverage gap remains: small PRs that only edit tests/queries/0_stateless/* now skip Build (amd_fuzzers) even though that build packages those queries into the published seed corpora.

Findings

⚠️ Majors

  • [ci/jobs/scripts/workflow_hooks/filter_job.py:384] _has_fuzzer_target_changes only exempts */fuzzers/* and tests/fuzz/, so Build (amd_fuzzers) is still skipped for corpus-only edits under tests/queries/0_stateless/*. That build explicitly extends its digest with those queries (ci/defs/job_configs.py:636) because tests/fuzz/build.sh copies them into *_seed_corpus.zip (tests/fuzz/build.sh:20). Skipping it here removes the only PR-side validation that the fuzzers artifact can still be packaged.
  • Suggested fix: also treat tests/queries/0_stateless/ as a keep-running input for Build (amd_fuzzers), or derive the exemption from the build's extra digest paths so the skip logic stays aligned with the artifact inputs.
Final Verdict

Request changes: the new Build (amd_fuzzers) small-PR skip is still too broad for corpus-only edits under tests/queries/0_stateless/*.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Oct 3, 2026
Comment thread ci/jobs/scripts/workflow_hooks/filter_job.py
Comment thread ci/jobs/scripts/workflow_hooks/filter_job.py
@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Oct 3, 2026
…at `cmake/` changes as small

With the `ci-build` label the arm sanitizer builds and `Build (amd_fuzzers)` run again. A PR touching `cmake/` or `base/glibc-compatibility/` no longer takes the small-PR skip: one line there (a compiler or sanitizer flag) can change the whole binary, the same reasoning as for the uncounted build inputs.
"""The fuzz targets live in `fuzzers/` directories next to the code they fuzz, and
`tests/fuzz/` holds the scripts that stage their dictionaries and corpora."""
return any(
"/fuzzers/" in f or f.removeprefix("./").startswith("tests/fuzz/")

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 still skips Build (amd_fuzzers) for PRs that only touch tests/queries/0_stateless/*. _has_fuzzer_target_changes only exempts */fuzzers/* and tests/fuzz/, but the amd_fuzzers build extends its own digest with tests/queries/0_stateless/ because tests/fuzz/build.sh copies those .sql files into the published seed corpora.

So a corpus-only change now drops the only PR-side check that the fuzzers artifact can still be packaged, and the breakage moves to the nightly libFuzzer pipeline after merge. Can we also keep Build (amd_fuzzers) running for tests/queries/0_stateless/ edits, or derive this exemption from the build's extra digest paths instead of hard-coding only two path families?

@fm4v
fm4v added this pull request to the merge queue Oct 4, 2026
Merged via the queue into master with commit 3c8f784 Oct 4, 2026
160 checks passed
@fm4v
fm4v deleted the ci-pr-stress-one-arch-per-sanitizer branch October 4, 2026 06:55
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). 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