Skip to content
Snippets Groups Projects

Update BulkImports::Failure to display subrelation that failed to import

2 files
+ 3
3
Compare changes
  • Side-by-side
  • Inline
Files
2
  • Direct Transfer API shows failures for the things that we could not
    import. If a subrelation of a top level relation failed to import
    (e.g. MR diff note) - we still show top level relation as the one
    that failed to import. In reality, the top level relation is imported,
    but a subrelation did not.
    
    Update relation to include the failed to import subrelation, so it's
    more obvious what exactly failed to import.
    
    Changelog: added
@@ -133,7 +133,7 @@ def capture_invalid_subrelations(invalid_subrelations)
invalid_subrelations.each do |record|
BulkImports::Failure.create(
bulk_import_entity_id: tracker.entity.id,
pipeline_class: tracker.pipeline_name,
pipeline_class: "#{tracker.importing_relation} - #{record.class}",
exception_class: 'RecordInvalid',
exception_message: record.errors.full_messages.to_sentence,
correlation_id_value: Labkit::Correlation::CorrelationId.current_or_new_id
Loading