mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Enterprise Search: Include field name in ingest pipeline inference error (#160248)
We can end up with with seemingly duplicate errors: ``` "_source": { "_ingest": { "inference_errors": [ { "message": "Processor 'inference' in pipeline 'test' failed with message 'Trained model deployment [.elser_model_1] is not allocated to any nodes'" }, { "message": "Processor 'inference' in pipeline 'body-content' failed with message 'Trained model deployment [.elser_model_1] is not allocated to any nodes'" }, { "message": "Processor 'inference' in pipeline 'body-content' failed with message 'Trained model deployment [.elser_model_1] is not allocated to any nodes'" } ] } } }, ``` This adds the field name in the error message for easier differentiation. It also includes `allow_duplicates: false` in the append processor, to make sure we are not adding duplicate error messages to `inference_errors`.
This commit is contained in:
parent
5fb9709d4c
commit
da745c3083
3 changed files with 6 additions and 3 deletions
|
@ -154,10 +154,11 @@ describe('generateMlInferencePipelineBody lib function', () => {
|
|||
{
|
||||
append: {
|
||||
field: '_source._ingest.inference_errors',
|
||||
allow_duplicates: false,
|
||||
value: [
|
||||
{
|
||||
message:
|
||||
"Processor 'inference' in pipeline 'my-pipeline' failed with message '{{ _ingest.on_failure_message }}'",
|
||||
"Processor 'inference' in pipeline 'my-pipeline' failed for field 'my-source-field' with message '{{ _ingest.on_failure_message }}'",
|
||||
pipeline: 'my-pipeline',
|
||||
timestamp: '{{{ _ingest.timestamp }}}',
|
||||
},
|
||||
|
|
|
@ -133,9 +133,10 @@ export const getInferenceProcessor = (
|
|||
{
|
||||
append: {
|
||||
field: '_source._ingest.inference_errors',
|
||||
allow_duplicates: false,
|
||||
value: [
|
||||
{
|
||||
message: `Processor 'inference' in pipeline '${pipelineName}' failed with message '{{ _ingest.on_failure_message }}'`,
|
||||
message: `Processor 'inference' in pipeline '${pipelineName}' failed for field '${sourceField}' with message '{{ _ingest.on_failure_message }}'`,
|
||||
pipeline: pipelineName,
|
||||
timestamp: '{{{ _ingest.timestamp }}}',
|
||||
},
|
||||
|
|
|
@ -62,10 +62,11 @@ describe('formatMlPipelineBody util function', () => {
|
|||
{
|
||||
append: {
|
||||
field: '_source._ingest.inference_errors',
|
||||
allow_duplicates: false,
|
||||
value: [
|
||||
{
|
||||
pipeline: pipelineName,
|
||||
message: `Processor 'inference' in pipeline '${pipelineName}' failed with message '{{ _ingest.on_failure_message }}'`,
|
||||
message: `Processor 'inference' in pipeline '${pipelineName}' failed for field '${sourceField}' with message '{{ _ingest.on_failure_message }}'`,
|
||||
timestamp: '{{{ _ingest.timestamp }}}',
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue