Skip to content

[4.2-dev] ci: reuse verified ONNX Runtime in builds - #33421

Merged
mergify[bot] merged 6 commits into
matrixorigin:4.2-devfrom
XuPeng-SH:codex/42-verified-onnx-cache
Nov 29, 2026
Merged

mergify[bot] merged 6 commits into
matrixorigin:4.2-devfrom
XuPeng-SH:codex/42-verified-onnx-cache

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • 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 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.

@mergify mergify Bot added the kind/test-ci label Nov 28, 2026
@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Nov 28, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify

mergify Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Queue requested — the merge queue status continues in this comment ↓.

@XuPeng-SH

XuPeng-SH commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: 482856b89293f47c650918ad9bb9fabfd1f17155

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mergify mergify Bot added the queued label Nov 29, 2026
@mergify

mergify Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into 4.2-dev as 0639f29 at 04:39 UTC

Less than a minute in the queue, with no time running CI.

So far

  • ✅ Entered the queue Sun 29 Nov, 04:38 · rule release-4.2 · triggered by rule Automatic queue on approval for release-4.2
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged 04:39 · 0639f29 · squash
3 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = CI Required
    • check-neutral = CI Required
    • check-skipped = CI Required

Times in UTC · dashboard · how the merge queue works

@mergify
mergify Bot merged commit 0639f29 into matrixorigin:4.2-dev Nov 29, 2026
83 of 99 checks passed
@mergify mergify Bot removed the queued label Nov 29, 2026
XuPeng-SH added a commit that referenced this pull request Nov 30, 2026
## 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.

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants