已合并
修改编译包名报错并更新冒烟脚本 #8695
yajie_caroline创建于 22 天前
修改编译包名报错并更新冒烟脚本 #8695
已合并
yajie_caroline创建于 22 天前
22 天前

修改编译包名报错并更新冒烟脚本

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 yajie_caroline 的贡献)
Yyajie_caroline
22 天前 创建了 pull request,commit d21c1777
atomgit-bot
atomgit-bot
22 天前 评论:

变更摘要

本 PR 主要围绕编译包名报错问题,对编译与冒烟流程的脚本及工作流进行调整:重构 .gitcode/scripts/compile.sh 中的任务分支匹配逻辑,使其按 task_nameTARGET_BRANCH 分场景执行;调整 .gitcode/scripts/pre_smoke.sh 的工作目录获取方式;优化 .gitcode/workflows/compile_action.yml 的包重命名逻辑;并改造 .gitcode/workflows/ops-nn_action.yml 中冒烟任务的执行方式、环境变量与运行环境配置。

主要改动

  • 重构 compile.sh 的编译任务分支处理:将原先按 task_name|TARGET_BRANCH 组合匹配 master 的多个 case 块,改为在单一 case "${task_name}" 内对 Compile_Ascend_X86_mobile_stationCompile_Ascend_X86_mobile_station_ubuntu24Compile_Ascend_X86_mobile_station_9030_ubuntu24 分别判断 TARGET_BRANCH,非 master 时不再编译,而是创建 build_out 并生成占位 .run 文件后退出。

  • 简化 pre_smoke.sh 的工作目录初始化:删除 cd /home/taskspaceWORKSPACE=/home/taskspace 两行,工作目录改为由冒烟执行环境通过 WORKSPACE 变量外部注入。

  • 调整 compile_action.yml 的包重命名逻辑rename_package 步骤先创建 build_out 目录,再按 inputs.task_name 是否为 compile_single 分支处理,compile_single 场景下将 ../single.tar.gz 改名为目标包名,其余场景继续对 *.run 文件进行改名。

  • 改造 ops-nn_action.yml 的冒烟任务执行方式:环境变量 org_namerepo_nameobs_path 改为从变量和事件动态获取;冒烟阶段移除 manifest-management-plugin 的部署/清理及打包上传 smoke_data.tar.gz 流程,改为直接 run 执行 pre_smoke.sh,并新增上传 slog.tar.gzobs_smoke_path/plog/

  • 更新冒烟任务运行条件与运行环境:冒烟阶段的执行条件由 env.TARGET_BRANCH == 'master' 改为 ${{ default() }},运行节点由 ['self-hosted','arch=arm','smoke=204'] 改为 ['self-hosted','npu=1','smoke=204'],并显式指定冒烟容器镜像 swr.cn-south-1.myhuaweicloud.com/pre_smoke/...

likedislike
atomgit-bot
atomgit-bot
22 天前 评论:

代码审查

审查总结

共发现 5 个问题,按优先级分布:

  • P2:3 个
    1. .gitcode/workflows/ops-nn_action.yml:377 — object-prefix 使用字面量 ${obs_smoke_path} 而非模板表达式。
    2. .gitcode/workflows/ops-nn_action.yml:368 — smoke executor 缺少 cd,pre_smoke.sh 相对路径命令与 slog 上传路径可能出错。
    3. .gitcode/workflows/compile_action.yml:71== compile_single 精确匹配漏掉 compile_single_ubuntu24,该包不产出。
  • P3:2 个
    4. .gitcode/scripts/compile.sh:160 — 9030 分支 echo/touch 仍为 kirinx90。
    5. .gitcode/scripts/compile.sh:137 — 非 master 分支 exit 0 跳过 api-check 输出(低置信度,可能为有意行为)。

各变更文件审查确认:

  • .gitcode/scripts/compile.sh — 已审查,发现 2 个问题(P3×2)。
  • .gitcode/scripts/pre_smoke.sh — 已审查,删除 cd /home/taskspace/WORKSPACE 本身无独立问题,但需与 smoke executor 的 cd 配合(已在 ops-nn_action.yml 中合并报告)。
  • .gitcode/workflows/compile_action.yml — 已审查,发现 1 个问题(P2)。
  • .gitcode/workflows/ops-nn_action.yml — 已审查,发现 2 个问题(P2×2)。

整体风险判断:本次改动主要集中在编译包名重命名与冒烟流程重构。存在 3 个 P2 级别问题——其中 object-prefix 字面量属于确定性错误,重命名漏掉 compile_single_ubuntu24 会直接导致该任务不产出包,smoke executor 缺少 cd 则依赖运行环境 cwd 约定、存在冒烟测试失败风险。建议在合入前修复 object-prefix 与 rename 条件两个确定性问题,并补充 smoke executor 的 cd。

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

💬 仅评论

