Repository navigation
ci: reuse verified ONNX Runtime from the shared builder - #33427
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
This pull request is merged. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 8858d63fa4225b6d60718b74d36e283cae6ec148
Assessment: request_changes
The versioned preload works in an offline image fixture, but the new ONNX cache-hit path fails when a valid installed library is owned by another user. The design otherwise reuses the existing pinned artifact and centralizes verification in the downloader.
Model: gpt-6.1-terra / max
Session: 01a21fca-22ff-76e2-85da-e9ad78f4f51d · slot 3 · generation 8
- P2
thirdparties/Makefile:212: A checksum-valid ONNX library is already installed with mode 0644 but is owned by another user, such as after a container build writes into a shared checkout.
Impact: The base Makefile accepts the readable library. This change routes the cache hit through the downloader, whose unconditional chmod fails with “Operation not permitted,” causing the native build to stop. Avoid requiring chmod when a verified file already has the required permissions, while retaining permission repair for files that need it.
Evidence: With the same pinned 23,023,576-byte library owned by UID 65534 and the build running as UID 1001, nonowner-baseline.log passes and nonowner-candidate.log fails at thirdparties/download:127. Receipts checks/1795847738566834309-5.json and checks/1795847749261151869-5.json record the respective exits.
Validation:
-
The downloader regression suite passed, including the new valid and invalid preload cases.
-
A network-disabled amd64 Docker fixture executed the exact new export and cross-stage COPY instructions, then installed the source-pinned ONNX artifact through the real Makefile with curl unavailable.
-
An oversized preload was rejected while preserving the previous destination and cleaning temporary files. Linux arm64 and macOS arm64 cache-path mappings were checked.
-
Receipts, retained logs, discussion coverage, and the unchanged source head were reconciled in review-audit.log.
Limitations:
-
The complete ci-builder image was not rebuilt; the image check used a minimal fixture containing the changed instructions and pinned artifact.
-
Initial image-fixture attempts failed because of the diagnostic Docker configuration and a missing fixture utility; the corrected fixture passed.
-
The shared-build CI job was still in progress in the supplied evidence.
|
mo-bot work · Commit: Review in progress. |
8858d63 to
3b2e677
Compare
|
mo-bot review · Commit: "interrupted" |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 8d24bff23b7bc37bf1f9879bafed875d2972cf2c
Assessment: approve
The change reuses the existing verified ONNX library through a versioned image link and the shared downloader. Verified cache hits no longer attempt chmod, resolving both prior non-owner failures. New installations retain checksum verification and atomic publication, and the image preserves the cache export order.
Model: gpt-6.1-terra / max
Session: 01a22087-cef5-7962-9206-10e0932e0fda · slot 1 · generation 34
Validation:
-
The downloader regression suite passed, including cache permissions, corrupt preloads, retry behavior and atomic publication. Evidence: download-suite.log and checks/1795880909537577090-2.json.
-
All five CI builder contract tests passed. Evidence: ci-builder-tests.log and checks/1795880909333584310-2.json.
-
An offline amd64 image fixture using the current Dockerfile instructions installed the pinned library without network access. Evidence: image-fixture-prepare.log, image-fixture-build-final.log, checks/1795880984111666990-2.json and checks/1795881103763639871-2.json.
-
Make cache-path selection passed for Linux x86_64, Linux aarch64 and Darwin arm64. Evidence: cache-path-*.log and checks/1795881120499745485-2.json, checks/1795881120499758852-2.json and checks/1795881120499748114-2.json.
Limitations:
-
The full production CI builder image was not built, and current CI results were not supplied.
-
The ARM and macOS checks verified path selection only; they were not runtime tests on those platforms.
-
The first offline fixture run failed because its synthetic minimal image lacked printf. After adding that fixture utility, the same check passed.
## What type of PR is this? - [x] Test and CI ## Which issue(s) this PR fixes: Related to #33416, #26664 and #33408. ## What this PR does / why we need it: Backport the verified local ONNX Runtime path from #27325 to `4.2-dev`. Use the published Go 1.26.4 native builder image. The existing downloader owns validation and atomic installation for installed, preloaded and HTTPS sources. A warm hit restores mode `0644`. A missing cache invokes the existing HTTPS and LFS fallback. A corrupt preload is rejected without replacing the destination. | Linux architecture | Local ONNX library | Additional compressed image layer | | --- | ---: | ---: | | amd64 | 23,023,576 bytes | 8,603,979 bytes | | arm64 | 19,543,040 bytes | 7,720,445 bytes | Compared with the current base image, only the additional layer needs to be pulled when the previous layers are cached. The warm ONNX build has zero network transfer. The regular Docker images use the native base directly. Shared Build uses the existing image published from `main`. [#33427](#33427) exports its already-installed ONNX Runtime at the same versioned path with a symbolic link, so Shared Build can reuse the library even when its complete third-party fingerprint differs. The library is identical on both branches. Shared Build hits start with the next successful image publication containing that change. Validated with the published Linux libraries and external networking disabled. On amd64, cache hits with only `sha256sum` and no curl succeeded and installed mode `0600` was repaired. A corrupt preload left the original destination intact. A loopback HTTPS primary 404 reached the fallback and produced a byte-identical library. On arm64 the published library and the downloader regression suite passed. Synced to the latest `4.2-dev` and reran the Linux downloader suite. The same network-disabled amd64 image fixture verified the link exported by #33427 with the real ONNX library on both branches. Both branches passed the offline arm64 test and the loopback HTTPS primary-404 and fallback check. Approved-by: fengttt <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
Related to #26664.
What this PR does / why we need it:
The shared
ci-builderimage carries the ONNX Runtime library in its prebuilt third-party tree. A different native build fingerprint, as seen on the 4.2 Shared Build, prevents restoring the full tree. That build downloaded 21.9 MiB of ONNX Runtime over HTTPS. Shared Build logExpose the existing library at the versioned ONNX preload path using a symbolic link. The Makefile supplies the version and platform filename. The downloader checks the installed library and reuses it with read access. It verifies new files from the image or HTTPS and atomically publishes them with mode
0644. An image without the versioned entry uses the existing download path.#33421 uses the same preload path on
4.2-dev. Both branches currently pin the same Linux ONNX Runtime bytes. After the next successful publication of the existingci-builderimage, confirm the preload hit in Shared Build on both branches.Validation
0664library in directories with and without write access.