There were two problems here:
1. On the JS side, the reference to $widgetBody didn't refer to the
right DOM element any more. This might be because it was replaced by
the `getMergeStatus` method. Even if it wasn't, ensuring we have the
right element means that the content gets updated.
2. On the Ruby side, the `log_merge_error` method didn't update the
`merge_error` column of the merge request. Change that to update if
requested, and update in the most common cases by default.
Additionally, this would sometimes return an error hash, but it
doesn't look like this was ever used (the return value of
`MergeService#execute` appears to be unused everywhere).
The implicit interface of project services states that the "execute"
method is meant to be called when project hooks are executed.
Currently JiraService does not support any project events even though
JiraService#supported_events says that "commit" and "merge_request"
are supported. They are only used to render correct options in
JIRA configuration screen, but they are not supported.
Because of that, this commit makes "execute" method a no-op.
This commit adds a number of _html columns and, with the exception of Note,
starts updating them whenever the content of their partner fields changes.
Note has a collision with the note_html attr_accessor; that will be fixed later
A background worker for clearing these cache columns is also introduced - use
`rake cache:clear` to set it off. You can clear the database or Redis caches
separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
respectively.
If somehow a user attempted to accept a merge request that had
conflicts (e.g. the "Accept Merge Request" button or the MR itself was
not updated), `MergeService` did not properly detect that a conflict
occurred. It would assume that the MR went through without any issues
and close the MR as though everything was fine. This could cause
data loss if the source branch were removed.
Closes#20425