Track errors from LoadPlaceholderReferencesWorker in PostgreSQL
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
This issue came from this discussion.
About
!171842 (merged) 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 we can track the error using ImportFailureService
which also logs the errors. The service takes a project
, and we can look it up through the ProjectImportState
(see diff of !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.