Handle claim conflict when creating placeholder users

What does this MR do and why?

In a multi-cell cluster, saving a placeholder user during an import may trigger a cluster-wide claim lease that raises Cells::TransactionRecord::AlreadyClaimedError (gRPC ALREADY_EXISTS) when the username, email, or route is already claimed by another cell.

Gitlab::Import::SourceUserMapper#create_source_user_mapping did not rescue this error, so it propagated and crashed the import. This change treats it like the existing PG::UniqueViolation and ActiveRecord::RecordNotUnique collisions by raising DuplicatedUserError so that callers will treat AlreadyClaimedErrors like other non-unique placeholder errors.

How to set up and validate locally

Ensure RSpec tests pass and importer behavior is unaffected

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Resolves #600255 (closed)

Edited by Sam Word

Merge request reports

Loading