Skip to content
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

Catch exception instead of shutting down in date processor #4108

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

graytaylor0
Copy link
Member

@graytaylor0 graytaylor0 commented Feb 12, 2024

Description

This change makes it so the date processor hitting an exception does not shut down the pipeline, and instead catches the exception and continues on to the next Event, instead of skipping the remainder of the Events in a batch

Issues Resolved

Resolves #4107

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • 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.

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.

Please add some unit tests. One simple one would be to mock the ExpressionEvaluator to throw a RuntimeException on the first call and then return true on the second. Verify that the second event is processed.

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.

Thanks!

@graytaylor0 graytaylor0 merged commit 0841ac1 into opensearch-project:main Feb 12, 2024
48 of 49 checks passed
@graytaylor0 graytaylor0 deleted the DateFix branch February 12, 2024 18:07
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.6 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.6 2.6
# Navigate to the new working tree
cd .worktrees/backport-2.6
# Create a new branch
git switch --create backport/backport-4108-to-2.6
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0841ac17ae18a76610842be3c0ff3b0b0dc1e453
# Push it to GitHub
git push --set-upstream origin backport/backport-4108-to-2.6
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.6

Then, create a pull request where the base branch is 2.6 and the compare/head branch is backport/backport-4108-to-2.6.

graytaylor0 added a commit to graytaylor0/data-prepper that referenced this pull request Feb 12, 2024
graytaylor0 added a commit to graytaylor0/data-prepper that referenced this pull request Feb 12, 2024
graytaylor0 added a commit to graytaylor0/data-prepper that referenced this pull request Feb 12, 2024
graytaylor0 added a commit that referenced this pull request Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Date Processor throws Exception and skips processing the remainder of a batch of Events
3 participants