Repository navigation
CI: fix the LLVM coverage baseline lookup and report links after the S3 prefix change - #117718
Conversation
…orkflow prefix generate_diff_coverage_report.sh looked for the master baseline at REFs/master/<sha>/llvm_coverage/llvm_coverage.info, and llvm_coverage_job.py built links to its own artifacts as PRs/<pr>/<sha>/... . Praktika now appends the normalized workflow name to every static S3 prefix, so both keys are wrong: the baseline lives under masterci/ and the job's own artifacts under pr/. The diff report therefore fails with "Could not find baseline coverage file after checking 100 commits", and the coverage report links it does publish are dead. The job asks praktika for both prefixes and hands the script a ready-made URL per candidate commit, so the script spells no S3 key of its own. Verified against the live window: the baseline resolves for none of the last 100 master commits under the old key and for 45 under the new one, first at depth 10. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Workflow [PR], commit [ce75b7e] AI ReviewSummaryThis PR correctly switches the LLVM coverage baseline lookup and published report links over to Praktika's workflow-aware S3 prefixes. The remaining risk is on the Dockerfile side: the new pinning keeps today's baked-in toolchain path working, but it still leaves the manual toolchain/profile override surfaces inconsistent across the 2026-08-31 prefix cutover. Findings
Final VerdictChanges requested. |
The binary-builder Dockerfile and update_toolchain_dockerfile.py spell the toolchain artifacts as REFs/master/<sha>/build_toolchain_pgo_bolt_*. Praktika now appends the normalized workflow name, so an OptimizeToolchain run publishes under REFs/master/<sha>/optimizetoolchain/ and the next toolchain bump would point every binary build at a 404. The currently pinned commit predates the change and still resolves under the bare key, so the location cannot simply be rewritten. Pin it as a whole in TOOLCHAIN_S3_DIR next to TOOLCHAIN_COMMIT: today's value keeps addressing today's artifacts, and the update job rewrites both lines from the prefix praktika reports for the publishing workflow. The job refuses to write a Dockerfile that carries no TOOLCHAIN_S3_DIR rather than updating the commit alone. CLICKHOUSE_PROFILES_COMMIT defaults to "none" and nothing in the tree pins a value, so its URL takes the OptimizeClickHouse segment directly. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
TO clause matches enabled roles, and complete the AS formula
#117624
| mkdir -p /opt/clickhouse-profiles && \ | ||
| for profile in clickhouse-pgo.profdata.zst clickhouse-bolt.fdata.zst; do \ | ||
| url="https://clickhouse-builds.s3.amazonaws.com/REFs/master/${CLICKHOUSE_PROFILES_COMMIT}/collect_clickhouse_profiles_pgo_bolt_${tarch}/${profile}" && \ | ||
| url="https://clickhouse-builds.s3.amazonaws.com/REFs/master/${CLICKHOUSE_PROFILES_COMMIT}/optimizeclickhouse/collect_clickhouse_profiles_pgo_bolt_${tarch}/${profile}" && \ |
There was a problem hiding this comment.
CLICKHOUSE_PROFILES_COMMIT is still exposed as "set this to a master commit SHA", but this hard-coded optimizeclickhouse/ segment only resolves profile collections published after the 2026-08-31 prefix cutover. Older collected profiles now 404 and the build quietly falls back to Profile ... not available, so a caller asking for a specific historical profile set gets an unoptimized binary instead of the requested inputs. Could we carry the full S3 directory as a separate ARG here, like TOOLCHAIN_S3_DIR, so both vintages remain addressable?
Keep the caller-provided baseline coverage URLs; master hardcoded the same MasterCI prefix inline.
| # S3 directory of that commit's artifacts. Praktika owns the prefix layout and | ||
| # has changed it, so the location is pinned next to the commit instead of being | ||
| # spelled from it; update_toolchain_dockerfile.py rewrites both lines together. | ||
| ARG TOOLCHAIN_S3_DIR=REFs/master/${TOOLCHAIN_COMMIT} |
There was a problem hiding this comment.
TOOLCHAIN_COMMIT no longer works as a standalone override after this change. Docker re-evaluates later ARG defaults from caller-supplied earlier args, so docker build --build-arg TOOLCHAIN_COMMIT=<post-cutover-sha> also rewrites TOOLCHAIN_S3_DIR to REFs/master/<sha> and drops the required optimizetoolchain/ segment. The curl below then 404s for every newer toolchain artifact even though the Dockerfile still exposes TOOLCHAIN_COMMIT as the override surface.
Could we either pin the current legacy directory literally here and document that callers must override both args, or otherwise preserve the one-arg TOOLCHAIN_COMMIT contract for post-cutover toolchains?
LLVM Coverageerrors on every pull request:Generate LLVM Coverage Diff Reportends withERROR: Could not find baseline coverage file after checking 100 commits, andPrint Uncovered Codethen fails because the diff never ran.generate_diff_coverage_report.shhand-spells the baseline key asREFs/master/<sha>/llvm_coverage/llvm_coverage.info, andllvm_coverage_job.pyhand-spells the links to its own uploads asPRs/<pr>/<sha>/.../REFs/<branch>/<sha>/.... Praktika builds both with_Environment.get_s3_prefix_static, which now appends the normalized workflow name unconditionally after_should_include_workflow_name_in_s3_prefixwas deleted in #110081 (merged 2026-08-31). The baseline lives undermasterci/, the job's own artifacts underpr/.So the report links are dead too, silently: on https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=116552&sha=d5fa6652f262ce060c04c2206ec141660a43d597&name_0=PR&name_1=LLVM%20Coverage the published
.../PRs/116552/<sha>/llvm_coverage/generate_llvm_coverage_report/index.htmlis a 403 while the same path with thepr/segment is a 200. Those links go into the coverage comment and the CI DB row.The job now asks praktika for both prefixes. It also builds one baseline URL per candidate commit and hands the list to the script alongside the commits, so the script spells no S3 key of its own and follows a later layout change for free; it walks the two arrays by index and refuses to start if their lengths disagree.
Validation, calling the real function against the live 100-commit window: the baseline resolves for 0 commits under the old key and for 45 under the new one, first at depth 10. Driving the rewritten bash loop over the same window with the real
wget --spiderfinds it at that depth.The second commit takes the remaining hand-spelled sites in the same family.
ci/docker/binary-builder/Dockerfileandupdate_toolchain_dockerfile.pyaddress the PGO+BOLT toolchain asREFs/master/<sha>/build_toolchain_pgo_bolt_*, which anOptimizeToolchainrun now publishes underoptimizetoolchain/. Nothing is broken today only because the pinnedTOOLCHAIN_COMMITpredates the cutover and still resolves under the bare key, so rewriting the path in place would break every binary build; the location is pinned as a whole in a newTOOLCHAIN_S3_DIRnext to the commit, today's value unchanged, and the update job rewrites both lines from the prefix praktika reports. It now refuses to write a Dockerfile carrying noTOOLCHAIN_S3_DIRrather than bumping the commit alone.CLICKHOUSE_PROFILES_COMMITdefaults tononeand nothing in the tree pins a value, so that URL takes theOptimizeClickHousesegment directly.Checked and deliberately left alone:
job_hooks/promql_compliance_s3.pywrites its baseline with the same hand-spelled key it reads, owning both sides, so the cutover does not affect it. The performance comparison has the same bug and is fixed separately in #117715.Caused by: #110081
Related: #117715
Related: #117701
Related: #117580
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix
LLVM Coveragefailing to find its master baseline, and its dead report links, after the CI S3 prefix change.Workflow [PR]
Sync PR [sync-upstream/pr/117718]
Version info
26.9.1.584(included in26.9and later)