Prhub

#48170 [CI] Fix cargo-deny config flag ordering

原始 PR 作者 LucasWilkinson 合并时间 2026-07-10 05:43 文件变更 1 提交数 1 评论 0 代码增减 +1 / -1

执行摘要

修复 cargo-deny 0.20 CLI 参数顺序

Rust 前端 CI 作业(Rust Frontend Cargo Style + Clippy)因 cargo-deny 0.20.2 的 CLI 变更而失败,错误信息为 'unexpected argument --config found'。PR body 引用了失败的 Buildkite 构建链接和上游 cargo-deny PR #881 及 changelog。

简单必要的 CI 修复,无需精读,但可作为处理上游工具 CLI 变更的示例。

讨论亮点

无 review 讨论,PR 仅有一个 AI 自动评论和 mgoin 的批准。

实现拆解

在 .buildkite/scripts/run-rust-frontend-cargo-ci.sh 中,将 --config rust/deny.toml 参数从 check 子命令之后移动到之前,使其成为 cargo deny 的顶层选项。

变更前:cargo deny --manifest-path rust/Cargo.toml check --config rust/deny.toml
变更后:cargo deny --manifest-path rust/Cargo.toml --config rust/deny.toml check

该脚本无其他文件变更,仅为 CI 配置修复。

文件 模块 状态 重要度
.buildkite/scripts/run-rust-frontend-cargo-ci.sh CI 脚本 modified 2.54

关键源码片段

.buildkite/scripts/run-rust-frontend-cargo-ci.sh core-logic

唯一变更文件,修复 cargo-deny 参数顺序

# 修改前(cargo-deny <0.20 兼容):
# cargo deny --manifest-path rust/Cargo.toml check --config rust/deny.toml
# 修改后(cargo-deny >=0.20 要求 --config 为顶层选项):
cargo deny \
  --manifest-path rust/Cargo.toml \
  --config rust/deny.toml \
  check \
  bans

评论区精华

没有提炼出高价值讨论线程

当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。

风险与影响

风险极低。变更仅涉及 CI 脚本中的参数顺序,且已在本地验证(cargo-deny 0.20.2 能正确解析新顺序)。不会影响模型推理、服务行为或生产环境。

影响范围仅限于 Rust 前端 CI 作业(.buildkite/scripts/run-rust-frontend-cargo-ci.sh),修复后该作业可正常执行依赖检查,避免因工具版本更新导致的 CI 失败。

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论