Merged
Conversation
Add comprehensive timeout handling and progress logging for large file uploads to prevent hanging during asset sync: - Add configurable timeout (default 10min, 30min for uploads) - Add progress monitoring for socket connection and data transfer - Accept all 2xx status codes as success (not just 200) - Improve error messages with detailed status and timing info - Show upload speed and duration for better debugging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove the need for users to manually input tag_name when triggering the GitCode sync workflow. The workflow now automatically extracts the version tag from the branch name. Supported branch name patterns: - release/v1.0.0 - mkdir700/v1.0.0 - conductor/v1.0.0 - v1.0.0 - etc. This improves the workflow UX by reducing manual input and ensuring consistency between branch names and release tags. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update workflow to properly handle GitHub Actions UI where users can: 1. Select a tag directly from the "Tags" tab (preferred method) 2. Or use a branch name containing a version tag (fallback) The workflow now checks github.ref_type to determine if the selected ref is a tag or branch, and handles both cases appropriately. This provides a better UX by supporting the native GitHub tag selection interface while maintaining backward compatibility with branch-based workflows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Caution Review failedThe pull request is closed. 概览此次更改调整了发布工作流程的触发机制与标签派生逻辑,并增强了资源上传脚本的超时处理、进度报告及 HTTP 响应处理能力,以支持更大规模的上传操作。 变更内容
序列图sequenceDiagram
participant User
participant Workflow as 工作流程
participant GitHub as GitHub API
participant Uploader as 上传脚本
rect rgb(240, 248, 255)
Note over Workflow: 标签派生阶段
User->>Workflow: 触发工作流(选择 ref)
Workflow->>Workflow: 检查 ref_type
alt ref_type = tag
Workflow->>Workflow: 直接使用 ref_name 作为 TAG_NAME
else ref_type = branch
Workflow->>Workflow: 从分支名提取版本标签
alt 提取成功
Workflow->>Workflow: TAG_NAME = 提取的版本
else 提取失败
Workflow->>Workflow: 错误退出
end
end
end
rect rgb(240, 255, 240)
Note over Workflow: 发布体获取阶段
alt release_body 已提供
Workflow->>Workflow: 使用提供的 release_body
else release_body 未提供
Workflow->>GitHub: 基于 TAG_NAME 获取发布信息
GitHub-->>Workflow: 返回发布体或错误
Workflow->>Workflow: 使用默认描述作为备选
end
end
rect rgb(255, 250, 240)
Note over Uploader: 上传处理阶段
User->>Uploader: 上传资源(启用进度报告)
Uploader->>Uploader: 设置请求超时(10 分钟)
Uploader->>Uploader: 记录开始时间
Uploader->>Uploader: 监听响应进度(每 1 MB 记录)
Uploader->>Uploader: 监听套接字连接事件
alt HTTP 2xx
Uploader->>Uploader: 计算耗时与速度
Uploader-->>User: 返回成功(含状态、耗时、速度)
else 超时
Uploader->>Uploader: 销毁请求
Uploader-->>User: 返回超时错误
else HTTP 非 2xx
Uploader-->>User: 返回状态码与响应片段
end
end
评估代码审查工作量🎯 3 (中等) | ⏱️ ~20 分钟 此次变更涉及两个文件的逻辑修改:工作流程中的标签派生与发布体获取逻辑需逐一验证边界情况(标签与分支提取),上传脚本中的超时、进度报告及 HTTP 状态处理涉及多个新的交互点,整体复杂度中等。 可能相关的 PR
诗
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The GitCode release workflow's manual trigger inputs were not aligned with the desired user experience for selecting release tags. Previously,
tag_namewas a required input, forcing users to always provide it.Changes
.github/workflows/sync-release-to-gitcode.yml:tag_nameinput, as it's now derived from the selected ref (tag or branch).release_nameinput description to clarify it's optional and defaults to the tag name.release_bodyinput description to clarify it's optional and fetched from GitHub if not provided.workflow_dispatchjob logic to correctly handle manual triggers:github.ref_nameandgithub.ref_typeto determine if a tag or branch was selected.TAG_NAMEis set directly fromgithub.ref_name.v1.0.0) from the branch name. If extraction fails, it exits with an informative error message.release_bodyis not provided has been refined to use the determinedTAG_NAME.Testing
release/v1.2.3). Verify the workflow extracts the tag correctly.release_nameandrelease_bodyinputs.Summary by CodeRabbit
发布说明
新功能
改进