Skip to content

Disallow to create different environments per job retry

Shinya Maeda requested to merge do-not-create-environment-in-job-retry into master

What does this MR do and why?

This MR revisits the previous proposal to prevent the subtransactions from happening on Job Retry.

The idea is to disallow to create different environments per job retry. This is not officially supported feature, but it seems users are accidentally configured to attempt it, for example:

The environment slug is platform-$CI_COMMIT_REF_SLUG-$GITLAB_USER_ID.

This exposes an edge case as Stan reported here #341100 (comment 712716824)

It's fine to create a dynamic environment for the initial pipeline triggerer, however, generating different environments per job retry is somewhat abnormal operations. GitLab expects that each job retry performs on the same environment.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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