Track errors from LoadPlaceholderReferencesWorker in PostgreSQL
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=506204) </details> <!--IssueSummary end--> This issue came from [this discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/171842#note_2219218351). ### About https://gitlab.com/gitlab-org/gitlab/-/merge_requests/171842 changed the failure mode of `LoadPlaceholderReferencesWorker` to no longer fail the import. Instead it now logs an error. ### Problem The errors should be visible to the user as import errors. ### Proposal Track the errors in PostgreSQL (ensure they are still logged also). For [some importers](https://gitlab.com/gitlab-org/gitlab/-/blob/58d7951dd9ef6a5730c1cf514f51a87c6a6f1253/app/workers/import/load_placeholder_references_worker.rb#L46-47) we can track the [error using `ImportFailureService`](https://gitlab.com/gitlab-org/gitlab/-/blob/b939db4df669645bcf7fc4552e72f077358a05ae/lib/gitlab/import/import_failure_service.rb#L5) which also logs the errors. The service takes a `project`, and we can look it up through the `ProjectImportState` (see diff of https://gitlab.com/gitlab-org/gitlab/-/merge_requests/171842/diffs), and from that record find the `project` to pass to `ImportFailureService`. Direct Transfer is harder because its errors are recorded in `BulkImports::Failure` and are related to entities rather than the entire import. Perhaps here, we pick the first entity without a parent (`bulk_import.entities.where(parent: nil).order_by_created_at(:asc).first`) and record the error against that? It would depend on whether that would be an okay customer experience. Group file-based import appears to have no existing ability to record import errors in PostgreSQL. For this importer, we could for now just not record errors in PostgreSQL.
issue