elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.49k stars 24.6k forks source link

Inconsistent `fail` processor error message serialization in some circumstances #104950

Open joegallo opened 7 months ago

joegallo commented 7 months ago

Follow up to https://github.com/elastic/elasticsearch/pull/104886

In all my local testing, the error.reason was always "error-message", but in some circumstances in CI, the error.reason was "fail_processor_exception: error-message". As a workaround, on https://github.com/elastic/elasticsearch/pull/104886 I switched the test to check for a regex match on error-message which'll work in both cases.

@masseyke suggested that the issue might be that if you test against a single node, then you'll see just "error-message" but that with multiple nodes (maybe some of which don't have the ingest role) you might be able to provoke this, and I think he's got the right idea.

I think it's reasonable to follow up on that to make sure that we're consistently serializing errors back to the client in all cases, but I didn't want to jump on that task immediately.

elasticsearchmachine commented 7 months ago

Pinging @elastic/es-data-management (Team:Data Management)

joegallo commented 7 months ago

Here's a cropped screenshot of the build failure show the expected string as the test was originally written and the actual received string:

Screenshot 2024-01-30 at 2 55 11 PM