Skip to content

Draft: Change retry logic for jobs

What does this MR do and why?

We could add some changes to the build to also impact its retryable status to make it more consistent, not sure though!

Changelog: changed

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

While running (can be retried) After failure (cannot be retried)
Screenshot_2024-05-31_at_15.45.06 image

How to set up and validate locally

I used the following pipeline, when one jobs fails we can still attempt to retry it (in the pipelines tab).

workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'

stages:
  - build

normal-job:
  stage: build
  environment: production
  script:
    - echo "Running..."
    - sleep 20
    - echo "Done."

fail-on-merge-train:
  stage: build
  rules:
    - if: $CI_MERGE_REQUEST_EVENT_TYPE == 'merge_train'
  script:
    - echo $CI_MERGE_REQUEST_EVENT_TYPE
    - echo "Failing because this is a merge train, sorry!"
    - exit 1
Edited by Miguel Rincon

Merge request reports