跳到主要内容

Rerun Failed Jobs

This document explains how to rerun failed pipeline jobs, including two methods: rerunning the entire pipeline and rerunning only the failed jobs.

When a pipeline fails due to a transient error (network jitter, Runner temporarily unavailable, third-party service timeout), you need to rerun it to confirm whether it is a recoverable issue.

Configuration Instructions

Rerun the Entire Pipeline

  1. Go to the run details page and click the Rerun All Jobs button in the top right corner.
  2. The system creates a new run record, and all jobs are re-executed, with the run number incremented.

Rerun Failed Jobs

  1. Go to the run details page and click the Rerun All Jobs button in the top right corner.
  2. The system re-executes only the failed jobs in this run, while successful jobs retain their original results.

Note: If the workflow contains stages definitions and a stage has fail_fast: true set, when rerunning failed jobs, the jobs in subsequent stages that were skipped will also be rerun, as their failure is caused by upstream issues, not their own.

Context Variables Are Preserved During Rerun

During rerun, values such as sha, ref, event_name, ATOMGIT_RUN_ID, and ATOMGIT_RUN_NUMBER in the atomgit context remain consistent with the original run.

Rerun Restrictions

RestrictionDescription
Maximum Retry CountA single run can be rerun up to 50 times
Configuration ChangesReruns use the workflow configuration from the original commit, and do not read the latest configuration

Frequently Asked Questions

Q: After rerunning, it still fails, and the logs show the same error?

A: This is not a transient issue, but a deterministic failure. Please check the logs to identify the root cause, fix the code or workflow configuration, and push again to trigger.

Q: After rerunning failed jobs, the logs of previously successful jobs disappeared?

A: The logs and results of successful jobs are retained in the details page of the new run. The status badge shows "Cached" or "Passed," and you can expand to view the original logs.

Q: Can I modify parameters and rerun?

A: Not supported. Reruns use the original trigger parameters (including workflow_dispatch inputs). If you need to modify parameters, please manually trigger via workflow_dispatch.