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:
- Adds
relation
key which is similar topipeline_class
, just a simplified value to represent the imported relation, instead of a modularized class that is difficult to read - Adds
step
which is identical topipeline_step
, just removespipeline
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 - 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 deprecatepipeline_*
fields in the future. I don't think there's much usage or reliance on these fields, but still - Updates documentation on the fields above
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by George Koltsov