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

Added workflow step for ReIndex Step #718

Merged
merged 5 commits into from
May 30, 2024

Conversation

owaiskazi19
Copy link
Member

Description

Added Workflow Step for ReIndex. This workflow step currently support source and destination index. And also params like refresh, requests_per_second, require_alias, slices, max_docs..

More details about the indices, template and response can be found #617 (comment).

Keeping this in draft mode.

Issues Resolved

#617

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.

@owaiskazi19 owaiskazi19 changed the title Added workflow step for ReIndex STep Added workflow step for ReIndex Step May 20, 2024
@github-actions github-actions bot added the backport 2.x backport PRs to 2.x branch label May 20, 2024
Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 67.18750% with 21 lines in your changes are missing coverage. Please review.

Project coverage is 74.32%. Comparing base (e3a8784) to head (fa21b9c).

Files Patch % Lines
...opensearch/flowframework/workflow/ReindexStep.java 65.57% 12 Missing and 9 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #718      +/-   ##
============================================
- Coverage     74.44%   74.32%   -0.13%     
- Complexity      738      741       +3     
============================================
  Files            83       84       +1     
  Lines          3741     3805      +64     
  Branches        322      331       +9     
============================================
+ Hits           2785     2828      +43     
- Misses          811      823      +12     
- Partials        145      154       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@joshpalis joshpalis left a comment

Choose a reason for hiding this comment

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

Initial pass

Signed-off-by: owaiskazi19 <[email protected]>
@owaiskazi19 owaiskazi19 requested review from joshpalis and dbwiddis May 30, 2024 01:31
@owaiskazi19 owaiskazi19 requested a review from dbwiddis May 30, 2024 06:34
@owaiskazi19 owaiskazi19 requested a review from joshpalis May 30, 2024 18:33
Copy link
Member

@joshpalis joshpalis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @owaiskazi19 for addressing the comments

Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

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

LGTM with a few suggestions.

Signed-off-by: owaiskazi19 <[email protected]>
@owaiskazi19 owaiskazi19 merged commit 4ee2171 into opensearch-project:main May 30, 2024
31 of 32 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 30, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
(cherry picked from commit 4ee2171)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
owaiskazi19 pushed a commit that referenced this pull request May 30, 2024
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



---------


(cherry picked from commit 4ee2171)

Signed-off-by: owaiskazi19 <[email protected]>
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>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request May 30, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request May 30, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request May 31, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 1, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
martinpkr pushed a commit to martinpkr/flow-framework that referenced this pull request Jun 2, 2024
* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
dbwiddis added a commit that referenced this pull request Jun 3, 2024
…ith new method (#721)

* Add user mapping to Workflow State index (#705)

* Add user mapping to Workflow State index

Signed-off-by: Daniel Widdis <[email protected]>

* Increment schema version

Signed-off-by: Daniel Widdis <[email protected]>

---------

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* Added a new parse util method to avoid repetition / refactored code with new method

Signed-off-by: martinpkr <[email protected]>

* refactored method name and added unit test

Signed-off-by: martinpkr <[email protected]>

* made method use generics + added test

Signed-off-by: martinpkr <[email protected]>

* fixed javadoc

Signed-off-by: martinpkr <[email protected]>

* Added workflow step for ReIndex Step (#718)

* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* Incorporating parseIfExist method into ReindexStep class

Signed-off-by: martinpkr <[email protected]>

* Add param to delete workflow API to clear status even if resources exist (#719)

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* refactored method to use parseBoolean and parseFloat methods

Signed-off-by: martinpkr <[email protected]>

* Adding a missing param in javaDoc

Signed-off-by: martinpkr <[email protected]>

* Added workflow step for ReIndex Step (#718)

* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* Add param to delete workflow API to clear status even if resources exist (#719)

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* Added a chagelog entry

Signed-off-by: martinpkr <[email protected]>

* fixed failing spotless check

Signed-off-by: martinpkr <[email protected]>

* Added workflow step for ReIndex Step (#718)

* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* removed unnecessary changelog info

Signed-off-by: martinpkr <[email protected]>

---------

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: martinpkr <[email protected]>
Signed-off-by: owaiskazi19 <[email protected]>
Co-authored-by: Daniel Widdis <[email protected]>
Co-authored-by: Owais Kazi <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 3, 2024
…ith new method (#721)

* Add user mapping to Workflow State index (#705)

* Add user mapping to Workflow State index

Signed-off-by: Daniel Widdis <[email protected]>

* Increment schema version

Signed-off-by: Daniel Widdis <[email protected]>

---------

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* Added a new parse util method to avoid repetition / refactored code with new method

Signed-off-by: martinpkr <[email protected]>

* refactored method name and added unit test

Signed-off-by: martinpkr <[email protected]>

* made method use generics + added test

Signed-off-by: martinpkr <[email protected]>

* fixed javadoc

Signed-off-by: martinpkr <[email protected]>

* Added workflow step for ReIndex Step (#718)

* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* Incorporating parseIfExist method into ReindexStep class

Signed-off-by: martinpkr <[email protected]>

* Add param to delete workflow API to clear status even if resources exist (#719)

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* refactored method to use parseBoolean and parseFloat methods

Signed-off-by: martinpkr <[email protected]>

* Adding a missing param in javaDoc

Signed-off-by: martinpkr <[email protected]>

* Added workflow step for ReIndex Step (#718)

* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* Add param to delete workflow API to clear status even if resources exist (#719)

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* Added a chagelog entry

Signed-off-by: martinpkr <[email protected]>

* fixed failing spotless check

Signed-off-by: martinpkr <[email protected]>

* Added workflow step for ReIndex Step (#718)

* Initial commit for reindex workflow step with extra params

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed PR comments

Signed-off-by: owaiskazi19 <[email protected]>

* Changed request per second to Float

Signed-off-by: owaiskazi19 <[email protected]>

* Addressed string array for source indices and removed state index entry

Signed-off-by: owaiskazi19 <[email protected]>

* Minor comments

Signed-off-by: owaiskazi19 <[email protected]>

---------

Signed-off-by: owaiskazi19 <[email protected]>
Signed-off-by: martinpkr <[email protected]>

* removed unnecessary changelog info

Signed-off-by: martinpkr <[email protected]>

---------

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: martinpkr <[email protected]>
Signed-off-by: owaiskazi19 <[email protected]>
Co-authored-by: Daniel Widdis <[email protected]>
Co-authored-by: Owais Kazi <[email protected]>
(cherry picked from commit 13b32f1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
owaiskazi19 added a commit that referenced this pull request Jun 3, 2024
…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 <[email protected]>
Signed-off-by: martinpkr <[email protected]>
Signed-off-by: owaiskazi19 <[email protected]>
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 <[email protected]>
Co-authored-by: Owais Kazi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport PRs to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants