Skip duplicate heavy CI runs for same PR SHA - #1920
Conversation
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
|
There was a problem hiding this comment.
Pull request overview
This PR enhances the shared heavy CI gate to detect and skip duplicate heavy workflow executions for the same PR head SHA when an earlier run of the same workflow already completed successfully with a real “heavy” job.
Changes:
- Add duplicate-successful-run detection to
.github/scripts/check_heavy_ci_gate.shby querying prior successful workflow runs for the samehead_shaand validating that a matching heavy job succeeded. - Update ATOM / vLLM / SGLang heavy CI workflows to grant
actions: readand to configureCI_GATE_DUPLICATE_SUCCESS_JOB_PATTERNfor identifying successful heavy jobs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/atom-vllm-test.yaml |
Adds actions: read and configures the duplicate-success job name regex for vLLM heavy runs. |
.github/workflows/atom-test.yaml |
Adds actions: read and configures the duplicate-success job name regex for ATOM heavy runs. |
.github/workflows/atom-sglang-test.yaml |
Adds actions: read and configures the duplicate-success job name regex for SGLang heavy runs. |
.github/scripts/check_heavy_ci_gate.sh |
Implements duplicate-successful-run detection and emits the duplicate run URL in outputs/summary. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/atom-test.yaml:74
- The duplicate-run detector is configured to treat a prior successful "Offline inference smoke test" job as evidence of a prior heavy run. Since that job is intentionally ungated (runs even when the gate is closed), this can incorrectly suppress the later gated Accuracy job for the same SHA when a label/approval arrives. Limit the pattern to gated heavy jobs (e.g., Accuracy) so gate-only runs are not considered duplicates.
CI_GATE_LABELS: ci:full,ci:atom
CI_GATE_DUPLICATE_SUCCESS_JOB_PATTERN: '^(Offline inference smoke test|Accuracy)($| \(| / )'
CI_GATE_PATHS_IGNORE: |
.github/scripts/check_heavy_ci_gate.sh:145
- The workflow-runs query relies on
status=success, which is not consistently supported as a filter for this endpoint and can also allow in-progress runs to be considered if the filter is ignored. That can cause the duplicate check to silently stop working (API error) or to skip heavy CI based on a partially completed run. Instead, fetch recent runs and filter by.status=="completed"and.conclusion=="success"in jq (and consider raising per_page to reduce false negatives).
echo "Checking for prior successful ${workflow_file} heavy CI run on head SHA ${head_sha}..."
if ! run_rows="$(
gh api "repos/${REPO}/actions/workflows/${workflow_file}/runs" \
--method GET \
-F "head_sha=${head_sha}" \
-F "status=success" \
-F "per_page=20" \
--jq ".workflow_runs[] | select(.id != ${current_run_id}) | [.id, .event, .html_url] | @tsv"
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/atom-test.yaml:73
CI_GATE_DUPLICATE_SUCCESS_JOB_PATTERNis set to^Accuracy \(, but in this workflow the heavy job name is exactlyAccuracy(no parentheses). As a result, duplicate successful runs for the same PR SHA will never be detected foratom-test.yaml, and heavy CI will still run redundantly.
CI_GATE_DUPLICATE_SUCCESS_JOB_PATTERN: '^Accuracy \('
Summary
Details
The duplicate check looks at prior successful runs of the same workflow file for the current PR head SHA, then verifies that a real heavy job succeeded before skipping. This avoids treating gate-only/skipped workflow runs as duplicates.
Testing