Skip to content

Add new preparing state

Patrick Bajao requested to merge 291012-add-preparing-state into master

What does this MR do?

This preparing state will be used later on to determine whether a merge request is mergeable or not (via MergeRequest#mergeable?).

We also won't check mergeability when the merge_status is set to preparing.

We set the merge_status to unchecked in MergeRequests::AfterCreateService (which is called in NewMergeRequestWorker) so we can check for mergeability once everything's prepared.

Right now, no merge requests will have their merge_status to preparing to keep backwards compatibility and to not result to incidents/downtimes on multi-stage deploy (e.g. canary).

The MergeRequest#mark_as_preparing will be later called in MergeRequests::CreateService. This will trigger the behavior that we want to achieve with the preparing state.

NOTE: This is a dependency of !56086 (merged). This MR needs to be merged first and released in 13.10. This is to ensure [multi-version compatibility (https://docs.gitlab.com/ee/development/multi_version_compatibility.html).

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 #291012 (closed)

Edited by Patrick Bajao

Merge request reports