Skip to content

[Ingest node pipelines] 502 Bad Gateway error when simulating a pipeline #63199

@alisonelizabeth

Description

@alisonelizabeth

Elasticsearch version: master

Description of the problem including expected versus actual behavior:
Running the simulate pipeline API with verbose enabled against a pipeline that has a pipeline processor, and the pipeline defined is expected to fail with the sample documents provided, results in: {"statusCode":502,"error":"Bad Gateway","message":"Client request timeout"}. I would expect the request to be successful and return the error. This works as expected without verbose enabled.

Steps to reproduce:

  1. Create a pipeline:
PUT _ingest/pipeline/pipeline_expected_to_fail
{
   "description": "_description",
    "processors": [
      {
        "rename": {
          "field": "dont_exist",
          "target_field": "field1"
        }
      }
    ]
}
  1. Create a second pipeline that defines a pipeline processor with the pipeline created in step 1. For example:
PUT _ingest/pipeline/my_pipeline
{
   "description": "_description",
    "processors": [
      {
        "set" : {
          "field" : "field2",
          "value" : "_value"
        }
      },
      {
        "pipeline" : {
          "name": "pipeline_expected_to_fail"
        }
      }
    ]
}
  1. Run the simulate API with verbose enabled against the pipeline created in step 2.
POST /_ingest/pipeline/my_pipeline/_simulate?verbose
{
  "docs": [
    {
      "_index": "index",
      "_id": "id",
      "_source": {
        "foo": "bar"
      }
    }
  ]
}
  1. Note the request results in: {"statusCode":502,"error":"Bad Gateway","message":"Client request timeout"}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions