Skip to content

Update sccache to 0.20.0 in CI - #133753

Merged
alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/sccache-v0.20-basedirs
Nov 29, 2026
Merged

alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/sccache-v0.20-basedirs

Conversation

@groeneai

@groeneai groeneai commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #127827

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

CI pins sccache 0.17.0 in ci/docker/fasttest/Dockerfile. This is the only pin; the build images are built from fasttest. 0.18.0 and 0.19.0 could not be adopted: they made -ftime-trace uncacheable (mozilla/sccache#2834), and 26 of the 30 CI build types pass -DENABLE_BUILD_PROFILING=1. 0.20.0 caches it again and writes no trace on a hit (mozilla/sccache#2956). It also leaves CARGO_TARGET_DIR/CARGO_BUILD_* out of Rust keys (mozilla/sccache#3050) and hashes the C/C++ input file name (mozilla/sccache#2974). This PR changes the pin only.

Validation, run locally with sccache 0.20.0, a local disk cache and CI's cmake flags. The second build is in a fresh build directory at the same path:

  • amd_binary, clickhouse-bundle: 1562 s cold, 147 s warm. C/C++ 17,715 of 17,717 hits, Rust 603 of 603. The 2 misses are openldap's generated version files, which use __DATE__/__TIME__. No hit wrote a -ftime-trace file.
  • amd_asan_ubsan, dbms: 1934 s cold, 95 s warm. C/C++ 16,237 of 16,239 hits, Rust 529 of 529.
  • PR-build environment (READ_ONLY, anonymous S3): the server starts, a miss compiles, nothing is written, and warn_on_low_sccache_hit_rate parses the stats.

One regression: 0.20.0 does not cache compiles with --embed-dir. The 4 _jieba sources (6.9 s of compile in total) are now always compiled.

0.20.0 does not read 0.17.0 entries, so every build type is cold once after the merge, and the builds of this PR are cold.

The SCCACHE_BASEDIRS part of #127827 waits for the decision in #127827 (comment).

🤖 Generated with Claude Code


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

Version info

  • Merged into: 26.12.1.1029-master (included in 26.12 and later)

0.18.0 and 0.19.0 made `-ftime-trace` uncacheable (mozilla/sccache#2834),
which 27 CI build types pass through -DENABLE_BUILD_PROFILING=1, so CI
stayed on 0.17.0. 0.20.0 hashes the flag again and writes no trace on a
cache hit (mozilla/sccache#2956). It also leaves CARGO_TARGET_DIR and
CARGO_BUILD_* out of Rust keys (ClickHouse#3050) and hashes the C/C++ input file
name (ClickHouse#2974).

Measured locally with CI's cmake flags and a local disk cache, second
build from a fresh build directory at the same path:
- amd_binary clickhouse-bundle: 1562 s cold, 147 s warm; C/C++ 17715 of
  17717 hits (the 2 misses are openldap's generated version files with
  __DATE__/__TIME__), Rust 603 of 603; no hit wrote a time trace.
- amd_asan_ubsan dbms: 1934 s cold, 95 s warm; C/C++ 16237 of 16239,
  Rust 529 of 529.
- PR-build environment (READ_ONLY, anonymous S3): the server starts, a
  miss compiles, the write is refused, warn_on_low_sccache_hit_rate
  parses the stats. 0.20.0 additionally counts an anonymous 403 on a
  missing key as a read error (ClickHouse#2967); it is still a miss.

0.20.0 treats `--embed-dir` as uncacheable, so the 4 _jieba sources
(6.9 s of compile) are always compiled. 0.20.0 does not read 0.17.0
entries: every build type is cold once after this lands.

Related: ClickHouse#127827

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 0 findings), plus my own cold review of the same tree (1 finding).

# Sev Finding Verdict Evidence / action
1 💡 The commit message cites three sccache PRs by bare number, which GitHub links to unrelated ClickHouse PRs, and counts 27 build types with -DENABLE_BUILD_PROFILING=1 (26 of 30 on the current base) AGREE, noted, not blocking Text only; the PR description uses mozilla/sccache#... references and the current count

Checked with no finding: both release tarballs (x86_64, aarch64) exist with the layout the RUN block extracts; every SCCACHE_* variable CI sets is still read with the same meaning in 0.20.0; SCCACHE_DIR plus SCCACHE_BUCKET still selects S3 alone (multilevel only with SCCACHE_MULTILEVEL_CHAIN); a read error is still counted as a miss, so the hit-rate warning is unaffected; -ftime-trace is hashed and is not a cached output; the only newly uncacheable flag used by the build is --embed-dir.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are
terminal per finding. Findings on hunks unchanged by the fix round are auto-dropped.

Session id: cron:clickhouse-review-slot-9:20261123-124600

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @pamarcos, could you review this? It bumps the CI sccache pin from 0.17.0 to 0.20.0, the first release since 0.17.0 that caches -ftime-trace compiles again (mozilla/sccache#2956); measured locally with CI flags: amd_binary 17,715 of 17,717 C/C++ and 603 of 603 Rust hits on a warm rebuild.

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? N/A, no defect: a version bump. The claim (0.20.0 caches CI's compile flags, -ftime-trace included) is measured deterministically: two builds with CI's cmake flags, the second from a fresh build directory.
b Root cause explained? The pin predates 0.20.0. 0.18.0 and 0.19.0 made -ftime-trace uncacheable (mozilla/sccache#2834) and 26 of the 30 CI build types pass it; 0.20.0 caches it again (mozilla/sccache#2956).
c Fix matches root cause? Yes, the pin is the whole change. The download block is unchanged: both release assets return 200, match their .sha256, and keep the same tarball layout.
d Test intent preserved / new tests added? No test: CI infrastructure. Validated locally, numbers in the description.
e Both directions demonstrated? 0.17.0 vs 0.20.0 smoke in the PR-build environment (same behaviour apart from the new read-error counter); 0.20.0 cold vs warm: amd_binary C/C++ 17,715/17,717 hits, Rust 603/603; amd_asan_ubsan dbms 16,237/16,239, Rust 529/529.
f Fix is general across code paths? All three sccache --start-server sites (build jobs, Fast test, unit-test bugfix validation) use the image's /usr/bin/sccache from this one ARG; there is no other pin or install.
g Fix generalizes across inputs (params/datatypes/wrappers)? Two flag sets measured (release with -ftime-trace, ASAN/UBSAN); the full list of newly uncacheable clang/gcc flags was checked against every build file. Only --embed-dir (4 _jieba sources, 6.9 s) is used.
h Backward compatible? (maintainer-approved exception only) Every build type misses once after the merge (0.20.0 does not read 0.17.0 entries, measured). The stats JSON that warn_on_low_sccache_hit_rate parses is unchanged.
i Invariants and contracts preserved? READ_ONLY is honoured (the write is refused, nothing is stored); a remote read error is still a miss that compiles; a cache hit writes no -ftime-trace file, which the build-profile jobs rely on.

Session id: cron:clickhouse-impl-slot-7:20261123-112600

@clickhouse-gh

clickhouse-gh Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [29e31b3]

Summary: ✅


AI Review

Summary

Updates CI's shared sccache pin from v0.17.0 to v0.20.0. No actionable findings after reviewing the diff, prior discussion, upstream changes, and CI cache and profiling consumers. Both architecture archives match their published checksums and expected layout. An isolated runtime check confirmed anonymous, read-only S3 startup and compatibility with the stats JSON fields consumed by warn_on_low_sccache_hit_rate; it did not exercise compilation or cache hits. Both CI image builds passed, while compilation jobs reuse prior results. Full builds were not repeated during this review; the PR provides cold/warm measurements for release and ASan/UBSan builds.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-ci can be tested Allows running workflows for external contributors manual approve Manual approve required to run CI labels Nov 23, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Nov 23, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 29, 2026
@alexey-milovidov alexey-milovidov self-assigned this Nov 29, 2026
Merged via the queue into ClickHouse:master with commit 9767a19 Nov 29, 2026
195 checks passed
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 29, 2026
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 comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). manual approve Manual approve required to run CI 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.

5 participants