跳到主要内容

Re-run Failed Jobs

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

Configuration Instructions

Re-run the Entire Pipeline

  1. Enter the run details page and click the Re-run 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.

Re-run Failed Jobs

  1. Enter the run details page and click the Re-run failed 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, when re-running failed jobs, the jobs in subsequent stages that were skipped will also be re-executed, as their failure is caused by upstream issues, not their own.

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 at most 3 times
Long-running JobsRuns exceeding 6 hours cannot be re-run
Configuration ChangesRe-runs use the workflow configuration from the original commit, not 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 have disappeared?

A: The logs and results of successful jobs are retained in the details page of the new run, with status badges showing "cached" or "passed," and the original logs can be expanded for viewing.

Q: Can I modify parameters and re-run?

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