chore(deps): 升级 go-sdk 到 v7.26.15 修复 GetBucketInfo 空 ctime 解析错误#456
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: YangSen-qn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request updates the github.com/qiniu/go-sdk/v7 dependency to version v7.26.15 and documents the changes in the changelog. The reviewer pointed out that the changelog update was incorrectly made to a historical release section instead of the latest or upcoming release, which could lead to an inconsistent version history.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
BucketManager.GetBucketInfo 在服务端未返回 ctime 字段时 time.Parse(time.RFC3339, "") 会抛错(cannot parse "" as "2006"), 导致 qshell get / qdownload / qdownload2 在探测空间公私属性时失败。 v7.26.15 新增 parseBucketCreatedAt 助手对空字符串做容错, 同时 BucketInfo.Ctime 字段类型由 int 改为 time.Time,未返回时为零值。
|
/review -claude |
There was a problem hiding this comment.
Review: dependency bump go-sdk v7.26.14 → v7.26.15
No blocking issues found.
This is a clean, well-scoped patch-level dependency bump. Reviewed across correctness/quality, performance, security/supply-chain, and documentation:
- Build & compatibility:
go build ./...andgo vet ./iqshell/storage/bucket/...pass. The SDK'sstorage.BucketInfo.Ctimechanged frominttotime.Time, and qshell aliases it viatype BucketInfo storage.BucketInfo(iqshell/storage/bucket/bucket.go:30) with a pointer conversion. Since qshell never reads.Ctime(GetBucketiniqshell/storage/bucket/operations/bucket.goonly prints other fields), the type change causes no source breakage or behavior change in qshell output. - Security / supply-chain:
go.sumis consistent — both the module zip hash and the/go.modhash forv7.26.15are present, and stale intermediate entries (v7.26.11–v7.26.14) are correctly removed. The module-graph/go.modhash is unchanged, as expected for a code-only patch. - Performance: No hot-path impact.
GetBucketInfois called once per command/batch, not per object. - Documentation: The
CHANGELOG.md2.19.10 entry is accurate — version follows 2.19.9, date2026-07-09is chronological, and the described SDK fix (emptyctimeno longer failingtime.Parse) is correctly characterized as an upstream SDK change.
Note: iqshell/storage/bucket/domain.go:43 (Ctime *data.Int) belongs to qshell's local DomainInfo struct and is unrelated to the SDK's BucketInfo; it is correctly untouched.
变更背景描述
服务端在部分情况下返回的
GetBucketInfo响应中ctime字段为空字符串,go-sdk旧版本对该字段直接调用time.Parse(time.RFC3339, ""),触发parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"报错。qshell get/qdownload/qdownload2在info.IsPublic == false时会主动调用bucket.GetBucketInfo探测空间公私属性(iqshell/storage/object/download/operations/download.go:57),命中上述场景时下载直接失败并报get bucket info error: ...。jira issue链接
无
主要变更点
go-sdkv7.26.15 新增parseBucketCreatedAt助手对空字符串做容错(返回time.Time{}),同时BucketInfo.Ctime字段类型由int改为time.Time;qshell 仓库无任何代码直接使用该字段,运行时无感知。影响范围
qshell get/qdownload/qdownload2在info.IsPublic == false探测空间属性的命令Checklist