Merged
ci: .修复pre-commit任务名称,解决例外备案指标问题 #3949
wujinyuan1Add on 19 days ago
ci: .修复pre-commit任务名称,解决例外备案指标问题 #3949
Merged
wujinyuan1Add on 19 days ago
wujinyuan1
wujinyuan1Collaborators
19 days ago

当前PR是否有AI参与:

[x] 否

PR功能描述 / 为什么需要这个合入**:

修复pre-commit任务名称,解决例外备案指标问题

https://gitcode.com/Ascend/torchair/issues/936

该PR关联的issue

(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #
https://gitcode.com/Ascend/torchair/issues/936

希望检视人员了解:

likedislike
Pull Request has been successfully merged by ascend-robot.
(Thank you for wujinyuan1's contribution.)
wujinyuan1wujinyuan1Collaborators
19 days ago Created pull request, commit f1812459
wujinyuan1wujinyuan1Collaborators
19 days ago Associated issue: [Doc]:需要修复pre-commit任务名称,解决看板"例外备案"指标问题
atomgit-bot
atomgit-bot
19 days ago Comments:

变更摘要

本次变更集中在 CI 流水线配置 .gitcode/workflows/PR-pipeline_torchair.yml,目的是修复 pre-commit 检查任务名称并解决例外备案指标的统计问题。主要做法是在文件变更检测阶段新增 touch_gitcode 标记输出:当改动文件列表命中 .gitcode/ 目录时置为 true,并以此控制后续编译与测试任务的执行条件;同时将代码检查任务的标识由下划线形式调整为连字符形式。

主要改动

  • pre-commit 任务名称修正: 将 CodeCheck 阶段下的任务名与 name 由 CodeCheck_pre_commit 统一改为 CodeCheck_pre-commit,修正任务标识的命名。
  • 新增 touch_gitcode 输出: 在 Detect_file_changes 阶段 outputs 中新增 touch_gitcode: ${{ steps.set-skip.outputs.touch_gitcode }},把该标记向上游 job 暴露。
  • .gitcode 目录改动识别: 在文件变更处理步骤中通过 grep -q '^\.gitcode/' modify_files.txt 判断改动是否包含 .gitcode/ 下的文件,并向 $ATOMGIT_OUTPUT 写入 touch_gitcode=true/false。
  • 编译任务跳过条件: Build_x86 与 Build_arm 的 if 条件在原有 need_build_ut == 'yes' 基础上追加 touch_gitcode != 'true',当仅改动 .gitcode 目录时不再触发编译。
  • 系统测试跳过条件: ST 任务的 if 条件同样追加 touch_gitcode != 'true',与编译任务保持一致,避免纯流水线配置改动触发系统测试。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
19 days ago Comments:

代码审查

审查结论

已审查文件

  • .gitcode/workflows/PR-pipeline_torchair.yml:发现 2 个问题(见下)

问题清单(按优先级)

  • P2 × 2,无 P0/P1/P3。

总体风险判断
本次改动本身不涉及运行时逻辑与安全边界,主要是 CI 门禁策略调整:新增的 touch_gitcode 输出与 CodeCheck_pre-commit 改名在 YAML 结构、key 拼写、output 引用(steps.set-skip.outputs.touch_gitcode ↔ id: set-skip)、表达式写法上与既有 need_build_ut 用法一致,未发现语法/引用类错误。主要风险集中在跳过策略的粒度上:条件用“存在 .gitcode/ 改动”而非“改动仅为 .gitcode/”,会让同时改动源码的 PR 绕过 Build/ST,且会让改动 build_job.yml/st_job.yml 的 PR 恰好跳过唯一会执行它的作业。建议按 above 两条修正后再合入,否则 CI 质量门禁存在可用性缺口。

类型 数量
🔴 阻塞 0
🟡 建议 2

💬 仅评论

likedislike
Incorrect?
ascend-robotascend-robotCollaborators
19 days ago Added label: ascend-cla/yes
7062 messages are collapsed here。 See more
ascend-robot
ascend-robotCollaborators
7 days ago Comments:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ascend-robot
ascend-robotCollaborators
7 days ago Comments:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ascend-robot
ascend-robotCollaborators
7 days ago Comments:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ascend-robot
ascend-robotCollaborators
7 days ago Comments:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ascend-robot
ascend-robotCollaborators
7 days ago Comments:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike