Repository navigation
CI: do not fetch the obsolete chcache credential - #112279
Conversation
CI selects sccache for every build type: ci/defs/defs.py has COMPILER_CACHE = COMPILER_CACHE_LEGACY = "sccache" since commit 8012134 ("CI: Switch build cache to sccache") replaced COMPILER_CACHE = "chcache". That commit left the credential setup behind, so the build and fast-test jobs kept exporting the four CH_* variables that only chcache reads (rust/chcache/src/config.rs). One of the four required an `aws ssm get-parameter` call made through Shell.get_output(..., strict=True), which raises. A single transient SSM error therefore killed the whole job before the build even started, and the ERRORed build dropped its dependents - including the merge-blocking Bugfix Validation nodes, after which new_tests_check.py reported "No per-arch Bugfix Validation job validated the bug" for a test that was never run on master HEAD. A succeeding build log of the same commit confirms the credential is unused: COMPILER_CACHE=sccache, "Using sccache: /usr/bin/sccache", zero mentions of chcache. So the fetch obtained a password nothing consumes. Remove the CH_* exports from both carriers (ci/jobs/build_clickhouse.py's shared setup_build_caches_env, which the unit-test bugfix validation job also uses, and the independent copy in ci/jobs/fast_test.py) together with the now unused chcache_secret definition and its SECRETS entry. chcache remains a supported COMPILER_CACHE value and a buildable target; re-enabling it means restoring the credential export alongside the constant. Without the export chcache falls back to Config::default(), which is a slower build, never a wrong or failing one. Co-Authored-By: Claude Fable 5 <[email protected]>
The stripped paragraph restated the SSM failure chronology and the dropped Bugfix Validation dependents, which the first commit's message already carries. What stays is the invariant a reader needs at this file: sccache is selected for every build type, nothing reads the four CH_* variables, and the list of things the five tests pin. CI logs for the failure this removes: https://s3.amazonaws.com/clickhouse-test-reports/PRs/112020/b5070c407e2b2c12424bf13748d8eed30ac0ffb2/build_arm_binary/job.log https://s3.amazonaws.com/clickhouse-test-reports/PRs/112009/0ff719aa5bf5637669420a3e2d3cc5b61481e27f/build_amd_release/job.log https://s3.amazonaws.com/clickhouse-test-reports/PRs/112011/9a4c11228a88bb851432a1b3ef22a3e1f1e0ba8c/build_llvm_coverage_build/job.log Co-Authored-By: Claude Opus 5 <[email protected]>
The previous wording restated the PR description almost verbatim: 0.802 word overlap before the first trim, and 0.830 after it, because shortening the prose removed the sentences that carried the file's own vocabulary. It now names the constants, environment variables and helpers the tests actually assert on, which is what a reader needs at this file, and the overlap drops to 0.585. No test function, assertion or helper changed. CI logs for the failure this removes: https://s3.amazonaws.com/clickhouse-test-reports/PRs/112020/b5070c407e2b2c12424bf13748d8eed30ac0ffb2/build_arm_binary/job.log https://s3.amazonaws.com/clickhouse-test-reports/PRs/112009/0ff719aa5bf5637669420a3e2d3cc5b61481e27f/build_amd_release/job.log https://s3.amazonaws.com/clickhouse-test-reports/PRs/112011/9a4c11228a88bb851432a1b3ef22a3e1f1e0ba8c/build_llvm_coverage_build/job.log Co-Authored-By: Claude Fable 5 <[email protected]>
Internal second-model review (2 review rounds, 5 gate rounds, 9 findings adjudicated)This change was reviewed independently before it was opened: three approach-review rounds on the Design rounds (before any code was written)
Code-review round 1 - one publish blocker, two nits (all AGREED, all fixed)
Code-review round 2 - no defect in the shipped codeThe second cold read and the second gate round both found nothing in the diff. What the round did produce was two inaccuracies in this pull request's own description, which I corrected before opening it:
Two further nits were noted and deliberately not acted on, since each was measured to have no effect and fixing it would widen the change: the test's scratch-directory exclusion does not cover Checks run by the review itself, independently of the author
Findings adjudicated across both code rounds: 9 - 8 agreed and fixed or self-corrected, 1 dropped as out of scope, 0 disagreed. |
Pre-PR validation gate
Verification: |
|
cc @maxknv @thevar1able - could you review this? It deletes the |
|
Workflow [PR], commit [402c46c] Summary: ✅
AI ReviewSummaryThis PR removes the obsolete Final Verdict
|
|
Drop the test please. |
CI finish ledger - 31940f0Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
Sole red on this head: 174 check-runs, 93 success, 80 skipped, 1 failing job carrying the None is caused by this diff, which only stops the CI job from fetching the obsolete chcache Evidence for each owner:
Session id: cron:our-pr-ci-monitor:20260728-193000 |
|
@groeneai drop the test. |
Requested by @thevar1able in review. The source change stands on its own: `ci/defs/defs.py` no longer defines `chcache_secret` and neither `setup_build_caches_env` nor `fast_test.py` exports the four `CH_*` variables, so the `aws ssm get-parameter` call that killed the job is gone.
|
Dropped in 8cfe0bb. The PR is now the three source hunks only. Sorry for making you ask twice. |
CI finish ledger — 8cfe0bbEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
Session id: cron:our-pr-ci-monitor:20260729-140000 |
CI finish ledger — 402c46cCI is fully finished on this head and there are no failures to own: 174 check-runs, all
This head is the master merge pushed here at 14:17Z, so nothing was pushed from my side for it. Session id: cron:our-pr-ci-monitor:20260730-193000 |
|
📊 Cloud Performance Report ✅ AI verdict: no significant changes detected. K_source=6 K_base=30 flagged=0/65 clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
|
Correction to my code-review round 1 note above, and a disposition for the I measured it before writing a fix, and the security framing in that note was wrong. The rest also did not hold up:
The directory is also preserved deliberately, by the save/restore idiom in So I am not pursuing this: the leftover is untidy, but it leaks no secret, breaks nothing, and the digest question it points at is a separate pre-existing one. Sorry for the noise in the original note. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
A
Build (*)orFast testjob could die within ~5 minutes with no compile error atall, because one
aws ssm get-parametercall returned non-zero:The job was killed to obtain a password nothing consumes. CI selects sccache for every build type -
ci/defs/defs.py:435-436setsCOMPILER_CACHE = "sccache"andCOMPILER_CACHE_LEGACY = "sccache", ever since8012134d9d9e99("CI: Switch build cache to sccache") replaced
COMPILER_CACHE = "chcache"withCOMPILER_CACHE = COMPILER_CACHE_LEGACY. That commit left the credential setup behind, so thebuild and fast-test jobs kept exporting the four
CH_*variables that only chcachereads (
rust/chcache/src/config.rs:40-43,71-75). A succeeding build log of thesame commit confirms it:
COMPILER_CACHE=sccache,-- Using sccache: /usr/bin/sccache,and zero mentions of chcache.
Since the fetch used
Shell.get_output(..., strict=True), which raises, one transientSSM error killed the job before the build started. The ERRORed build then dropped its
dependents, including the merge-blocking Bugfix Validation nodes, after which
new_tests_check.pyfailed with "No per-arch Bugfix Validation job validated the bug"for a regression test that was never run on master HEAD.
This removes the
CH_*exports from both carriers - the sharedsetup_build_caches_envinci/jobs/build_clickhouse.py(whichunit_tests_bugfix_validation_job.pyalso uses) and the independent copy inci/jobs/fast_test.py- together with the now unusedchcache_secretdefinition andits
SECRETSentry.Note that this is a per-request failure and not a regional outage. Across the eleven
5-minute buckets on 2026-07-27 that contain a
Build (*)error with this signature,92 to 163 distinct
Build (*)jobs succeeded per bucket against 1 to 3 errored jobs.The measured wall time to failure was 181 s and 69 s, and the 502 variant's own message
says
reached max retries: 2, so the AWS CLI had already spent its retry budget.chcache remains a supported
COMPILER_CACHEvalue (cmake/ccache.cmake:31-38) and abuildable target. Re-enabling it requires restoring the credential export alongside the
constant; without the export chcache falls back to
Config::default()(
rust/chcache/src/config.rs:84-90), which is a slower build, never a wrong or failingone. If you would rather keep the credential path live, the alternative is to pass the
actually selected cache into
setup_build_caches_envfrom both of its callers and fetchonly when it is
chcache- note that the constant is chosen per build type (9 types useCOMPILER_CACHE_LEGACY), so the check cannot be made from the values alone.Provenance:
No related open issue found (searched
chcache,get_aws_ssm_parameter,chcache_password).Out of scope, deliberately
Two other SSM callers share the same job-fatal transport but are different root causes and
are tracked separately:
clickhouse_proc.py create_log_export_config, reached fromInstall ClickHouse. Neitherraising nor returning
Falseis fail-open there:Result.from_commands_runtreats acallable's
Falseas a failed result andClickHouseServiceraises on aFalseconfighook, so a correct fix has to decide skip-vs-tolerate and also suppress the later
start_log_exports.cidb_cluster.py is_readyandlog_cluster.py, reached fromConfig Workflow / Pre Hooks.Their consumers already fail open; only the fetch raises.
Also noted while reading: in
Shell.get_outputthestrictraise sits inside thefor attempt in range(retries)loop, soretriesis dead for every strict caller. Nocaller passes
retriestoday, so this is currently harmless, but it would silently no-opany future opt-in.
Testing
No test. The regression test this PR originally carried was dropped at
@ thevar1able's request in review.
No randomized 50/50 run applies - this is a Python CI-harness change with no stateless or
integration test and no randomized settings.
Version info
26.8.1.533(included in26.8and later)