Write MergeRequest merge_status to MergeData
What does this MR do and why?
This MR introduces a data synchronisation of merge_status
from merge_requests
to merge_data
as a part of the data extraction effort. It's behind a merge_requests_merge_data_dual_write
feature flag. Initially, I was planning to do a bulk write to cover all columns via callback at once whenever update happens, but I now think it's more reusable to do it this way since we need to move these state machine logic to merge_data
anyways.
We are setting the default merge_data
attribute from merge_request
attributes when merge_data
method is called to begin with and we need to handle any updates to each columns separately. We'll turn on the FF once every update calls to these columns are covered.
FYI, Here are the columns that needs to be written to merge_data
as well and they'll be worked on as follow ups.
- merge_status - This MR
- merge_params
- merge_error
- merge_user_id
- merge_jid
- merge_commit_sha
- merged_commit_sha
- merge_ref_sha
- squash_commit_sha
- in_progress_merge_commit_sha
- merge_when_pipeline_succeeds
- squash
References
#560933
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #560933