likedislike
CANN-robotCANN-robot成员
22 天前 添加了label:cann-cla/yes
yajie_caroline
22 天前 评论:

compile

likedislike
Yyajie_caroline
22 天前 update merge request[project id: 7665709, iid: 8695, commit_id: c18271b722ce0c2ac167f62ab6e099b2da21493c] virtual merging success
CANN-robot
CANN-robot成员
22 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here
For more, you also can visit HICANN


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
.gitcode/** 宋常霞, tanghaoran7 (2/2) 宋常霞 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

yajie_caroline, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
22 天前 将mywaaagh_admin,zengjuan,songchangxia,tanghaoran7,shentukangjun,chaotang233,crystalhu,yangyang016,fanqirui,chenqi317,liubo75,tangweiwei2,pingchuantang,Larry_liuyi设为评审人
CANN-robotCANN-robot成员
22 天前 将mywaaagh_admin,songchangxia,tanghaoran7,shentukangjun,Larry_liuyi设为审查人
CANN-robotCANN-robot成员
22 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
22 天前 评论:

流水线任务触发成功
任务链接 [aae6a357ac8a49a995c9627e254aec94][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ⚠️ WARNING >>>>>

[2026-08-14 11:11:42]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
22 天前 评论:

流水线任务触发成功
任务链接 [ee032712b5a847e69e0ea0d42a2f0165][流水线指导]

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-08-14 10:56:16]    CI执行结束

likedislike
Yyajie_caroline
22 天前 修改了pull request 的描述
CANN-robotCANN-robot成员
22 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
22 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
22 天前 添加了label:ci-pipeline-passed
atomgit-bot
atomgit-bot22 天前进行代码检视1
.gitcode/workflows/ops-nn_action.yml
@@ -419,0 +374,4 @@
374+ access-key: ${{ secrets.AK }}
375+ secret-key: ${{ secrets.SK }}
376+ artifact-path: "${{ steps.process_checkout.outputs.path }}/slog.tar.gz"
377+ object-prefix: ${obs_smoke_path}/plog/
atomgit-bot
atomgit-bot22 天前评论:

🟡 Medium Priority

变更行 377 object-prefix: ${obs_smoke_path}/plog/。在 action 的 with: 输入中,变量插值必须使用 ${{ }} 模板表达式;${...} 是 shell 语法,在 YAML with 块中不会被求值,会作为字面字符串传给 obs-upload。对比同文件第 376 行 artifact-path: "${{ steps.process_checkout.outputs.path }}/slog.tar.gz" 以及被删除的旧代码 object-prefix: ${{ env.obs_smoke_path }}/,此处明显写错。失败模式:obs-upload 收到的 object-prefix 是字面量 ${obs_smoke_path}/plog/,slog 会被上传到错误/无效的前缀,下游无法在预期路径(${obs_path}/presmoke/2/plog/)找到 plog 日志。

建议:将 object-prefix 改为使用模板表达式 ${{ env.obs_smoke_path }}/plog/

改动建议
377
- object-prefix: ${obs_smoke_path}/plog/
377
+ object-prefix: ${{ env.obs_smoke_path }}/plog/
应用建议
likedislike
CANN-robot
CANN-robot成员
22 天前 评论:

/lgtm
/approve

likedislike
Yyajie_caroline
22 天前 update merge request[project id: 7665709, iid: 8695, commit_id: d6fedcf04694d68b88cf1fe0c6e6fbcbf6dec297] virtual merging success
此处折叠了5条事件消息 查看更多
CANN-robotCANN-robot成员
22 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
22 天前 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
yajie_caroline
22 天前 评论:

compile

likedislike
Yyajie_caroline
22 天前 update merge request[project id: 7665709, iid: 8695, commit_id: decb926e58d4edccd71476533e2344cef2538dba] virtual merging success
CANN-robotCANN-robot成员
22 天前 删除了label:api-check-pass
CANN-robotCANN-robot成员
22 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
22 天前 评论:

流水线任务触发成功
任务链接 [a26e68e78fcb4ae2a4784d91cf3c5851][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ⚠️ WARNING >>>>>

[2026-08-14 16:00:54]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
22 天前 评论:

流水线任务触发成功
任务链接 [4124657ac1434a5cb5db120fa5d87d5e][流水线指导]

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-08-14 15:47:42]    CI执行结束

likedislike
CANN-robotCANN-robot成员
22 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
22 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
22 天前 添加了label:ci-pipeline-passed
songchangxia成员
20 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
20 天前 添加了label:approved
tanghaoran
tanghaoran成员
20 天前 评论:

/lgtm

likedislike
tanghaorantanghaoran成员
20 天前 解决了最后一个问题
CANN-robotCANN-robot成员
20 天前 添加了label:lgtm
CANN-robotCANN-robot成员
20 天前 合入了pull request
CANN-robot
CANN-robot成员
20 天前 评论:

Pull Request 已合并或已关闭。

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

likedislike