Skip to content

feat(sandbox): 接入 go-sdk v7.28.1 沙箱能力 - #463

Merged
miclle merged 4 commits into
qiniu:masterfrom
DROWNING2003:feat/sandbox-resource-sdk-v7.28.0
Sep 11, 2026
Merged

miclle merged 4 commits into
qiniu:masterfrom
DROWNING2003:feat/sandbox-resource-sdk-v7.28.0

Conversation

@DROWNING2003

@DROWNING2003 DROWNING2003 commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

本 PR 基于 github.com/qiniu/go-sdk/v7 v7.28.1,完善沙箱资源管理、控制面操作和模板构建能力。

  • sandbox resource list,查询沙箱已挂载的 GitHub 仓库和 Kodo 资源。
  • sandbox resource update,更新 Git 仓库资源的授权 Token。
  • sandbox create --resource 支持每个 GitHub 仓库资源独立配置 Token,并支持 Kodo 资源直接指定 AccessKey/SecretKey。
  • 沙箱资源、生命周期、日志和指标操作使用 SDK 的 Client 控制面 API。
  • sandbox template build 支持配置构建磁盘大小,并在构建失败时输出构建日志。
  • 补充资源与模板构建命令文档、CHANGELOG、单元测试和控制面请求验证。

Verification

  • gofmt -s -l .
  • go test -count=1 ./...
  • go test -count=1 -tags=unit ./iqshell/sandbox/sandbox/operations ./iqshell/sandbox/template/operations
  • go vet ./...
  • git diff --check

接入沙箱资源查询、Git Token 更新、Kodo 凭证和模板构建能力,补充磁盘配置、失败日志输出及命令文档。
@qiniu-prow

qiniu-prow Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Hi @DROWNING2003. Thanks for your PR.

I'm waiting for a qiniu member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Comment thread go.mod Outdated
Comment thread cmd/sandbox.go

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论

资源管理命令当前会通过连接接口改变沙箱生命周期,这是一个可能导致运行中沙箱意外终止的回归。模板构建磁盘配置、失败日志输出和 Kodo 凭证透传的相关契约未发现其他需要单独提交的问题。

验证:go test -count=1 -tags=unit ./iqshell/sandbox/sandbox/operations/... ./iqshell/sandbox/template/config/... ./iqshell/sandbox/template/operations/...;go test -count=1 ./cmd_test/...。

View job run

Comment thread iqshell/sandbox/sandbox/operations/resource.go Outdated

@DROWNING2003 DROWNING2003 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

基于 go-sdk#237 已合并的控制面 API,并按 v7.28.1 复核本 PR:

  • buildSandboxResources 删除多仓库共用 token 限制,并补充不同 token 共存测试:工作区修改已正确覆盖此前的 review 意见。
  • 资源 list/update,以及 kill、pause、logs、metrics 已改为调用 SDK 的 Client 控制面方法,避免 Connect 重置 TTL 或恢复暂停沙箱:工作区修改方向正确。
  • 工作区已将 qshell 依赖和 CHANGELOG 同步到 go-sdk/v7 v7.28.1;切到该版本后受影响的 sandbox operations 普通测试和 -tags=unit 测试均通过。

仍有一项远端 PR 未解决的问题:docs/sandbox.md 尚未补充 resource 子命令、鉴权说明和查询/更新示例,对应 review thread 3977355285。

注意:GitHub 当前 PR head 仍是 94e8ee3,以上工作区修改尚未出现在远端 PR 中;推送这些修改并补齐 docs/sandbox.md 后,之前的两个功能性 review 问题才算闭环。

@DROWNING2003 DROWNING2003 changed the title feat(sandbox): 接入 go-sdk v7.28.0 沙箱能力 feat(sandbox): 接入 go-sdk v7.28.1 沙箱能力 Sep 11, 2026
@miclle

miclle commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

LGTM

@miclle

miclle commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

/approve

@qiniu-prow

qiniu-prow Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: DROWNING2003, miclle

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@miclle
miclle merged commit 9a0117c into qiniu:master Sep 11, 2026
6 of 7 checks passed
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
qshell 2.19.13

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
* feat(sandbox): 接入 go-sdk v7.28.1 沙箱能力 by @DROWNING2003 in qiniu/qshell#463


**Full Changelog**: https://github.com/qiniu/qshell/compare/v2.19.12...v2.19.13</pre>
  <p>View the full release notes at <a href="https://github.com/qiniu/qshell/releases/tag/v2.19.13">https://github.com/qiniu/qshell/releases/tag/v2.19.13</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!20028
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants