Repository navigation
ci: warm reusable SCA analysis caches - #28101
Merged
XuPeng-SH merged 7 commits intoSep 4, 2026
Merged
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
force-pushed
the
codex/warm-sca-analysis-cache
branch
from
September 3, 2026 23:13
44dcaff to
73e5594
Compare
XuPeng-SH
force-pushed
the
codex/warm-sca-analysis-cache
branch
from
September 3, 2026 23:57
73e5594 to
61b2a8f
Compare
XuPeng-SH
force-pushed
the
codex/warm-sca-analysis-cache
branch
from
September 4, 2026 00:14
61b2a8f to
47cdb78
Compare
XuPeng-SH
force-pushed
the
codex/warm-sca-analysis-cache
branch
from
September 4, 2026 02:53
b95ba86 to
479c48b
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue(s) this PR fixes:
Refs #28100
What this PR does / why we need it:
Adds the trusted main producer for the golangci-lint analysis cache consumed by matrixorigin/CI#444, and splits reusable analyzer commands without changing the complete SCA contract.
make static-checkremains the full package-graph verification, molint, header, dependency, and golangci entry point.make static-check-analysisremains full./...package-graph verification plus molint and golangci for PR CI; the trusted CI workflow owns conservative license scope selection.make static-check-golangciexists only so the producer can populate the cache consumed by golangci. It does not repeat package-graph, molint, or license validation because the producer is not a validation gate and golangci itself owns cache population.This producer is a cache optimization, not a reduced validation gate. PR SCA continues to run complete package-graph verification, both full-package analyzers, and all applicable license checks.
QA test plan
Fast checks completed at the current heads:
make static-checkstill contains package-graph, molint, both license, and full golangci checks;make static-check-analysisstill contains package-graph, full./...molint, and full golangci;./...golangci without repeating package-graph, molint, or license work;An earlier Linux arm64 4 CPU/8 GiB cold run showed concurrency 1 fits where automatic concurrency can OOM. No full local hot-duration result is claimed.
Staged acceptance and rollback
matrixorigin/CI#444 must merge first. Then rerun this PR to validate the new cold consumer/fallback path. A trusted main cache cannot be published safely from an unmerged PR, so exact-hit timing is measured after this producer first runs on main: record cache size, exact/fallback hit state, restore time, analyzer time, and total SCA against issue #28100 baseline of 45m24s average and 43m40s median.
The initial 20 to 30 minute common-PR range is an estimate, not a measured result. If the cache is unavailable, corrupt, or rejected, PR SCA falls back to the complete cold analyzer path; disabling the restore action rolls back only the optimization, not test coverage.
Dependency and merge order: matrixorigin/CI#444 first, then this PR.
Path-compatibility correction
The producer now keeps
GOMODCACHEat the deterministic$GITHUB_WORKSPACE/.sca-go-module-cachepath also used by the optimized PR consumer..gitignoreand.licenserc.ymlexplicitly exclude that CI-only directory, so the stable path does not pollute the worktree or expand complete license scans. The shared v3 restore action includes module root,GOMODCACHE,GOROOT, andGOCACHEin its compatibility identity because golangci-lint package hashes contain absolute compiled-file paths.Historical trusted-producer run 33789617303 and PR SCA run 33828032583 confirm that the relevant runner pool uses the same four absolute roots. If a runner has a different layout, it receives a different outer lineage and performs a complete cold analysis instead of reporting a misleading exact hit. The companion action includes a deterministic test that changing any compatibility input changes the cache identity.
Network-failure hardening
SCA run 33837308158 exposed a separate Prepare ENV failure before analysis began. The approximately 1.0 GB Go module archive restored only about 10.7% before timing out, the full native-cache restore was reset, and the fallback then downloaded ONNX Runtime twice: the first standalone
make thirdpartiessucceeded, butmake cgocorrectly discarded that generation because it had no complete provenance stamp and the second raw GitHub download exhausted all four SSL-connect retries.This revision now also:
make cgoowner when the full native cache misses;The companion matrixorigin/CI#444 consumer restores this small archive only when the full native cache is unusable. A missing or corrupt fallback remains an optimization miss and uses MatrixOne's existing checksum-verified download path. The consumer no longer invokes standalone
make thirdparties, so a cold fallback performs one complete native generation and can download ONNX at most once.Additional exact-head checks: actionlint 1.7.12 and
git diff --checkpass; a Make dry-run provesONNX_PREBUILT_DIRreaches the platform-specific ONNX recipe; all eleven license-scope tests and both analysis-cache contract test suites in CI#444 pass.