Skip to content

Resolve "Follow-up from "Split "Pipelines for merged results" and "Merge Train" check boxes""

What does this MR do?

merge_trains_enabled and merge_pipelines_enabled are delegated to project. In issue #283966 (closed), it was suggested that we amend the factory so that merge_trains_enabled and merge_pipelines_enabled can be passed it on project creation in tests. This can reduce the number times we need to write update!. It also improves performance in a few areas due to fewer UPDATE queries when using let_it_be:

ee/spec/services/merge_trains/create_pipeline_service_spec.rb

  • 11.9991s -> 6.2654s

ee/spec/services/auto_merge/merge_train_service_spec.rb

  • 14.5503s -> 13.6308s

A few tests fail when this strategy is used for certain specs (which is why they are ommited):

https://gitlab.com/gitlab-org/gitlab/-/pipelines/228615442/test_report

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #283966 (closed)

Edited by Saikat Sarkar

Merge request reports