-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add param to delete workflow API to clear status even if resources exist #719
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #719 +/- ##
============================================
+ Coverage 74.32% 74.33% +0.01%
- Complexity 741 742 +1
============================================
Files 84 84
Lines 3805 3807 +2
Branches 331 332 +1
============================================
+ Hits 2828 2830 +2
Misses 823 823
Partials 154 154 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Daniel Widdis <widdis@gmail.com>
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.
Overall LGTM, just had a question
src/main/java/org/opensearch/flowframework/rest/RestDeleteWorkflowAction.java
Show resolved
Hide resolved
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.
LGTM! Thanks for addressing this issue
Signed-off-by: Daniel Widdis <widdis@gmail.com>
…if resources exist (#723) Add param to delete workflow API to clear status even if resources exist (#719) (cherry picked from commit 4ea348a) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg>
…ist (opensearch-project#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg>
…ith new method (#721) * Add user mapping to Workflow State index (#705) * Add user mapping to Workflow State index Signed-off-by: Daniel Widdis <widdis@gmail.com> * Increment schema version Signed-off-by: Daniel Widdis <widdis@gmail.com> --------- Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * Added a new parse util method to avoid repetition / refactored code with new method Signed-off-by: martinpkr <devilmarti@abv.bg> * refactored method name and added unit test Signed-off-by: martinpkr <devilmarti@abv.bg> * made method use generics + added test Signed-off-by: martinpkr <devilmarti@abv.bg> * fixed javadoc Signed-off-by: martinpkr <devilmarti@abv.bg> * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed PR comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Changed request per second to Float Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed string array for source indices and removed state index entry Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Minor comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> --------- Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * Incorporating parseIfExist method into ReindexStep class Signed-off-by: martinpkr <devilmarti@abv.bg> * Add param to delete workflow API to clear status even if resources exist (#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * refactored method to use parseBoolean and parseFloat methods Signed-off-by: martinpkr <devilmarti@abv.bg> * Adding a missing param in javaDoc Signed-off-by: martinpkr <devilmarti@abv.bg> * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed PR comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Changed request per second to Float Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed string array for source indices and removed state index entry Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Minor comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> --------- Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * Add param to delete workflow API to clear status even if resources exist (#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * Added a chagelog entry Signed-off-by: martinpkr <devilmarti@abv.bg> * fixed failing spotless check Signed-off-by: martinpkr <devilmarti@abv.bg> * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed PR comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Changed request per second to Float Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed string array for source indices and removed state index entry Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Minor comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> --------- Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * removed unnecessary changelog info Signed-off-by: martinpkr <devilmarti@abv.bg> --------- Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Co-authored-by: Daniel Widdis <widdis@gmail.com> Co-authored-by: Owais Kazi <owaiskazi19@gmail.com>
…ith new method (#721) * Add user mapping to Workflow State index (#705) * Add user mapping to Workflow State index Signed-off-by: Daniel Widdis <widdis@gmail.com> * Increment schema version Signed-off-by: Daniel Widdis <widdis@gmail.com> --------- Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * Added a new parse util method to avoid repetition / refactored code with new method Signed-off-by: martinpkr <devilmarti@abv.bg> * refactored method name and added unit test Signed-off-by: martinpkr <devilmarti@abv.bg> * made method use generics + added test Signed-off-by: martinpkr <devilmarti@abv.bg> * fixed javadoc Signed-off-by: martinpkr <devilmarti@abv.bg> * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed PR comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Changed request per second to Float Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed string array for source indices and removed state index entry Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Minor comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> --------- Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * Incorporating parseIfExist method into ReindexStep class Signed-off-by: martinpkr <devilmarti@abv.bg> * Add param to delete workflow API to clear status even if resources exist (#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * refactored method to use parseBoolean and parseFloat methods Signed-off-by: martinpkr <devilmarti@abv.bg> * Adding a missing param in javaDoc Signed-off-by: martinpkr <devilmarti@abv.bg> * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed PR comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Changed request per second to Float Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed string array for source indices and removed state index entry Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Minor comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> --------- Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * Add param to delete workflow API to clear status even if resources exist (#719) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * Added a chagelog entry Signed-off-by: martinpkr <devilmarti@abv.bg> * fixed failing spotless check Signed-off-by: martinpkr <devilmarti@abv.bg> * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed PR comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Changed request per second to Float Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Addressed string array for source indices and removed state index entry Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> * Minor comments Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> --------- Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> * removed unnecessary changelog info Signed-off-by: martinpkr <devilmarti@abv.bg> --------- Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Co-authored-by: Daniel Widdis <widdis@gmail.com> Co-authored-by: Owais Kazi <owaiskazi19@gmail.com> (cherry picked from commit 13b32f1) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…factored code with new method (#728) Added a new parse util method to avoid repetition / refactored code with new method (#721) * Add user mapping to Workflow State index (#705) * Add user mapping to Workflow State index * Increment schema version --------- * Added a new parse util method to avoid repetition / refactored code with new method * refactored method name and added unit test * made method use generics + added test * fixed javadoc * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params * Addressed PR comments * Changed request per second to Float * Addressed string array for source indices and removed state index entry * Minor comments --------- * Incorporating parseIfExist method into ReindexStep class * Add param to delete workflow API to clear status even if resources exist (#719) * refactored method to use parseBoolean and parseFloat methods * Adding a missing param in javaDoc * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params * Addressed PR comments * Changed request per second to Float * Addressed string array for source indices and removed state index entry * Minor comments --------- * Add param to delete workflow API to clear status even if resources exist (#719) * Added a chagelog entry * fixed failing spotless check * Added workflow step for ReIndex Step (#718) * Initial commit for reindex workflow step with extra params * Addressed PR comments * Changed request per second to Float * Addressed string array for source indices and removed state index entry * Minor comments --------- * removed unnecessary changelog info --------- (cherry picked from commit 13b32f1) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: martinpkr <devilmarti@abv.bg> Signed-off-by: owaiskazi19 <owaiskazi19@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Daniel Widdis <widdis@gmail.com> Co-authored-by: Owais Kazi <owaiskazi19@gmail.com>
Description
Adds an optional
clear_status
param to the delete workflow API (defaultingfalse
).If present, overrides the "do resources exist" check and permits deleting the workflow state as long as provisioning is not
IN_PROGRESS
Please also review Documentation PR: opensearch-project/documentation-website#7268
Issues Resolved
Resolves #692
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.