-
Notifications
You must be signed in to change notification settings - Fork 31
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
Adding new exception type for workflow step failures #577
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #577 +/- ##
============================================
- Coverage 72.95% 72.75% -0.20%
- Complexity 680 681 +1
============================================
Files 81 82 +1
Lines 3479 3491 +12
Branches 278 279 +1
============================================
+ Hits 2538 2540 +2
- Misses 822 832 +10
Partials 119 119 ☔ View full report in Codecov by Sentry. |
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.
Tests are not failing currently because WorkflowStepException
extendsFlowFrameworkException
but we should change the rest test cases to check for WorkflowStepException
.
src/main/java/org/opensearch/flowframework/rest/RestCreateWorkflowAction.java
Outdated
Show resolved
Hide resolved
Actually there is another reason for this also, that makes me debate if we even need this here. We actually don't return the WorkflowStepException in the rest here ever because we just write it to the error field in the index if it happens during the step. User gets the workflow ID back |
@joshpalis lmk if you have any opposition to just adding the WorkflowStepException and not changing the rest classes due to above reason |
No concerns, looks good to me |
Signed-off-by: Amit Galitzky <[email protected]>
7b249f6
to
a991ba3
Compare
Signed-off-by: Amit Galitzky <[email protected]>
Signed-off-by: Amit Galitzky <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/flow-framework/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/flow-framework/backport-2.x
# Create a new branch
git switch --create backport/backport-577-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0f3962974188ac6ff9202c32d0827bdea33636b9
# Push it to GitHub
git push --set-upstream origin backport/backport-577-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/flow-framework/backport-2.x Then, create a pull request where the |
…ect#577) * new exception type for workflow step failures Signed-off-by: Amit Galitzky <[email protected]> * reverting change on rest classes Signed-off-by: Amit Galitzky <[email protected]> * adding integ tests for new exception written to state index Signed-off-by: Amit Galitzky <[email protected]> --------- Signed-off-by: Amit Galitzky <[email protected]>
Description
Adds a new exception type to differentiate between errors that are due to flow-framework's fault during provisioning vs errors that are due to the downstream plugin's faults.
Also fixed error handling on deprovision:
previously if we gave a payload to the deprovision request we got a 500 error of
Channel is already closed
The two error types:
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.