# PR #24065 完整报告

- 仓库：`sgl-project/sglang`
- 标题：[AMD] Update AMD CI workflow concurrency group 
- 合并时间：2026-04-29 22:39
- 原文链接：http://prhub.com.cn/sgl-project/sglang/pull/24065

---

# 执行摘要

- 一句话：修复 AMD CI workflow_dispatch 并发冲突
- 推荐动作：值得合并，变更简单明确，解决了工具链的使用体验问题。

# 功能与动机

修复手动触发的 AMD CI 重新运行（`workflow_dispatch`）在同一分支上互相取消的问题，确保每次手动运行独立进行，同时保持 PR 推送的自动取消行为不受影响。

# 实现拆解

1. **pr-test-amd.yml**：在并发组条件中增加 `github.event_name == 'workflow_dispatch'`，使手动触发的运行使用带 run_id 的唯一组名；并在 `cancel-in-progress` 条件中排除 `workflow_dispatch`，避免手动运行互相取消。
2. **pr-test-amd-rocm720.yml**：同步上述更改，组名条件增加 `workflow_dispatch`，取消条件排除 `workflow_dispatch`。
3. **nightly-test-amd.yml**：为手动触发添加专有组名前缀 `manual-`，组名条件优先检查 `workflow_dispatch`，取消条件中排除 `workflow_dispatch`。
4. **nightly-test-amd-rocm720.yml**：同步 nightly-test-amd.yml 的更改，同样增加 `manual-` 前缀和相应的并发组条件。

关键文件：
- `.github/workflows/pr-test-amd.yml`（模块 CI 配置；类别 infra；类型 infrastructure）: PR 测试 AMD 工作流，调整并发组逻辑以支持 workflow_dispatch 独立运行。
- `.github/workflows/nightly-test-amd-rocm720.yml`（模块 CI 配置；类别 infra；类型 infrastructure）: AMD nightly 测试 (ROCm 7.2)，新增手动触发专用唯一组名。
- `.github/workflows/nightly-test-amd.yml`（模块 CI 配置；类别 infra；类型 infrastructure）: AMD nightly 测试，同样增加手动触发独立组名。
- `.github/workflows/pr-test-amd-rocm720.yml`（模块 CI 配置；类别 infra；类型 infrastructure）: PR 测试 AMD ROCm 7.2，调整并发组以支持 workflow_dispatch。

关键符号：未识别

## 关键源码片段

### `.github/workflows/pr-test-amd.yml`

PR 测试 AMD 工作流，调整并发组逻辑以支持 workflow_dispatch 独立运行。

```yaml
# .github/workflows/pr-test-amd.yml (concurrency 段 )
concurrency:
  # Scheduled, run_all_tests, and manual dispatch runs get unique groups (never cancel each other).
  # PR runs share a group per branch so new pushes cancel stale runs.
  group: pr-test-amd-${{ (inputs.run_all_tests || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && format('full-{0}', github.run_id) || inputs.pr_head_sha || inputs.ref || github.ref }}
  cancel-in-progress: ${{ !inputs.run_all_tests && github.event_name != 'workflow_call' && github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' }}

```

# 评论区精华

无 review 讨论评论。

- 暂无高价值评论线程

# 风险与影响

- 风险：风险很低。变更仅涉及 CI 工作流的并发组配置，不影响任何代码逻辑、模型推理或用户功能。需确保 `workflow_dispatch` 事件被正确识别，避免与其他事件（如 `schedule`、`workflow_call`）冲突。测试可验证手动触发时组名唯一且取消行为符合预期。
- 影响：影响范围限于 AMD CI 工作流的并发行为。对用户无直接影响；对团队：手动触发 AMD CI 运行时不再相互取消，提高了调试和实验的可靠性。对系统无性能或安全影响。影响程度：低。
- 风险标记：暂无

# 关联脉络

- 暂无明显关联 PR