Repository navigation
[4.2-dev] ci: reuse verified ONNX Runtime in builds - #33421
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? |
|
Queue requested — the merge queue status continues in this comment ↓. |
|
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: 482856b89293f47c650918ad9bb9fabfd1f17155
Assessment: approve
No actionable correctness or design defects found. The change keeps checksum verification and atomic installation in the existing downloader while adding an optional versioned ONNX preload.
Model: gpt-6.1-terra / max
Session: 01a21ea1-c772-7b90-b7f9-8f6ec1038a49 · slot 2 · generation 12
Validation:
-
Isolation preflight passed. The downloader shell suite passed, including mocked fallback, corrupt-preload rejection, permission handling and concurrent installation; receipts and logs are retained in the diagnostic directory.
-
An offline Makefile probe selected and installed synthetic preloads for both Linux architectures with overridden checksums.
-
The published amd64 and arm64 image layers contain the ONNX files at the expected paths with the pinned checksums. The sampled image manifests retain the previous base layers, and their builder configurations match.
Limitations:
-
A complete Docker image build and macOS execution were not run locally.
-
The shared-build image's future preload export was not independently verified. Local fallback tests used a mock curl.
✅ Merged into
|
## What type of PR is this? - [x] Test and CI ## Which issue(s) this PR fixes: Related to #26664. ## What this PR does / why we need it: The shared `ci-builder` image 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 log](https://github.com/matrixorigin/matrixone/actions/runs/46103004052/job/140849806576) Expose 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](#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 existing `ci-builder` image, confirm the preload hit in Shared Build on both branches. ### Validation - The downloader suite passed on macOS and Linux amd64/arm64. Running the real ONNX Makefile target under a separate Linux UID reused the verified `0664` library in directories with and without write access. - Built a network-disabled amd64 image fixture with the actual export and copy instructions and the verified published ONNX artifact. Both branches installed through the versioned link and rejected a corrupt preload while preserving the previous destination. The loader resolved the artifact dependencies. - Both branches reused the published arm64 library offline. With the preload absent, a real loopback HTTPS primary 404 selected the fallback and installed byte-identical verified data on both branches.
What type of PR is this?
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 mode0644. A missing cache invokes the existing HTTPS and LFS fallback. A corrupt preload is rejected without replacing the destination.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 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
sha256sumand no curl succeeded and installed mode0600was 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-devand 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.