Handle duplication error
What does this MR do and why?
This change intercepts a 'project has already been taken' error during placeholder membership creation.
Rather than raising an error, we now log the occurrence as info, and continue.
This builds on the work done in this MR !180935 (merged), which turned out to only be a partial fix
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
This is tricky to replicate as it's caused by an interruption in the members pipeline, causing the pipeline to restart and attempt to create a placeholder member that's already been created.
If you open the importer log tail -f log/importer.log | jq and run the relevant test, you'll see the logger log the occurance:
{
"feature_category": "importers",
"severity": "INFO",
"time": "2025-03-11T01:29:42.888Z",
"correlation_id": "b94396078c5830bbeed510eb2dd2e9cf",
"message": "Project has already been taken. Skipping placeholder membership creation.",
"reference": {
"id": null,
"source_user_id": 17,
"namespace_id": 48,
"group_id": null,
"project_id": 16,
"created_at": null,
"expires_at": "2025-04-11",
"access_level": 10
}
}
Related to #511382 (closed)