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

Unify test clean logic #609

Merged

Conversation

bowenlan-amzn
Copy link
Member

@bowenlan-amzn bowenlan-amzn commented Nov 15, 2022

Signed-off-by: bowenlan-amzn bowenlan23@gmail.com

Issue #, if available:

Description of changes:
Unify the wipeAllIndices logic in this repo.

Dived deep into the multinode large scale test failures because of remaining tasks after tests. Confirmed it's not realistic to wait for all tasks to disappear in multinode test suite, some observations:

  • the cluster manager and data node may not be in sync and task can remain on data node for long time
  • shard reroute makes the write task running for long time

This PR includes the small fix for this issue #608

CheckList:

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

@bowenlan-amzn bowenlan-amzn force-pushed the unifytestcleanlogic branch 5 times, most recently from d438e92 to cc3b22f Compare November 16, 2022 06:17
Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
@bowenlan-amzn bowenlan-amzn marked this pull request as ready for review November 16, 2022 07:58
@bowenlan-amzn bowenlan-amzn requested a review from a team November 16, 2022 07:58
@bowenlan-amzn bowenlan-amzn added the maintenance improves code quality, but not the product label Nov 16, 2022
Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
@bowenlan-amzn bowenlan-amzn force-pushed the unifytestcleanlogic branch 2 times, most recently from 8e11ef6 to 3ab7771 Compare November 17, 2022 01:46
Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2022

Codecov Report

Merging #609 (3ab7771) into main (a21e4a6) will decrease coverage by 0.08%.
The diff coverage is 57.14%.

❗ Current head 3ab7771 differs from pull request most recent head 0504d7b. Consider uploading reports for the commit 0504d7b to get more accurate results

@@             Coverage Diff              @@
##               main     #609      +/-   ##
============================================
- Coverage     75.32%   75.23%   -0.09%     
+ Complexity     2605     2593      -12     
============================================
  Files           330      330              
  Lines         15111    15115       +4     
  Branches       2337     2338       +1     
============================================
- Hits          11382    11372      -10     
- Misses         2397     2409      +12     
- Partials       1332     1334       +2     
Impacted Files Coverage Δ
...transport/action/explain/TransportExplainAction.kt 70.75% <0.00%> (ø)
...agement/indexstatemanagement/ManagedIndexRunner.kt 47.13% <60.00%> (+1.35%) ⬆️
...ensearch/indexmanagement/util/JobSchedulerUtils.kt 73.91% <100.00%> (ø)
...statemanagement/validation/ValidateReplicaCount.kt 0.00% <0.00%> (-32.15%) ⬇️
...ndexstatemanagement/validation/ActionValidation.kt 86.66% <0.00%> (-13.34%) ⬇️
...ndexstatemanagement/validation/ValidateRollover.kt 66.66% <0.00%> (-9.53%) ⬇️
.../indexstatemanagement/validation/ValidateDelete.kt 47.05% <0.00%> (-5.89%) ⬇️
.../action/explain/TransportExplainTransformAction.kt 70.78% <0.00%> (-2.25%) ⬇️
...ndexstatemanagement/IndexStateManagementHistory.kt 77.24% <0.00%> (-1.38%) ⬇️
.../rollup/action/start/TransportStartRollupAction.kt 71.76% <0.00%> (-1.18%) ⬇️
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bowenlan-amzn bowenlan-amzn merged commit d91df69 into opensearch-project:main Nov 17, 2022
@bowenlan-amzn bowenlan-amzn deleted the unifytestcleanlogic branch November 17, 2022 18:47
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-609-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d91df69c11d4411be6cb297772a006b310cd43f7
# Push it to GitHub
git push --set-upstream origin backport/backport-609-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

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

bowenlan-amzn added a commit to bowenlan-amzn/index-management that referenced this pull request Nov 20, 2022
* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
bowenlan-amzn added a commit to bowenlan-amzn/index-management that referenced this pull request Nov 21, 2022
* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
bowenlan-amzn added a commit to bowenlan-amzn/index-management that referenced this pull request Nov 21, 2022
* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
bowenlan-amzn added a commit that referenced this pull request Nov 21, 2022
* Fix all the compile warnings and detekt issues (#603)

* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Unify test clean logic (#609)

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.4 failed:

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

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.4 2.4
# Navigate to the new working tree
cd .worktrees/backport-2.4
# Create a new branch
git switch --create backport/backport-609-to-2.4
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d91df69c11d4411be6cb297772a006b310cd43f7
# Push it to GitHub
git push --set-upstream origin backport/backport-609-to-2.4
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.4

Then, create a pull request where the base branch is 2.4 and the compare/head branch is backport/backport-609-to-2.4.

Angie-Zhang pushed a commit to Angie-Zhang/index-management that referenced this pull request Dec 8, 2022
* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
(cherry picked from commit d91df69)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 9, 2022
* Fix all the compile warnings and detekt issues (#603)

* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Unify test clean logic (#609)

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
(cherry picked from commit 7a02534)
AWSHurneyt pushed a commit that referenced this pull request Dec 9, 2022
* Fix all the compile warnings and detekt issues (#603)

* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Unify test clean logic (#609)

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
(cherry picked from commit 7a02534)

Co-authored-by: bowenlan-amzn <bowenlan23@gmail.com>
wuychn pushed a commit to ochprince/index-management that referenced this pull request Mar 16, 2023
* Fix all the compile warnings and detekt issues (opensearch-project#603)

* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Unify test clean logic (opensearch-project#609)

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
ronnaksaxena pushed a commit to ronnaksaxena/index-management that referenced this pull request Jul 19, 2023
* Fix all the compile warnings and detekt issues (opensearch-project#603)

* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Unify test clean logic (opensearch-project#609)

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
Signed-off-by: Ronnak Saxena <ronsax@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport 2.4 maintenance improves code quality, but not the product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants