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

Search APIs to fetch all the workflows present #139

Merged
merged 7 commits into from
Nov 7, 2023

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Nov 1, 2023

Description

This PR adds 2 APIs:

  1. GET _plugins/_flow_framework/workflow/_search
  2. POST _plugins/_flow_framework/workflow/_search

The request and response are present in the issue.

Issues Resolved

Closes #124

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.

@github-actions github-actions bot added the backport 2.x backport PRs to 2.x branch label Nov 1, 2023
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Merging #139 (d4f3f62) into main (c9950a8) will increase coverage by 0.12%.
The diff coverage is 71.42%.

@@             Coverage Diff              @@
##               main     #139      +/-   ##
============================================
+ Coverage     67.58%   67.70%   +0.12%     
- Complexity      318      330      +12     
============================================
  Files            38       43       +5     
  Lines          1490     1539      +49     
  Branches        140      142       +2     
============================================
+ Hits           1007     1042      +35     
- Misses          434      448      +14     
  Partials         49       49              
Files Coverage Δ
.../opensearch/flowframework/FlowFrameworkPlugin.java 100.00% <ø> (ø)
...h/flowframework/rest/RestCreateWorkflowAction.java 56.25% <ø> (ø)
...h/flowframework/rest/RestSearchWorkflowAction.java 100.00% <100.00%> (ø)
.../flowframework/transport/CreateWorkflowAction.java 100.00% <ø> (ø)
.../flowframework/transport/SearchWorkflowAction.java 100.00% <100.00%> (ø)
...ework/transport/SearchWorkflowTransportAction.java 100.00% <100.00%> (ø)
...pensearch/flowframework/util/RestHandlerUtils.java 0.00% <0.00%> (ø)
...owframework/rest/AbstractSearchWorkflowAction.java 67.85% <67.85%> (ø)

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, looks good so far. A small comment, and can you also include logs in the PR description after hitting this API?

@owaiskazi19
Copy link
Member Author

Initial pass, looks good so far. A small comment, and can you also include logs in the PR description after hitting this API?

Posted the response in the issue. Do you want me to add in the PR as well?

@joshpalis
Copy link
Member

@owaiskazi19 Perhaps lets merge in #142 first prior to this PR. After rebasing, you can also set this new API behind the feature flag

Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
@owaiskazi19 owaiskazi19 force-pushed the get-api branch 2 times, most recently from 8140f81 to 0bdedd2 Compare November 3, 2023 23:00
@owaiskazi19 owaiskazi19 merged commit dbbff74 into opensearch-project:main Nov 7, 2023
21 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 7, 2023
* Initial Implementation of Search API

Signed-off-by: Owais Kazi <[email protected]>

* Added tests

Signed-off-by: Owais Kazi <[email protected]>

* Added tests for transport action

Signed-off-by: Owais Kazi <[email protected]>

* Added javadoc

Signed-off-by: Owais Kazi <[email protected]>

* Set APIs behind the feature flag

Signed-off-by: Owais Kazi <[email protected]>

* Minor comment

Signed-off-by: Owais Kazi <[email protected]>

---------

Signed-off-by: Owais Kazi <[email protected]>
(cherry picked from commit dbbff74)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
owaiskazi19 pushed a commit that referenced this pull request Nov 7, 2023
Search APIs to fetch all the workflows present (#139)

* Initial Implementation of Search API



* Added tests



* Added tests for transport action



* Added javadoc



* Set APIs behind the feature flag



* Minor comment



---------


(cherry picked from commit dbbff74)

Signed-off-by: Owais Kazi <[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>
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.

[FEATURE] Search API to fetch all the workflows present
3 participants