Repository navigation
Add scheduled CoverageReport workflow publishing the master LLVM coverage report - #124765
Conversation
…rage report Runs the LLVM coverage build, the unit, stateless and integration coverage shards and the LLVM Coverage report job every 3 hours (and on dispatch), reusing the shared job configs. Rows in `coverage_ci.coverage_data` keep `branch = 'master'` and `pull_request_number = 0`.
|
Workflow [PR], commit [0d1a502] Summary: ✅ AI ReviewSummaryThis PR adds a scheduled Findings
Final Verdict
|
| *ArtifactConfigs.llvm_profdata_file, | ||
| ArtifactConfigs.llvm_coverage_info_file, | ||
| ], | ||
| dockers=DOCKERS, |
There was a problem hiding this comment.
Because this workflow is supposed to reuse MasterCI's coverage jobs via enable_cache, its post-mangle docker graph has to match MasterCI's exactly. Right now CoverageReport injects only Dockers Build (amd) and Dockers Build (arm), while MasterCI also injects Dockers Build (multiplatform manifest); ci/praktika/mangle.py appends those docker job names to every coverage job's run_after, and run_after is part of the cache digest. I checked the post-mangle configs locally and, for example, Build (llvm_coverage_build) differs from MasterCI only by that missing manifest job in run_after, so it cannot hit the existing MasterCI cache entry. The result is that the first CoverageReport run after a master commit will rerun the whole coverage pipeline instead of reusing the already-produced build/shards the PR description relies on. To make the cross-workflow cache sharing real, this workflow needs the same docker-manifest settings as MasterCI (enable_dockers_manifest_merge=True, and the matching set_latest_for_docker_merged_manifest=True if the manifest job itself should share safely too), plus a regression test similar to ci/tests/test_nightly_fuzzers_build_sharing.py.
Since 2026-10-09 (PRs ClickHouse#124764 and ClickHouse#124765) master's LLVM coverage is measured by the scheduled `CoverageReport` workflow and published under `coveragereport/`; `MasterCI` no longer runs the coverage jobs. `master_coverage_url` still built the `MasterCI` prefix, so the `Generate LLVM Coverage Diff Report` step of the `LLVM Coverage` job found no baseline in any of the 100 master-track commits and failed on every pull request that runs the coverage jobs: 1 failure on 2026-10-11, 4 on 2026-10-12, 12 on 2026-10-13, 7 on 2026-10-14, 14 on 2026-10-15 so far. The only passes since then are incomplete measurements, which skip the diff. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Adds a scheduled
CoverageReportworkflow (ci/workflows/coverage_report.py, cron0 */3 * * *,workflow_dispatchis added by praktika for every schedule workflow) that produces the master LLVM coverage report served at https://coverage.clickhouse.com/. The generated.github/workflows/coverage_report.ymlis committed (PYTHONPATH=./ci:. python3 -m praktika yaml, no other generated file changed).Motivation: the coverage jobs are being removed from
MasterCI(separate sibling PR), so the report that the site reads needs a new producer that does not run on every master push.Jobs. Unchanged shared configs from
ci/defs/job_configs.py:build_llvm_coverage_job,unittest_llvm_coverage_job,functional_test_llvm_coverage_jobs, the S3/DBReplicated/ParallelReplicas/AsyncInsert coverage shards (they live insidefunctional_tests_jobs, so they are picked byamd_llvm_coveragein the job name),integration_test_llvm_coverage_jobsandllvm_coverage_job(merge, HTML report,coverage_ci.coverage_datarow). 23 jobs, every shard artifact inLLVM_ARTIFACTS_LISTis provided (checked).master.pyand the shared definitions are not touched.Data compatibility. Nothing in the job code is changed. On a scheduled run
Info().git_branchismaster(GITHUB_REF_NAME), the PR number is 0, andllvm_coverage_job.pytakes its master branch (is_master_branch) and writes the same row as today:branch = 'master',pull_request_number = 0,statusof the report step, andcoverage_report_url = <report_s3_base()>/llvm_coverage/generate_llvm_coverage_report/index.html. The URL and the S3 prefix come from praktika'sget_s3_prefix, which includes the normalized workflow name, so the report now lives underREFs/master/<sha>/coveragereport/llvm_coverage/generate_llvm_coverage_report/instead of.../masterci/....Site updater. No host change is needed: the updater takes the prefix from
coverage_report_url(never constructs it) and validates it against^REFs/master/<sha>/[A-Za-z0-9_/-]+/$, which accepts thecoveragereportsegment. The/etc/nginx/coverage_latest.confpointer is rewritten from the newest row. The first row from this workflow switches the site over, and the existingcoverage-site-stalealarm (more than 24 hours without a row) covers a producer that stops.Why the build is not forced to be fresh.
enable_cache=True: praktika looks up a success record by job name and digest, regardless of the producing workflow. The digest of the coverage build covers only compiled sources (build_digest_config:src,contrib,cmake,base,programs, ...), so a run at a master commit that changes no compiled source reuses the newest existing coverage build, and any shard whose inputs are unchanged reuses its profile. Only the compiled sources decide whether the build is rebuilt, so commits that touch only tests, docs or CI do not rebuild it. When compiled sources changed, the build is rebuilt by this workflow itself, which is the "build only when no recent one exists" case.I did not implement "fetch the binary of the latest master commit that has a coverage build and run on HEAD": the report maps profile counters to source lines, and the row and S3 prefix are keyed by the run's commit, so a binary from an older commit with a HEAD checkout would produce a wrong report attributed to the wrong sha. A scheduled workflow always checks out HEAD, and there is no existing praktika mechanism to pin the checkout to an older sha. The digest cache gives the same saving exactly when it is valid.
Trade-offs and risks.
concurrencygroup has no cancel, so runs queue and GitHub keeps only the newest pending one.MasterCI(master_coverage_urlinci/jobs/llvm_coverage_job.pyandgenerate_diff_coverage_report.sh). Once the master coverage jobs are removed, that baseline lookup needs to learn theCoverageReportpath (and cope with a 3-hour cadence instead of one report per commit). This is deliberately not changed here and has to be handled together with the sibling PR.store_data.pypre-hook, sollvm_coverage_job.pytakes itsgh apifallback for the commit list. On master that list is unused.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Workflow [PR]
Sync PR [sync-upstream/pr/124765]
Version info
26.10.1.1945-master(included in26.10and later)