跳到主要内容

Re-run Failed Jobs

This document introduces how to re-run failed pipeline jobs, including two methods: re-running the entire pipeline and re-running only the failed job.

When a pipeline fails due to transient errors (network jitter, Runner temporarily unavailable, third-party service timeout), you need to re-run it to confirm whether it's a recoverable issue.

Configuration Instructions

Re-run the Entire Pipeline

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

Re-run Failed Jobs

  1. Go to the run details page, click the Re-run All Jobs button at the top right.
  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 is set with fail_fast: true, the jobs in subsequent stages that were skipped will also be re-executed when re-running failed jobs, as their failure is caused by upstream issues, not their own problems.

Context Variables Remain During Re-run

During re-run, values such as sha, ref, and event_name in the atomgit context remain consistent with the original run, but ATOMGIT_RUN_ID and ATOMGIT_RUN_NUMBER are updated to new values.

Re-run Restrictions

RestrictionDescription
Maximum Retry CountA single run can be re-run up to 3 times
Long-running JobsJobs running longer than 6 hours cannot be re-run
Configuration ChangesRe-runs use the workflow configuration from the original commit, and do not read the latest configuration

Frequently Asked Questions

Q: After re-running, 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 re-running failed jobs, the logs of previously successful jobs are gone?

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

Q: Can I modify parameters and re-run?

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