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

Moved workflow-steps.json to Enum #523

Merged
merged 7 commits into from
Feb 19, 2024

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Feb 15, 2024

Description

Moved workflow-steps.json to Enum and removed additional parsing required for the workflow-steps.json. Also, removed the json file.

TODO:
1. Fix tests

Issues Resolved

Resolves #395

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 Feb 15, 2024
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

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

Comparison is base (b25790f) 72.11% compared to head (56a9796) 72.00%.

Files Patch % Lines
...ch/flowframework/workflow/WorkflowStepFactory.java 78.15% 18 Missing and 8 partials ⚠️
.../flowframework/workflow/WorkflowProcessSorter.java 66.66% 2 Missing ⚠️
...owframework/transport/GetWorkflowStepResponse.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #523      +/-   ##
============================================
- Coverage     72.11%   72.00%   -0.11%     
+ Complexity      624      609      -15     
============================================
  Files            78       78              
  Lines          3159     3222      +63     
  Branches        239      247       +8     
============================================
+ Hits           2278     2320      +42     
- Misses          776      789      +13     
- Partials        105      113       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it 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.

LGTM! Thanks for taking the suggestions, I like how you did the map.

@amitgalitz
Copy link
Member

Should follow up here be to combine the WorkflowResources to this too?

@owaiskazi19
Copy link
Member Author

Should follow up here be to combine the WorkflowResources to this too?

WorkflowResources is not part of this issue. Can you create a separate issue for the same?

@owaiskazi19 owaiskazi19 merged commit be0df19 into opensearch-project:main Feb 19, 2024
29 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/flow-framework/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/flow-framework/backport-2.x
# Create a new branch
git switch --create backport/backport-523-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 be0df19e3e3579a018e0d6f0ba423228f0d0491d
# Push it to GitHub
git push --set-upstream origin backport/backport-523-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/flow-framework/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-523-to-2.x.

owaiskazi19 added a commit to owaiskazi19/opensearch-ai-flow-framework that referenced this pull request Feb 19, 2024
* Created enum for workflow steps json

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

* Added getters for enum and rest of the enums

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

* Removed workflow-steps.json entries and the file completely

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

* Fixed tests

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

* Added entry to CHANGELOG.md

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

* Addressed PR comments and removed the map

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

* Updated CHANGELOG.md

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

---------

Signed-off-by: Owais Kazi <[email protected]>
(cherry picked from commit be0df19)
@owaiskazi19 owaiskazi19 added backport 2.x backport PRs to 2.x branch and removed backport 2.x backport PRs to 2.x branch labels Feb 19, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 19, 2024
* Created enum for workflow steps json

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

* Added getters for enum and rest of the enums

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

* Removed workflow-steps.json entries and the file completely

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

* Fixed tests

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

* Added entry to CHANGELOG.md

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

* Addressed PR comments and removed the map

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

* Updated CHANGELOG.md

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

---------

Signed-off-by: Owais Kazi <[email protected]>
(cherry picked from commit be0df19)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
owaiskazi19 pushed a commit that referenced this pull request Feb 19, 2024
Moved workflow-steps.json to Enum (#523)

* Created enum for workflow steps json



* Added getters for enum and rest of the enums



* Removed workflow-steps.json entries and the file completely



* Fixed tests



* Added entry to CHANGELOG.md



* Addressed PR comments and removed the map



* Updated CHANGELOG.md



---------


(cherry picked from commit be0df19)

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] Move workflow-steps.json to a Java class/enum
4 participants