Merged
oidc切换 #7342
cui_jiahaoAdd on 14 days ago
oidc切换 #7342
Merged
cui_jiahaoAdd on 14 days ago
cui_jiahao
cui_jiahaoCollaborators
14 days ago

对齐 cann/ops-math PR7091 与 cann/ops-transformer PR15274 的 OIDC 切换模式:

  • 所有含 obs-download/obs-upload 的 job 插入 huaweicloud-oidc-auth 步骤(region cn-north-4, duration 3600)
  • 移除 obs 步骤静态 access-key/secret-key(secrets.AK/SK)
  • pipeline 调用含 obs workflow(本地或 cann/.gitcode 共享 pre/codecheck)的 job 补 permissions: repository: read + id-token: write
  • 冒烟 plog 上传统一走 obs-upload(OIDC),移除冗余 upload.py 调用与静态 AK/SK 注入(已在 opencann/ops-transformer PR#43 实测验证)
  • 无 OBS 访问的 job(如镜像查询)不改动
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for cui_jiahao's contribution.)
cui_jiahaocui_jiahaoCollaborators
14 days ago Created pull request, commit af0df9bf
cui_jiahaocui_jiahaoCollaborators
14 days ago Associated issue: [Question|问题咨询]: 这个和TileLang,Triton有什么关联吗?
atomgit-bot
atomgit-bot
14 days ago Comments:

变更摘要

本 PR 将 CI 流水线中访问 OBS 的凭证方式从静态 AK/SK 切换为 OIDC 临时凭证认证,对齐 cann/ops-math PR7091 与 cann/ops-transformer PR15274 的 OIDC 切换模式。核心做法是在各 obs-download/obs-upload 步骤前插入 huaweicloud-oidc-auth 认证步骤(region 为 cn-north-4、duration 为 3600,凭证参数取自 secrets.audience、secrets.agency_urn、secrets.provider_urn),同时移除 OBS 步骤上的静态 access-key/secret-key 配置;并在 asc-devkit_action.yml 中为调用含 OBS 或其他共享 workflow 的 job 补齐 permissions 声明以启用令牌签发。

主要改动

  • 引入 OIDC 认证步骤: 在 ut_action.yml、compile_action.yml、staticcheck_action.yml 的 obs-download 前,以及 asc-devkit_action.yml 的 JOB_ut_report_lcov、A2_smoke 中新增 oidc_auth 步骤,使用 huaweicloud-oidc-auth 并传入 audience、agency_urn、provider_urn、region: cn-north-4、duration: 3600。
  • 移除静态 OBS 凭证: 各处 obs-download/obs-upload 步骤中的 access-key、secret-key(secrets.AK/secrets.SK)配置被删除,改为依赖 OIDC 临时凭证。
  • 补充 job 权限声明: 在 asc-devkit_action.yml 中为预构建、编译、CodeCheck、静态检查、各 UT 任务、UT_report 及冒烟等使用外部/共享 workflow 的 job 增加 permissions: repository: read 与 `id-[REDACTED] OIDC 换取令牌。
  • 清理冒烟任务中的凭证注入: A2_smoke 脚本中移除 export AK/export SK 环境变量注入,plog 上传统一通过 obs-upload(OIDC)完成,不再使用静态 AK/SK。
  • 保持无 OBS 访问任务不变: 如 JOB_image 等仅做镜像查询、不涉及 OBS 读写的 job 未作改动。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
14 days ago Comments:

代码审查

✅ 未发现问题,不过下面列了 1 处不太确定的地方,供你参考


🔍 另有 1 处,仅供参考(不影响合并)

下面这些地方 AI 觉得有点可疑,但把握不大,所以没有当成正式问题,也没有在代码行上留评论。列在这里只是多给你一个视角:觉得有道理可以顺手看看,觉得是误报直接忽略就行。

  • .gitcode/workflows/asc-devkit_action.yml:371 — fix: post 阶段 job_post 遗漏 permissions(id-[REDACTED] 补齐
likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
14 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
14 days ago Comments:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to 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/** ✅ Larry_liuyi, tanghaoran7 (2/2) ✅ Larry_liuyi (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
14 days ago updated PR
CANN-robotCANN-robotCollaborators
14 days ago Set mywaaagh_admin,songchangxia,tanghaoran7,shentukangjun,Larry_liuyi as approver
刘怡
刘怡Collaborators
14 days ago Comments:

/approve
/lgtm

likedislike
CANN-robotCANN-robotCollaborators
14 days ago Added label: approved
cui_jiahao
cui_jiahaoCollaborators
13 days ago Comments:

compile

likedislike
cui_jiahaocui_jiahaoCollaborators
13 days ago Pre merge succeeded (commit_id: a317f6981a844faf5b4fffe281e1226e8c1e383c)
CANN-robot
CANN-robotCollaborators
13 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
13 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
13 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
13 days ago Added label: ci-pipeline-passed
刘怡
刘怡Collaborators
12 days ago Comments:

/approve

likedislike
刘怡
刘怡Collaborators
12 days ago Comments:

/lgtm

likedislike
tanghaoran
tanghaoranCollaborators
11 days ago Comments:

/lgtm

likedislike
CANN-robotCANN-robotCollaborators
11 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
11 days ago Merged pull request