Warn user that some records were not exported
When exporting projects information, there are situations where an error occurs, and to not halt the whole export process, the solution we apply is to skip the data that failed, log the error and continue the export. However, the user isn't warned that errors occurred during the process, which isn't ideal.
This problem occurs in Gitlab Migration and Gitlab Project Export because both use the same code to export project data.
Known places where we skip data:
- When exporting uploads that couldn't be saved on the disk due to the length of the file name that is too long - !46674 (merged)
- When the merge request diff file is missing, and instead, a blank diff is exported. - #370741 (closed)
Possible solutions
GitLab Migration
Draft: we need to store the errors in the database when they occur. Then to display in GitLab Migration, we need to expose the errors in the API so the target instance can fetch the list of the errors that occurred in the source instance when exporting the files.
Project Export
Draft: we can add the errors to the email sent to the user when the export file is generated. Also, we could expose it in the API.