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 an optional workflow_step param to the get workflow steps API #538

Merged
merged 7 commits into from
Feb 27, 2024

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Feb 23, 2024

Description

Added an optional workflow_step param to the get workflow steps API.

Request:

GET localhost:9200/_plugins/_flow_framework/workflow/_steps?workflow_step=create_connector,delete_model,deploy_model

Response:

{
    "create_connector": {
        "inputs": [
            "name",
            "description",
            "version",
            "protocol",
            "parameters",
            "credential",
            "actions"
        ],
        "outputs": [
            "connector_id"
        ],
        "required_plugins": [
            "opensearch-ml"
        ],
        "timeout": "1m"
    },
    "deploy_model": {
        "inputs": [
            "model_id"
        ],
        "outputs": [
            "model_id"
        ],
        "required_plugins": [
            "opensearch-ml"
        ],
        "timeout": "15s"
    },
    "delete_model": {
        "inputs": [
            "model_id"
        ],
        "outputs": [
            "model_id"
        ],
        "required_plugins": [
            "opensearch-ml"
        ]
    }
}

Issues Resolved

Resolves #456

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

Looks good. A few suggestions to make it better.

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

codecov bot commented Feb 24, 2024

Codecov Report

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

Project coverage is 73.83%. Comparing base (3923f34) to head (3429ac3).

Files Patch % Lines
...work/transport/GetWorkflowStepTransportAction.java 66.66% 3 Missing ⚠️
.../flowframework/rest/RestGetWorkflowStepAction.java 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #538      +/-   ##
============================================
+ Coverage     73.10%   73.83%   +0.73%     
- Complexity      649      663      +14     
============================================
  Files            79       79              
  Lines          3294     3314      +20     
  Branches        257      263       +6     
============================================
+ Hits           2408     2447      +39     
+ Misses          773      752      -21     
- Partials        113      115       +2     

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

Signed-off-by: Owais Kazi <[email protected]>
@dbwiddis dbwiddis merged commit 2c6dfd5 into opensearch-project:main Feb 27, 2024
29 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 27, 2024
…538)

* Added optional step param to get the workflow steps API

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

* Fixed api response

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

* Added tests

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

* Added CHANGELOG

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

* Addressed PR comments

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

* Added another test

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

* Logged exception message

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

---------

Signed-off-by: Owais Kazi <[email protected]>
(cherry picked from commit 2c6dfd5)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dbwiddis pushed a commit that referenced this pull request Feb 27, 2024
…low steps API (#542)

Added an optional workflow_step param to the get workflow steps API (#538)

* Added optional step param to get the workflow steps API



* Fixed api response



* Added tests



* Added CHANGELOG



* Addressed PR comments



* Added another test



* Logged exception message



---------


(cherry picked from commit 2c6dfd5)

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] Allow an optional workflow_step param to the get workflow steps API.
4 participants