-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql: Add script processor to fix grok behaviour of ES 8.7.x+ #6531
Conversation
🌐 Coverage report
|
cc: @HiDAl I've seen you work on similar issues in the past. Could you please also take a look? |
0b3b8e1
to
574dd97
Compare
💚 Build Succeeded
History
cc @shmsr |
574dd97
to
edff03b
Compare
Hey @shmsr, just to be clear: I haven't worked previously on fixing this kind of issue, I just changed the behavior of the Grok processor elastic/elasticsearch#92586. Now, I don't know the whole business logic (Beats side, since I'm not part of the team), but looking at the code your code does not have a consistent output. In case |
@@ -32,6 +32,30 @@ | |||
"ignore_missing": true | |||
} | |||
}, | |||
{ | |||
"script": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a description
and a tag
to the script processors. This helps in debugging.
The description field documents what the script does which helps other developers and it is displayed in the Ingest Pipeline editor in Kibana. The tag field is included in the error message metadata and ingest node stats to help distinguish between script processors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @andrewkroh!
@shmsr : You can add the tests for this change and update the expected json file. |
In the PR shared in this comment, for any new entry of thread_id in the grok, a change is needed in the painless script. |
@ishleenk17 I did add them but had to remove them because of unavailability of setting kibana version for specific tests. Here: 3a656c9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
What does this PR do?
Changes deduplicate the list and only keep the unique elements. After this, if only 1 element remains, then it's added to the result as a single element (a string) and if not, the list is kept in the result with unique elements. This handling is done to manage the new behaviour of the grok processor in 8.7.x+. Read the related issue for more details.
Checklist
changelog.yml
file.Related issues