Repository navigation
build: reuse native and Go caches in CI image builds - #26086
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review on exact head 533ac4f3086cd52abef98d4ce755b81b46a64e21 found one compatibility blocker: the global .git/ exclusion strips version/commit metadata from the existing Docker image paths, where empty commit IDs also defeat runtime binary-compatibility discrimination. The new native/Go cache orchestration with mo-auto-test #154 otherwise closes correctly; BuildKit checks for both Dockerfiles, the new Make target dry-run, diff checks, thread audit, and all PR CI checks are clean.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Re-reviewed the exact latest head. The previous VCS-metadata blocker is closed: .git is no longer excluded repository-wide, while the trusted cache workflow scopes that exclusion to the CI path and passes explicit branch/commit/version values. The new build also fails fast on a missing commit ID and verifies the embedded commit from the built binary. Native compile/link/runtime-load closure is consistent with the Makefile contract. Both Dockerfiles pass BuildKit --check with no warnings, the new Make target dry-run is correct, diff/merge-tree checks against current main pass, and all PR CI checks are green. No blocking correctness, performance, or lifecycle issue found.
) ## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25782 (validation infrastructure only; this PR does not close the issue) ## What this PR does / why we need it: - Adds a CI-specific multi-stage Dockerfile that separates native dependencies, Go build cache, and the final runtime image. - Adds a Make target that consumes prebuilt CGO and third-party libraries instead of rebuilding them after every source change. - Excludes local native outputs from the Docker context so stale host artifacts cannot overwrite cached image contents. This is the MatrixOne half of the change. The mo-auto-test PR supplies the trusted registry/cache orchestration. Validation: - bash syntax and Make dry-run checks passed. - git diff --check passed. - TKE validation run 29981557105 built the image in 8m23s versus 19m05s in run 29938558644 (10m42s / 56% faster). COPY go.mod/go.sum took 0.0s and COPY . . took 1.9s. --------- Co-authored-by: XuPeng-SH <[email protected]>
) ## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25782 (validation infrastructure only; this PR does not close the issue) ## What this PR does / why we need it: - Adds a CI-specific multi-stage Dockerfile that separates native dependencies, Go build cache, and the final runtime image. - Adds a Make target that consumes prebuilt CGO and third-party libraries instead of rebuilding them after every source change. - Excludes local native outputs from the Docker context so stale host artifacts cannot overwrite cached image contents. This is the MatrixOne half of the change. The mo-auto-test PR supplies the trusted registry/cache orchestration. Validation: - bash syntax and Make dry-run checks passed. - git diff --check passed. - TKE validation run 29981557105 built the image in 8m23s versus 19m05s in run 29938558644 (10m42s / 56% faster). COPY go.mod/go.sum took 0.0s and COPY . . took 1.9s. --------- Co-authored-by: XuPeng-SH <[email protected]>
) ## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25782 (validation infrastructure only; this PR does not close the issue) ## What this PR does / why we need it: - Adds a CI-specific multi-stage Dockerfile that separates native dependencies, Go build cache, and the final runtime image. - Adds a Make target that consumes prebuilt CGO and third-party libraries instead of rebuilding them after every source change. - Excludes local native outputs from the Docker context so stale host artifacts cannot overwrite cached image contents. This is the MatrixOne half of the change. The mo-auto-test PR supplies the trusted registry/cache orchestration. Validation: - bash syntax and Make dry-run checks passed. - git diff --check passed. - TKE validation run 29981557105 built the image in 8m23s versus 19m05s in run 29938558644 (10m42s / 56% faster). COPY go.mod/go.sum took 0.0s and COPY . . took 1.9s. --------- Co-authored-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
issue #25782 (validation infrastructure only; this PR does not close the issue)
What this PR does / why we need it:
This is the MatrixOne half of the change. The mo-auto-test PR supplies the trusted registry/cache orchestration.
Validation: