Skip to content

Update BulkImports failures API to make it more readable

What does this MR do and why?

This MR updates BulkImports Failures API in order to improve readability:

  1. Adds relation key which is similar to pipeline_class, just a simplified value to represent the imported relation, instead of a modularized class that is difficult to read
  2. Adds step which is identical to pipeline_step, just removes pipeline from the key name, since 'pipelines' is an internal importer terminology, the importer user shouldn't be worried about the internal terms to not cause confusion with e.g. CI Pipelines
  3. Not removing existing pipeline_class & pipeline_step because technically that would be a breaking API change, so I am just adding to it. Perhaps we can deprecate pipeline_* fields in the future. I don't think there's much usage or reliance on these fields, but still
  4. Updates documentation on the fields above
  5. Additionally, it updates an exception raised from BulkImports::PipelineWorker to improve the error message regarding failed export status

Before

      {
        "exception_message": "Unsuccessful response 403 from [FILTERED] Body: {\"...",
        "exception_class": "BulkImports::NetworkError",
        "pipeline_class": "BulkImports::Common::Pipelines::WikiPipeline",
        "pipeline_step": "extractor",
        "correlation_id_value": "01GE4H2946QHBXECE4NQCCH2W1",
        "created_at": "2022-09-29T11:46:11.173Z"
      }      

After

      {
        "relation": "wiki",
        "step": "extractor",
        "exception_message": "Unsuccessful response 403 from [FILTERED] Body: {\"...",
        "exception_class": "BulkImports::NetworkError",
        "correlation_id_value": "01GE4H2946QHBXECE4NQCCH2W1",
        "created_at": "2022-09-29T11:46:11.173Z",
        "pipeline_class": "BulkImports::Common::Pipelines::WikiPipeline",
        "pipeline_step": "extractor"
      }

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by George Koltsov

Merge request reports

Loading