Skip to content

Ensure retry job respects previous stage from a pipeline perspective

Tianwen Chen requested to merge 207988-check-previous-stage-before-retrying into master

What does this MR do and why?

This MR is to fix the job retry function so that the retry job cannot be executed if the previous stage fails.

How to set up and validate locally

  1. Have a pipeline similar to this:
test:
  stage: test
  script:
    - echo "testing..."
    - sleep 10
    - unknown_command
    - echo "test complete."
deploy:
  stage: deploy
  script:
    - echo "deploying"
    - sleep 15
    - echo "deploy complete."
  1. While the test job runs, cancel the deploy job.
  2. Now click retry icon on deploy job. Or wait for the test job to failed then click retry icon on deploy job.
  3. The job should turn into skipped

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #207988 (closed)

Edited by Tianwen Chen

Merge request reports