Skip to content

[CI] Unrelated PR comments can cancel in-flight ANSI runs #12908

Description

@felipepessoto

Bug description

Backend: VL (Velox)
Gluten version: main branch

.github/workflows/velox_backend_ansi.yml listens for every created issue_comment, while its workflow-level concurrency group is stable per PR and has cancel-in-progress: true:

on:
  issue_comment:
    types: [created]

concurrency:
  group: ${{ github.repository }}-ansi-${{ github.event.issue.number || inputs.pr_number }}
  cancel-in-progress: true

The /ansi-test and /ansi-analyze command check is only applied later at jobs.check-comment.if. Workflow-level concurrency is evaluated before that job condition, so any unrelated conversation comment on the same PR can:

  1. Start an issue_comment workflow in the same concurrency group.
  2. Cancel an in-flight /ansi-test or /ansi-analyze run.
  3. Skip check-comment because the new comment is not an ANSI command, leaving no replacement run.

Expected behavior: Only a recognized ANSI command or a manual workflow_dispatch run should cancel an older ANSI run for the same PR.

Actual behavior: Any newly created PR conversation comment can cancel it.

Confirmed reproduction

This was reproduced on PR #12906:

  1. At 2026-08-27T05:38:58Z, this comment containing /ansi-test started ANSI run 33043165559.
  2. The workflow acknowledged the active run, and build-native-lib started at 05:39:12Z.
  3. At 05:39:40Z, an unrelated follow-up comment was posted.
  4. Two seconds later it created non-command ANSI run 33043202388 in the same concurrency group.
  5. The original run's build-native-lib job was cancelled at 05:39:59Z, while every job in the replacement run was skipped. The original ANSI run therefore disappeared without a replacement.

The same concurrency ordering caused a confirmed eight-shard Delta Spark UT cancellation and is fixed for that workflow by #12906.

Proposed fix

Mirror the command predicate from jobs.check-comment.if in concurrency.cancel-in-progress, as #12906 does for /delta-test, or route non-command comments to a unique concurrency group keyed by github.run_id/github.event.comment.id.

The latter fully isolates unrelated comments, including from the single-pending-run replacement behavior of GitHub Actions concurrency. In either approach, preserve these behaviors:

  • A newer /ansi-test or /ansi-analyze command cancels the older ANSI run for that PR.
  • workflow_dispatch can replace an older manual run for the same PR.
  • Unrelated issue and PR comments neither cancel nor displace real ANSI runs.

Related: #12906

This issue was written with assistance from GitHub Copilot CLI 1.0.80.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions