Skip to content

Add better error message to MembersMapper#ensure_default_member!

What does this MR do?

This MR adds a more detailed error message to Gitlab::ImportExport::MembersMapper#ensure_default_member!.

Currently whenever project import fails it is not necessarily clear that the problem is with importer user not being able to be added to project members. There is an issue in EE (https://gitlab.com/gitlab-org/gitlab-ce/issues/64377), import to SSO enforced group fails with Validation failed: User is not linked to a SAML account and it is not obvious that this error happened with importer before even attempting the import. I am adding an additional string to the error message to indicate a potential problem with importer user. Solution to the above issue is to link importer account with SAML account.

In the case above, a new error message will become Error adding importer user to project members. Validation failed: User is not linked to a SAML account

I am adding a changelog entry since this error message is visible when project import status is fetched via API.

Does this MR meet the acceptance criteria?

Conformity

Edited by George Koltsov

Merge request reports