Add new preparing state
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
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because there's no user facing change here yet.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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)