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

GET API to fetch workflow-step.json #394

Merged
merged 5 commits into from
Jan 10, 2024

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Jan 9, 2024

Description

This PR achieves the below:

  • REST API that will return content equivalent to the workflow-steps.json file.
  • Removed create_index and create_ingest_pipeline from the json
  • Added tests

Request:

GET /_plugins/_flow_framework/workflow/_steps

Refer this for response.

Issues Resolved

Fixes #364

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

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 47 lines in your changes are missing coverage. Please review.

Comparison is base (815a74e) 72.88% compared to head (469aed9) 72.17%.

Files Patch % Lines
...rch/flowframework/model/WorkflowStepValidator.java 0.00% 19 Missing ⚠️
.../flowframework/rest/RestGetWorkflowStepAction.java 50.00% 14 Missing ⚠️
...owframework/transport/GetWorkflowStepResponse.java 33.33% 6 Missing ⚠️
...nsearch/flowframework/model/WorkflowValidator.java 0.00% 5 Missing ⚠️
...work/transport/GetWorkflowStepTransportAction.java 66.66% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #394      +/-   ##
============================================
- Coverage     72.88%   72.17%   -0.71%     
- Complexity      601      613      +12     
============================================
  Files            75       79       +4     
  Lines          2998     3069      +71     
  Branches        233      237       +4     
============================================
+ Hits           2185     2215      +30     
- Misses          710      752      +42     
+ Partials        103      102       -1     

☔ 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.

Approved, but with some small comments and a suggestion

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 for an overall API. If we are able to pass a parameter (yeah that means creating a new request type to send the parameter) to limit it to a single request type that'd be ideal. That can be in a follow-up PR if desired.

@owaiskazi19 owaiskazi19 merged commit ebf8b90 into opensearch-project:main Jan 10, 2024
20 of 21 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 10, 2024
* Implemented GET API for workflow step

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

* Added rest test case

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

* Added tests and javadocs

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

* Addressed PR comments

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

* Removed CreateIndex and CreateIngestPipeline from json

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

---------

Signed-off-by: Owais Kazi <[email protected]>
(cherry picked from commit ebf8b90)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
owaiskazi19 pushed a commit that referenced this pull request Jan 10, 2024
GET API to fetch workflow-step.json (#394)

* Implemented GET API for workflow step



* Added rest test case



* Added tests and javadocs



* Addressed PR comments



* Removed CreateIndex and CreateIngestPipeline from json



---------


(cherry picked from commit ebf8b90)

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>
reta pushed a commit to opensearch-project/security that referenced this pull request Jan 11, 2024
Description

Adds permission for a new Get Workflow Step API.
opensearch-project/flow-framework#394


### Check List
- [ ] New functionality includes testing
- [ ] New functionality has been documented
- [ ] Commits are signed per the DCO using --signoff

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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Signed-off-by: owaiskazi19 <[email protected]>
opensearch-trigger-bot bot pushed a commit to opensearch-project/security that referenced this pull request Jan 11, 2024
Description

Adds permission for a new Get Workflow Step API.
opensearch-project/flow-framework#394

### Check List
- [ ] New functionality includes testing
- [ ] New functionality has been documented
- [ ] Commits are signed per the DCO using --signoff

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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Signed-off-by: owaiskazi19 <[email protected]>
(cherry picked from commit b8a315a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dlin2028 pushed a commit to dlin2028/security that referenced this pull request May 1, 2024
Description

Adds permission for a new Get Workflow Step API.
opensearch-project/flow-framework#394


### Check List
- [ ] New functionality includes testing
- [ ] New functionality has been documented
- [ ] Commits are signed per the DCO using --signoff

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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

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

[FEATURE] Add an API to return validation parameters
4 participants