Update diffs export for backwards compatibility
What does this MR do and why?
Mentions #227653 (closed)
In the recently merged MR !90159 (merged) we introduced a performance improvement for merge request externally stored diffs by caching those diffs locally during export. For this, we updated the import_export.yml
file to export this information under a new key, diff_export
.
I realised this approach is not backwards compatible, making exports from newer GitLab instances to older ones no longer work as before, since diffs information is now under diff_export
key and not utf8_diff
.
This MR:
- Updates
utf8_diff
method to utilize the new method that does caching, in order for the exported diff to remain underutf8_diff
key in the exported json file - From looking at the codebase,
utf8_diff
seems to be exclusively used during Project Export, making it easier to introduce caching in it, since there are no other users of this method. I didn't think about it in my previous MR. I was under the impression it's used elsewhere, but it does not look like it - Resolves a follow up #367037 (closed) to log raised exception during
diff_export
method execution
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.