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

Adding reprovision integration tests #834

Merged
merged 21 commits into from
Aug 16, 2024

Conversation

joshpalis
Copy link
Member

@joshpalis joshpalis commented Aug 13, 2024

Description

Adds integration tests for reprovision param.

Related Issues

resolves #822

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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 Aug 13, 2024

Codecov Report

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

Project coverage is 77.47%. Comparing base (268f746) to head (558e374).
Report is 2 commits behind head on main.

Files Patch % Lines
...h/flowframework/rest/RestCreateWorkflowAction.java 0.00% 3 Missing and 1 partial ⚠️
...search/flowframework/workflow/UpdateIndexStep.java 94.73% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #834      +/-   ##
============================================
+ Coverage     75.38%   77.47%   +2.09%     
- Complexity      917      928      +11     
============================================
  Files            96       96              
  Lines          4456     4359      -97     
  Branches        412      413       +1     
============================================
+ Hits           3359     3377      +18     
+ Misses          925      810     -115     
  Partials        172      172              

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

Signed-off-by: Joshua Palis <[email protected]>
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.

All the resource matching lookups could probably be streamlined with a helper method producing a map.

@amitgalitz
Copy link
Member

Can we add a test case where we reprovision a default use_case template?

Signed-off-by: Joshua Palis <[email protected]>
Signed-off-by: Joshua Palis <[email protected]>
Signed-off-by: Joshua Palis <[email protected]>
Signed-off-by: Joshua Palis <[email protected]>
Signed-off-by: Joshua Palis <[email protected]>
Signed-off-by: Joshua Palis <[email protected]>
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!

Approved with suggestions, feel free to take them or ignore them.

@joshpalis joshpalis merged commit 562d476 into opensearch-project:main Aug 16, 2024
20 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-834-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 562d476ae21775b9aac274757608d7eef43d9247
# Push it to GitHub
git push --set-upstream origin backport/backport-834-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-834-to-2.x.

@joshpalis
Copy link
Member Author

Will raise the backport manually

joshpalis added a commit to joshpalis/opensearch-ai-flow-framework that referenced this pull request Aug 16, 2024
* Adding reprovision integration tests

Signed-off-by: Joshua Palis <[email protected]>

* spotless

Signed-off-by: Joshua Palis <[email protected]>

* Adding deprovision/delete to reprovision integration tests

Signed-off-by: Joshua Palis <[email protected]>

* Adding deprovision/delete to reprovision failure tests

Signed-off-by: Joshua Palis <[email protected]>

* Using remote models rather than local models to reduce flakiness

Signed-off-by: Joshua Palis <[email protected]>

* Fixing forbiddenApis check

Signed-off-by: Joshua Palis <[email protected]>

* Fixing forbiddenAPI check, addressing PR comments

Signed-off-by: Joshua Palis <[email protected]>

* Fixing forbiddenAPIs main

Signed-off-by: Joshua Palis <[email protected]>

* increasing getResource timeout

Signed-off-by: Joshua Palis <[email protected]>

* Addressing PR comments

Signed-off-by: Joshua Palis <[email protected]>

* Fixing multi-node integration tests

Signed-off-by: Joshua Palis <[email protected]>

* fixing multi-node integration tests

Signed-off-by: Joshua Palis <[email protected]>

* Fixing syntax error

Signed-off-by: Joshua Palis <[email protected]>

* Blocking reprovision requests with substitution params

Signed-off-by: Joshua Palis <[email protected]>

* Fixes update settings request issue for multi-node

Signed-off-by: Joshua Palis <[email protected]>

* Increasing test coverage

Signed-off-by: Joshua Palis <[email protected]>

* Adding return to javadoc

Signed-off-by: Joshua Palis <[email protected]>

* Adding test coverage

Signed-off-by: Joshua Palis <[email protected]>

* Increasing test coverage

Signed-off-by: Joshua Palis <[email protected]>

* Increasing test coverage

Signed-off-by: Joshua Palis <[email protected]>

---------

Signed-off-by: Joshua Palis <[email protected]>
(cherry picked from commit 562d476)
joshpalis added a commit that referenced this pull request Aug 16, 2024
Adding reprovision integration tests (#834)

* Adding reprovision integration tests

Signed-off-by: Joshua Palis <[email protected]>

* spotless

Signed-off-by: Joshua Palis <[email protected]>

* Adding deprovision/delete to reprovision integration tests

Signed-off-by: Joshua Palis <[email protected]>

* Adding deprovision/delete to reprovision failure tests

Signed-off-by: Joshua Palis <[email protected]>

* Using remote models rather than local models to reduce flakiness

Signed-off-by: Joshua Palis <[email protected]>

* Fixing forbiddenApis check

Signed-off-by: Joshua Palis <[email protected]>

* Fixing forbiddenAPI check, addressing PR comments

Signed-off-by: Joshua Palis <[email protected]>

* Fixing forbiddenAPIs main

Signed-off-by: Joshua Palis <[email protected]>

* increasing getResource timeout

Signed-off-by: Joshua Palis <[email protected]>

* Addressing PR comments

Signed-off-by: Joshua Palis <[email protected]>

* Fixing multi-node integration tests

Signed-off-by: Joshua Palis <[email protected]>

* fixing multi-node integration tests

Signed-off-by: Joshua Palis <[email protected]>

* Fixing syntax error

Signed-off-by: Joshua Palis <[email protected]>

* Blocking reprovision requests with substitution params

Signed-off-by: Joshua Palis <[email protected]>

* Fixes update settings request issue for multi-node

Signed-off-by: Joshua Palis <[email protected]>

* Increasing test coverage

Signed-off-by: Joshua Palis <[email protected]>

* Adding return to javadoc

Signed-off-by: Joshua Palis <[email protected]>

* Adding test coverage

Signed-off-by: Joshua Palis <[email protected]>

* Increasing test coverage

Signed-off-by: Joshua Palis <[email protected]>

* Increasing test coverage

Signed-off-by: Joshua Palis <[email protected]>

---------

Signed-off-by: Joshua Palis <[email protected]>
(cherry picked from commit 562d476)
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 skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Create security-enabled/non-security enabled integration and BWC tests for reprovisioning
3 participants