Skip to content

Conversation

@YangSen-qn
Copy link
Contributor

@YangSen-qn YangSen-qn commented Nov 26, 2025

变更背景描述

jira issue链接

主要变更点

  • fix bug
  • new feature
  • 不兼容变更

Checklist

  • 已自测
  • 已更新Readme

@gemini-code-assist
Copy link

Summary of Changes

Hello @YangSen-qn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求主要侧重于为 2.17.0 版本做准备,通过更新 CHANGELOG.md 文件来记录新增的功能(如智能分层和带签名的文件获取)以及多项下载和 listbucket2 接口的优化。此外,还在 flow.go 文件中进行了一项小的代码改进,以增强工作流处理中日志记录的健壮性。

Highlights

  • 更新日志: 为即将发布的 2.17.0 版本添加了新的功能和优化记录,包括支持智能分层、get file 支持签名等。
  • 代码优化: 改进了 iqshell/common/flow/flow.go 中工作流处理的日志记录逻辑,确保在 workInfo 为空时也能安全地记录信息。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@qiniu-prow
Copy link

qiniu-prow bot commented Nov 26, 2025

[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

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

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

你好,感谢你的贡献。这个 PR 更新了 CHANGELOG.md,增加了 2.17.0 版本的新功能和优化说明,这很好。同时,PR 修改了 iqshell/common/flow/flow.go 文件,优化了错误处理中的日志记录,现在只记录 workInfo.Data 而不是整个 workInfo 结构体,这有助于提升日志的可读性。我有一个关于 CHANGELOG.md 的建议,希望能让变更日志更清晰。具体请看我的评论。

## 优化
1. 下载对 CDN 友好,访问使 CDN 触发缓存
2. 下载废弃 --public,改为内部判定
3. listbucket2 接口优化

Choose a reason for hiding this comment

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

medium

“listbucket2 接口优化” 这个描述过于模糊,建议提供更多细节来说明具体的优化点。例如,是提升了性能、减少了内存占用,还是改变了接口行为?清晰的变更日志能帮助用户更好地理解每个版本的更新内容。

@xgopilot
Copy link

xgopilot bot commented Nov 26, 2025

Code Review Summary

Overall, this PR improves logging safety with nil checks. However, there are a few noteworthy issues to address:

Key Findings:

  1. Line 107 still logs the full workInfo struct, which contradicts the purpose of extracting workInfoData below
  2. The extracted workInfoData should be used consistently throughout the error handling block

See inline comments for details.

workList := make([]*WorkInfo, 0, f.doWorkInfoListCount)
for {
hasMore, workInfo, err := f.WorkProvider.Provide()
log.DebugF("work producer get work, hasMore:%v, workInfo: %+v, err: %+v", hasMore, workInfo, err)
Copy link

Choose a reason for hiding this comment

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

The logging here still uses the full workInfo struct with %+v. This should also be changed to use workInfoData for consistency with the error handling below. Consider extracting workInfoData before this line and using it throughout:

workInfoData := ""
if workInfo != nil {
    workInfoData = workInfo.Data
}
log.DebugF("work producer get work, hasMore:%v, workInfo: %s, err: %+v", hasMore, workInfoData, err)

This prevents verbose logging when workInfo contains complex struct data.

f.notifyWorkSkip(workInfo, nil, err)
} else {
// 没有读到任何数据
if workInfo == nil || len(workInfo.Data) == 0 {
Copy link

Choose a reason for hiding this comment

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

Since workInfoData is already extracted above (lines 109-112), use it here instead of accessing workInfo.Data directly:

Suggested change
if workInfo == nil || len(workInfo.Data) == 0 {
if workInfo == nil || len(workInfoData) == 0 {

This maintains consistency and avoids redundant field access.

@YangSen-qn YangSen-qn merged commit 186d24c into qiniu:master Nov 26, 2025
2 of 3 checks passed
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.

1 participant