Update top level relation error message to include errors from subrelations
Release notes
Currently errors listed under import failures for migrating GitLab groups and projects are not always enough informative. We now include errors from all nested subrelations to make it very clear why a relation, e.g a Merge Request, failed to be imported. This supports debugging and speeds up resolution time in case of problems.
Problem Statement
When users migrate GitLab projects by direct transfer or by uploading export files and a relation (e.g. a merge request) fails to be imported, there might be an error returned back that looks like this:
{
"exception_message": "Validation failed: Notes is invalid",
"exception_class": "ActiveRecord::RecordInvalid",
}
In this case, a merge request failed to be imported because the nested notes in it are invalid. But we don't know exactly what's wrong with the notes themselves. This is not very transparent and it's not clear what's wrong and what can be done to fix this problem without digging deep and debugging a specific project in order to understand why it failed.
Proposed Solution
Append exception message to include errors from all nested subrelations making it clearer why a relation failed to be imported.
For GitLab Migration it should be shown:
- in UI in the list of import failures that's available on history page
- via API.
For file-based Import/Export this should be available in the logs.
This will support faster debugging process (no need to manually debug individual projects) & speed up resolution times for problematic projects.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.