fix(ci): add retry logic to VSCode IDE Companion publish steps - #6574
Conversation
The publish step failed due to a request timeout when publishing the universal VSIX to the VS Code Marketplace. Add retry logic (up to 3 attempts with 15s delay) to both the Microsoft Marketplace and OpenVSX publish steps to handle transient network failures gracefully. Closes #6550
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Thanks for the PR! Template looks good ✓ Problem: Observed bug. The 0.19.8 release (run) failed with a transient 3-minute request timeout publishing the universal VSIX to Microsoft Marketplace. Issue #6550 tracks the failure. This is a real, observed problem — not theoretical hardening. Direction: Aligned. Adding retry logic to marketplace publish steps is a standard CI resilience pattern. Release workflows should tolerate transient network failures. The linked issue confirms this caused a real release gap. Size: Not applicable — single CI workflow file, +27/-6 lines. No core paths touched. Approach: Scope is minimal and focused. The retry loop (3 attempts, 15s backoff) is the simplest solution. Adding Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题:已观测到的 bug。 0.19.8 发布运行在发布通用 VSIX 到 Microsoft Marketplace 时遇到 3 分钟请求超时。Issue #6550 跟踪了此故障。这是真实观测到的问题,而非理论性加固。 方向:对齐。为 marketplace 发布步骤添加重试逻辑是标准的 CI 弹性模式。发布工作流应能容忍瞬时网络故障。关联 issue 确认这确实导致了发布缺口。 规模:不适用——单个 CI 工作流文件,+27/-6 行。未触及核心路径。 方案:范围最小且聚焦。重试循环(3 次尝试,15 秒退避)是最简单的解决方案。为 进入代码审查 🔍 — Qwen Code · qwen3.7-max |
Code ReviewIndependent proposal (before reading the diff): I'd wrap each publish command in a bash retry loop (3 attempts, short sleep), and add Diff comparison: The PR matches this approach exactly. Both publish steps get identical retry loops (3 attempts, 15s backoff), and Findings:
No blockers found. Real-Scenario TestingN/A — This is a CI-only workflow change (no user-visible behavior). The bash retry logic cannot be meaningfully tested locally without marketplace publish tokens. The PR author validated YAML with 中文说明代码审查独立方案(读 diff 前):我会将每个发布命令包装在 bash 重试循环中(3 次尝试,短暂休眠),并为 Diff 对比: PR 完全匹配此方案。两个发布步骤都获得了相同的重试循环(3 次尝试,15 秒退避), 发现:
无阻塞问题。 真实场景测试不适用——纯 CI 工作流变更(无用户可见行为)。bash 重试逻辑无法在无 marketplace 发布令牌的情况下在本地有意义地测试。PR 作者使用 — Qwen Code · qwen3.7-max |
ReflectionThis is a clean, minimal fix for an observed problem. The 0.19.8 release failed because a single transient timeout killed the entire publish job with no retry. The fix is exactly what I'd write: wrap the publish commands in a 3-attempt retry loop with The diff is tight — only the two publish steps changed, no drive-by refactors, no over-engineering. The bash array pattern for the The only thing we can't do is test this locally — it's a CI workflow that needs marketplace tokens. But the logic is straightforward bash, YAML validates, actionlint passes. The real test will be the next release. Approving. ✅ 中文说明反思这是针对已观测问题的简洁、最小修复。0.19.8 版本发布失败是因为单个瞬时超时在无重试机制的情况下终止了整个发布任务。修复方案与我自己的独立方案完全一致:将发布命令包装在 3 次尝试的重试循环中,并使用 diff 紧凑——仅改动两个发布步骤,无顺手重构,无过度工程。 唯一无法做的是本地测试——这是需要 marketplace 令牌的 CI 工作流。但逻辑是直接的 bash,YAML 验证通过,actionlint 通过。真正的测试将是下一次发布。 批准 ✅ — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
— qwen3.7-max via Qwen Code /review
What this PR does
Adds retry logic (3 attempts, 15s backoff) to the
vsce publishandovsx publishloops in the VSCode IDE Companion release workflow. Both marketplace publish commands now use duplicate-skipping behavior so retries remain idempotent if a previous attempt reached the registry but the client timed out.Why it's needed
The 0.19.8 release run failed with a transient timeout publishing the universal VSIX to the Microsoft Marketplace. The platform-specific packages (darwin-arm64, darwin-x64, linux-x64) published successfully, but the universal package hit a 3-minute request timeout (
##[error]Request timeout: /_apis/gallery/publishers/qwenlm/extensions/qwen-code-vscode-ide-companion). There was no retry logic, so the entire job failed and the OpenVSX publish step was skipped.Reviewer Test Plan
How to verify
.github/workflows/release-vscode-companion.ymldry_run: trueto validate the overall structure without actually publishingEvidence (Before & After)
N/A — CI workflow change, no user-visible behavior.
Tested on
Environment (optional)
YAML validated with Python
yaml.safe_load.actionlintpasses when ignoring the existing custommacos-15-intelrunner label warning.Risk & Scope
Linked Issues
Closes #6550
中文说明
为 VSCode IDE Companion 发布工作流的
vsce publish和ovsx publish命令添加重试逻辑(最多 3 次尝试,间隔 15 秒)。两个发布目标都使用跳过重复版本的行为,避免某次发布请求已经到达 registry、但客户端超时后,重试被重复版本错误误判为失败。0.19.8 版本发布时,通用 VSIX 包在发布到 Microsoft Marketplace 时遇到请求超时,由于没有重试机制导致整个任务失败,OpenVSX 发布步骤也被跳过。此修改通过添加重试和幂等发布行为来处理瞬时网络故障。