已合并
fix: exit gracefully when build workdir is missing #961
liu-wei创建于 6月9日
fix: exit gracefully when build workdir is missing #961
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 liu-wei 的贡献)6月9日 添加了label:cann-cla/yes
CANN-robot
6月9日 评论:
6月9日 评论:
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
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/ops-cv | ✅ 王林木, 张磊 (2/2) | ✅ 王林木, 张磊 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
liu-wei, thanks for your pull request. All authors of the commits have signed the CLA. 👍


6月9日 修改了pull request 的描述
liu-wei
6月9日 评论:
6月9日 评论:
compile


6月9日 update merge request[project id: 7657293, iid: 961, commit_id: 534499ed86fb5a500a65dd069f6c551fc20890d3] virtual merging success
6月9日 update merge request[project id: 7657293, iid: 961, commit_id: 534499ed86fb5a500a65dd069f6c551fc20890d3] virtual merging success
6月9日 修改了pull request 的描述
liu-wei
6月9日 评论:
6月9日 评论:
已创建关联 Issue #509:[Bug-Report] analyze_ops_time.py 在 build 目录缺失时崩溃。PR Body 已回填关联编号。


6月9日 添加了label:ci-pipeline-running
CANN-robot
6月9日 评论:
6月9日 评论:
流水线任务触发成功
任务链接 [035ab2fbffc0475a8cdb4acbb73f92a5][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-06-09 19:48:14] CI执行结束


CANN-robot
6月9日 评论:
6月9日 评论:
流水线任务触发成功
任务链接 [7fc7bb62d6af4a149400151dc215b0f5][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ❌ FAILED | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_checkpr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | >>>>> |


6月9日 添加了label:api-check-pass
6月9日 删除了label:ci-pipeline-running
6月9日 添加了label:ci-pipeline-failed
liu-wei
6月9日 评论:
6月9日 评论:
compile


6月9日 update merge request[project id: 7657293, iid: 961, commit_id: e01767bd8226116b9706b8e862a05423427f9de1] virtual merging success
6月9日 update merge request[project id: 7657293, iid: 961, commit_id: e01767bd8226116b9706b8e862a05423427f9de1] virtual merging success
6月9日 删除了label:ci-pipeline-failedapi-check-pass
6月9日 添加了label:ci-pipeline-running
CANN-robot
6月9日 评论:
6月9日 评论:
流水线任务触发成功
任务链接 [e8ab814dfedf45ddb9e0806427913781][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-06-09 20:01:04] CI执行结束


CANN-robot
6月9日 评论:
6月9日 评论:
流水线任务触发成功
任务链接 [b7f71ce10e3540c8879ef7d4a623d21c][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_checkpr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | >>>>> |
[2026-06-09 19:59:27] CI执行结束


6月9日 添加了label:api-check-pass
6月9日 删除了label:ci-pipeline-running
6月9日 添加了label:ci-pipeline-passed
6月9日 添加了label:approved
6月9日 添加了label:lgtm
6月9日 关闭了关联的issue
6月9日 合入了pull request
描述
scripts/ci/analyze_ops_time.py在脚本主体直接遍历workdir(即build/binary),未对workdir本身是否存在做检查。当 CI 按算子筛选运行时,目标 SoC 的
build/binary/<soc>/bin/build_logs目录未被创建,脚本立即抛出FileNotFoundError并以非 0 退出码失败,污染 CI 流水线。修复
在脚本主体遍历前增加前置检查:
if not os.path.exists(workdir): logging.info(f"Workdir not exist: {workdir}") exit(0)workdir缺失视为"无活干、跳过",正常退出(exit 0),不阻断流水线影响范围
scripts/ci/analyze_ops_time.py(+4/-0)关联的Issue
#509
测试
build/binary/<soc>/bin/build_logs/,运行脚本,验证仍能正常解析日志并生成build/ops_cost_<soc>.csvbuild/binary目录后运行脚本,验证脚本输出Workdir not exist: ...日志并exit 0,不抛异常文档更新
无。
类型标签