Skip to content

Fix delete_source removing parsed field when writing to root in parse…#6443

Open
DayneD89 wants to merge 1 commit intoopensearch-project:mainfrom
DayneD89:DEVOPS-22052-message-loss
Open

Fix delete_source removing parsed field when writing to root in parse…#6443
DayneD89 wants to merge 1 commit intoopensearch-project:mainfrom
DayneD89:DEVOPS-22052-message-loss

Conversation

@DayneD89
Copy link

… JSON processor

When source field name matches a key in the parsed JSON and delete_source is true with destination set to root (the default), the source was deleted after writeToRoot(), removing the parsed value instead of the original. Now deletes source before writeToRoot() when writing to root.

Description

Fixes an oversight in the parse_json processor where if processing a json with a field value matching source field and delete_source set to true causes the added field to be removed.

Issues Resolved

I haven't opened a ticket, the contribution guide says 'You open an issue to discuss any significant work - we would hate for your time to be wasted.' and I don't consider this a significant change?

Check List

  • New functionality includes testing.
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

… JSON processor

When source field name matches a key in the parsed JSON and delete_source is true with destination set to root (the default), the source was deleted after writeToRoot(), removing the parsed value instead of the original. Now deletes source before writeToRoot() when writing to root.

Signed-off-by: DayneD89 <DayneD89@gmail.com>
Copy link
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @DayneD89 for finding this issue and fixing it!

@DayneD89
Copy link
Author

DayneD89 commented Feb 2, 2026

Thank you @DayneD89 for finding this issue and fixing it!

No problem, tbf it's because I need it fixed so it's selfishness really. What's your process for bringing this in? Do I need to do anything or leave it with you and wait for a release with it in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants