Repository navigation
fix(ci): decouple Rust lib test compilation from 5-minute regression execution timeout (Ref #4043, Ref #4103, Ref #4104, Ref #4114) - #4116
Open
zainulhasan wants to merge 1 commit into
Conversation
…execution timeout (Ref lbjlaq#4043, Ref lbjlaq#4103, Ref lbjlaq#4104, Ref lbjlaq#4114) - Replace the redundant cargo check step (already covered by cargo clippy --all-targets --all-features) in Check Rust Code with cargo test --lib --no-run (timeout-minutes: 20). - Keep timeout-minutes: 5 on Run critical-path Rust regression tests so it strictly bounds test execution (~0.4s-1s) rather than cold compilation and linking of 450+ crates on macos-latest and windows-2025 after Cargo.lock cache invalidation, allowing Swatinem/rust-cache@v2 to persist beta test build artifacts.
zainulhasan
requested review from
cubelikeplayDaniel,
jeikl and
lbjlaq
as code owners
November 28, 2026 03:38
This branch has not been 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.
变更类型
基于的分支与版本号
beta(06e99876,v5.0.5-beta.6)84b9f2ea引入并在 CI run46101969413触发的Check Rust Code超时回归)当前问题、对用户使用体验会产生什么问题或影响
beta合入84b9f2ea并随后在06e99876更新Cargo.lock后,CI run46101969413的Check Rust Code (macos-latest)与Check Rust Code (windows-2025)均在Run critical-path Rust regression tests步骤触发5 分钟超时失败。cargo clippy与cargo check仅生成.rmeta元数据,不生成完整.rlib代码生成产物和testprofile 二进制;一旦Swatinem/rust-cache@v2未命中缓存,Run critical-path Rust regression tests必须在timeout-minutes: 5内从零编译并链接 450+ 个 crate,导致步骤在测试运行前就超时中止,连带跳过Post Cache Rust dependencies,使后续基于beta的 PR 也持续卡在冷编译超时上。84b9f2eaand theCargo.lockversion bump in06e99876, CI run46101969413failed on bothCheck Rust Code (macos-latest)andCheck Rust Code (windows-2025)withThe action 'Run critical-path Rust regression tests' has timed out after 5 minutes.cargo clippy --all-targets --all-featuresandcargo checkonly emit.rmetametadata rather than full.rlibcodegen or a linkedtestbinary. On a coldSwatinem/rust-cache@v2cache miss, compiling and linking 450+ crates inside thetimeout-minutes: 5step exceeded 5 minutes before any test executed, which also skippedPost Cache Rust dependenciesand leftbeta's cache unpopulated for downstream PRs.解決方案
check-rust中与前一步cargo clippy --all-targets --all-features重复的Check Rust compilation(cargo check)替换为Compile critical-path Rust test binary(cargo test --lib --no-run,timeout-minutes: 20)。Run critical-path Rust regression tests与Run admin & deep-health parity tests (Linux)的timeout-minutes: 5不变,使其严格守卫测试执行耗时(~0.4s–1s)而非冷编译耗时,并恢复Swatinem/rust-cache@v2缓存保存。Check Rust compilation(cargo check) step—already covered bycargo clippy --all-targets --all-features—withCompile critical-path Rust test binary(cargo test --lib --no-run,timeout-minutes: 20).timeout-minutes: 5onRun critical-path Rust regression testsandRun admin & deep-health parity tests (Linux)so the 5-minute timeout strictly guards test execution rather than cold crate compilation, allowingSwatinem/rust-cache@v2to persist build artifacts onbeta.提交清单(组内独立、可单独回退)
5eee1564fix(ci): 将 Rust 测试二进制编译与 5 分钟回归执行超时门禁解耦 / Decouple Rust test compilation from 5-minute regression timeout每项提交引起的变化和影响面
check-rust作业。release.yml零影响。自检(与 CI 相同的命令)
cd src-tauri && cargo fmt -- --check(未修改 Rust 源码;actionlint .github/workflows/ci.yml与yq '.' .github/workflows/ci.yml > /dev/null均零报错通过)cd src-tauri && cargo clippy --all-targets --all-features(未修改 Rust 源码;已跑cargo test --lib --no-run验证最新beta测试目标编译)npm run build(未修改前端文件;PR 合入触发Build Frontend与全平台check-rust验证)cargo test --lib --no-run(1m 02s)及 CI 同款 13 模块回归套件cargo test --lib -- --test-threads=1 ...(186 passed; 0 failedin0.90s)防回归与并发安全检查
RwLock/Mutex/ 全局状态:已确认持锁区间无同锁重入、无调用可能隐式加锁的跨层公开方法、无跨.await持同步锁或持锁 I/O(不涉及代码锁改动)/health?deep=1与/v1/models在刷新后可正常响应(不涉及代理代码改动)cd791f70在内的全部modules::integration::tests与 13 模块关键路径测试(186/186 通过,securityd日志零弹窗)署名
@zainulhasan