Merged
fix(installer): honor dependency refs when reinstalling plugins #241
fix(installer): honor dependency refs when reinstalling plugins #241
Merged
tianjunAdd on Oct 30
tianjun
tianjun
Oct 30

描述

重复安装插件时读取当前声明的 dependencies[].ref,使已有依赖 checkout 随分支或 tag 变更。分支优先于同名 tag,保留正常 tracking 并仅做 ff-only 更新;tag 使用 detached checkout,未声明 ref 继续原 pull 路径。声明不存在的分支或 tag 时,沿用原回退策略:exit 0、发出更新失败告警、保留旧 checkout HEAD 和安装字节;不强制覆盖本地文件或提交。

本次正常重整到当前 master,仅解决测试文件尾部追加冲突:逐字保留上游全部依赖暴露路径回归,以及原 PR 的 16 项完整 CLI/Git ref 回归和 helper。

关联 Issue

Fixes #127

如何测试

同一远端 DevEnvC_rN2D6,Ubuntu 20.04 aarch64、Node 20.20.2、Git 2.51.2,实际安装 CANN 9.0.0。仅执行 Host 文件、Git 和完整安装器 CLI,未执行模型或 NPU。

  • 同一套原生 npm test,包含原有 pretest 插件构建:未修改目标基线 260 项中 254 通过、6 失败;候选及干净提交树均 260 通过、0 失败、0 跳过。
  • 原 16 项 ref 回归及上游路径暴露用例均保留全部断言,覆盖实际提交和安装字节、同名 tag、分支 tracking、脏文件、未跟踪文件、本地分叉、非法 ref、错误 origin 及失败回退。
  • 历史 marketplace SHA/Gitlink 断言保留;当前目标的相关 marketplace 条目与固定 Gitlink 一致,该测试在基线、候选和干净树均通过。
  • 两个实际变更文件通过原生 pre-commit;原生 OAT hook 仅按 filetype、license 阻断。独立 oat-py 1.0.3 对两个适用文件的工作/干净树实跑,三类发现分别为 filetype 0、license 0、copyright 2。相同两项版权发现也存在于未修改目标基线,相关头部字节完全一致;版权缺口尚未解决,不声称完整 OAT 通过。另外七栏为固定占位,不计为已执行检查。
  • 单提交、作者与提交者身份、干净工作树、固定子模块完整历史,以及完整 bundle 的独立恢复、无 alternates 和完整 fsck 均已核验;正常 Git/LFS 精确租约推送完成。

当前目标:42d62f162366455a0f23ccbfecaaa9cece4f7855。
当前唯一源提交:59d435890b8be091c4910f866e56f52ae502c27c。
当前源流水线 #729的实际 checkout 为 0a3fc45c334416397ae895a6542570b40765cec2,双亲已核对包含上述当前源及目标;收尾任务于北京时间 2026-11-01 04:24:23 结束。CodeCheck 实际返回 pass。

Static_Vet 明确记录 skillspector SKIPPED、人工 CI_DEGRADE,未实际执行。当前尚未形成全部适用检查实际执行通过的完整证明,不声称全 CI 通过。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for tianjun's contribution.)
tianjuntianjun
Oct 30 Created pull request, commit d2fd9c3b
tianjuntianjun
Oct 30 Associated issue: [Bug-Report|缺陷反馈]: 重复安装时忽略依赖ref,继续暴露旧版本
CANN-robotCANN-robotCollaborators
Oct 30 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Oct 30 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
repo-cann/cannbot ✅ xutianze, 金炯 (2/2) ✅ xutianze, 金炯 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
Oct 30 Set qq_37913898,w00934874,dengguojie,jon_jin,rxtfeng,songkai111,xutianze,pingchuantang,hanrui22,wangzheng97,hedi0515,benwallace52,linghuis,OpSphere,zihengwang2 as approver
CANN-robotCANN-robotCollaborators
Oct 30 Set qq_37913898,w00934874,dengguojie,jon_jin,rxtfeng,songkai111,xutianze,pingchuantang,hanrui22,wangzheng97,hedi0515,benwallace52,linghuis,OpSphere,zihengwang2 as approver
tianjun
tianjun
Oct 30 Comments:

/compile

likedislike
tianjuntianjun
Oct 30 Pre merge succeeded (commit_id: b4e2f5c0d41cb54d6c8c19dc6372fcb1cd2ce6a5)
CANN-robot
CANN-robotCollaborators
Oct 30 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Oct 30 Added label: ci-pipeline-running
6 event messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
Nov 1 Removed label: ci-pipeline-passed
CANN-robot
CANN-robotCollaborators
Nov 1 Comments:

Notification

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

likedislike
CANN-robotCANN-robotCollaborators
Nov 1 Added label: cann-cla/yes
tianjuntianjun
Nov 1 Modify description of pull request
tianjuntianjun
Nov 1 Modify description of pull request
tianjun
tianjun
Nov 1 Comments:

/compile

likedislike
tianjuntianjun
Nov 1 Pre merge succeeded (commit_id: 0a3fc45c334416397ae895a6542570b40765cec2)
CANN-robot
CANN-robotCollaborators
Nov 1 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Nov 1 Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Nov 1 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Nov 1 Added label: ci-pipeline-passed
tianjuntianjun
Nov 1 Modify description of pull request
tianjuntianjun
29 days ago Modify description of pull request
jon_jin
jon_jinCollaborators
25 days ago Comments:

/lgtm

likedislike
jon_jin
jon_jinCollaborators
25 days ago Comments:

@xutianze 您好,本笔(重装插件时尊重 dependency refs(+测试))已过内容评审并投 jon_jin lgtm,差第二票(2×lgtm 两账号门槛)——请您复核,无问题请补 lgtm/approve 推进收编。 — jon_jin

likedislike
xutianze
xutianzeCollaborators
25 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
25 days ago Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
25 days ago Merged pull request