Fix missing `ci_cd_settings` relation on project creation
What does this MR do and why?
Contributes to #421050 (closed)
Problem
Relation ci_cd_settings
is automatically created for every new
project. But it only works if this relation was not touched during
project creation flow.
group_runners_enabled
field is delegated to ci_cd_settings
. When
user passes group_runners_enabled
to the Projects::CreateService
, it
initializes ci_cd_settings
relation with a nil
value. Because of that,
when the project is saved this relation doesn't create a record in
ci_cd_settings
table.
Solution
Explicitly build
an association for ci_cd_settings
if it's missing.
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.
How to set up and validate locally
- See steps to reproduce: #421050 (closed)
Edited by Vasilii Iakliushin