Skip to content

New option: Allow job retries for rollback deployments

What does this MR do and why?

This MR implements Add an option to disable retrying a job or a pi... (#410427 - closed).

Job retries were originally disallowed when we reworked on the feature, however, we got feedback from users that they wanted to keep the rollback deployment feature even if the "Prevent outdated deployment jobs" feature is enabled. As a quick fix we decided to exceptionally allow job-retry (See documentation for more info).

However, there are some users prefer disabling job retries too. For example, this feature was requested by GitLab SREs as an corrective action for the recent S1 SaaS incident #410427 (comment 1466534026).

Therefore this MR adds a new option allows users to choose the behavior based on their preference.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
2023-07-18_14-25 2023-07-19_11-20

How to set up and validate locally

How to setup

  1. Create a project.
  2. Navigate Project > Settings > CI/CD > General pipelines
  3. Enable or disable Allow job retries for rollback deployments option.

How to check job retries

  1. Create a .gitlab-ci.yml:
    deploy:
      script: echo
      environment: production
  2. Create new commits and run 1-2 pipelines. (Notice: If you create a new pipeline with the same commit/SHA, it's not considered as outdated. So you have to create new commits by updating README.md for example.)
  3. Visit an older pipeline page and confirm that the deploy job can't be retried.

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

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

Edited by Shinya Maeda

Merge request reports