Skip to content

ALCF CI: trigger a fresh GitLab pipeline on re-runs after an unsuccessful pipeline - #648

Merged
michel2323 merged 2 commits into
mainfrom
alcf-ci-rerun-fresh-pipeline
Sep 29, 2026
Merged

michel2323 merged 2 commits into
mainfrom
alcf-ci-rerun-fresh-pipeline

Conversation

@michel2323

@michel2323 michel2323 commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Re-running the ALCF CI check could never recover from a GitLab pipeline that failed for infrastructure reasons. For example, in run 36428123880 both build:support jobs failed with stuck_pending_no_matching_runners during an Aurora runner outage. The mirror sync doesn't create a new pipeline for a SHA that GitLab already has, so the wait step kept finding the dead pipeline 66691 and failing within seconds.

On re-runs (run_attempt > 1), this PR creates a fresh pipeline through the trigger token when the newest pipeline for the SHA failed, was canceled or was skipped. In every other case (no pipeline yet, one still active, one that succeeded, or a failed lookup) the check adopts whatever the wait step finds, as before. Retrying the old pipeline instead isn't possible, because the retry would be attributed to the bot user and the Jacamar runners refuse those jobs.

The trigger runs the branch's current tip, so the step fails without triggering if the GitLab branch tip is not the head SHA, and it verifies that the triggered pipeline runs the head SHA.

Testing: let this PR's pipeline end failed or canceled (for example by canceling it in GitLab), re-run the check, and confirm that the log shows triggered fresh pipeline <id> and the check adopts that new pipeline. Re-running while the pipeline is active or after it succeeded should log nothing to re-trigger.

A mirror sync does not create a new pipeline for a SHA that GitLab already
has, so re-running the GitHub check re-adopted the old pipeline's result,
e.g. one whose jobs failed with stuck_pending_no_matching_runners during an
Aurora runner outage. On re-runs, create a fresh pipeline via the trigger
token unless one is still active for the SHA.
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.72%. Comparing base (6ab8057) to head (af786a2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #648      +/-   ##
==========================================
+ Coverage   78.95%   80.72%   +1.76%     
==========================================
  Files          56       56              
  Lines        4087     4088       +1     
==========================================
+ Hits         3227     3300      +73     
+ Misses        860      788      -72     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Trigger a fresh pipeline on re-runs only when the newest pipeline for the
head SHA failed, was canceled or was skipped. A missing, active or
successful pipeline, or a failed lookup, is left to the wait step, so a
transient API failure can no longer create a duplicate pipeline.

Replace the mirror wait loop with a single branch-tip check: a finished
pipeline for the SHA means GitLab already has the commit, and without one
the mirror sync creates the pipeline itself. Also verify that the
triggered pipeline runs the head SHA, and pass the ref with --form-string
so curl does not interpret it.
@michel2323 michel2323 changed the title ALCF CI: trigger a fresh GitLab pipeline on re-runs ALCF CI: trigger a fresh GitLab pipeline on re-runs after an unsuccessful pipeline Sep 29, 2026
@michel2323
michel2323 marked this pull request as ready for review September 29, 2026 15:04
@michel2323
michel2323 enabled auto-merge (squash) September 29, 2026 16:19
@michel2323
michel2323 merged commit 85dd4cf into main Sep 29, 2026
4 checks passed
@michel2323
michel2323 deleted the alcf-ci-rerun-fresh-pipeline branch September 29, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant