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

Fix all the compile warnings and detekt issues #603

Conversation

bowenlan-amzn
Copy link
Member

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

Signed-off-by: bowenlan-amzn [email protected]

Issue #, if available:
#90
#239

Description of changes:
Fix all the compile warning and detekt warning. After this merged in, IM doesn't allow any change with compile warning or detekt warning to be merged in.

For the roles field deprecated in Rollup and Transform model, the usage in stream input and output is also deprecated. Specifically, stream output always write roles field as empty list.

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 added the maintenance improves code quality, but not the product label Nov 5, 2022
@bowenlan-amzn bowenlan-amzn force-pushed the compile_warning_fix_and_force branch 3 times, most recently from 4f1435a to c197526 Compare November 8, 2022 17:17
@bowenlan-amzn bowenlan-amzn force-pushed the compile_warning_fix_and_force branch from c197526 to 0869675 Compare November 10, 2022 00:40
@codecov-commenter
Copy link

Codecov Report

Merging #603 (0869675) into main (efe2d33) will decrease coverage by 0.77%.
The diff coverage is 58.60%.

@@             Coverage Diff              @@
##               main     #603      +/-   ##
============================================
- Coverage     75.86%   75.09%   -0.78%     
- Complexity     2485     2589     +104     
============================================
  Files           316      330      +14     
  Lines         14546    15111     +565     
  Branches       2248     2337      +89     
============================================
+ Hits          11036    11348     +312     
- Misses         2253     2432     +179     
- Partials       1257     1331      +74     
Impacted Files Coverage Δ
...ement/model/coordinator/SweptManagedIndexConfig.kt 78.12% <0.00%> (ø)
...nagement/step/rollup/AttemptCreateRollupJobStep.kt 49.18% <0.00%> (+0.79%) ⬆️
...action/changepolicy/TransportChangePolicyAction.kt 63.13% <ø> (ø)
...ent/indexstatemanagement/util/ManagedIndexUtils.kt 75.77% <0.00%> (-0.34%) ⬇️
...ment/indexstatemanagement/util/RestHandlerUtils.kt 88.88% <ø> (ø)
...statemanagement/validation/ValidateReplicaCount.kt 0.00% <0.00%> (ø)
.../rollup/action/index/TransportIndexRollupAction.kt 72.09% <ø> (+0.82%) ⬆️
...rch/indexmanagement/rollup/model/metric/Average.kt 83.33% <ø> (ø)
...nsearch/indexmanagement/rollup/model/metric/Max.kt 75.00% <ø> (ø)
...nsearch/indexmanagement/rollup/model/metric/Min.kt 75.00% <ø> (ø)
... and 67 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 force-pushed the compile_warning_fix_and_force branch 6 times, most recently from 0e7fc07 to 2ab9eaa Compare November 10, 2022 03:05
Signed-off-by: bowenlan-amzn <[email protected]>
@bowenlan-amzn bowenlan-amzn force-pushed the compile_warning_fix_and_force branch from 2ab9eaa to 64bd21f Compare November 10, 2022 07:32
@bowenlan-amzn bowenlan-amzn marked this pull request as ready for review November 10, 2022 16:52
@bowenlan-amzn bowenlan-amzn requested a review from a team November 10, 2022 16:52
Copy link
Contributor

@khushbr khushbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing these deteckt issues @bowenlan-amzn. Helps improve the overall development sanity for the Repo.

@bowenlan-amzn bowenlan-amzn merged commit a21e4a6 into opensearch-project:main Nov 10, 2022
@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-603-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a21e4a60b4f76c18c9f5eb2d2db9649750c92781
# Push it to GitHub
git push --set-upstream origin backport/backport-603-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-603-to-2.x.

bowenlan-amzn added a commit to bowenlan-amzn/index-management that referenced this pull request Nov 10, 2022
* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
@bowenlan-amzn bowenlan-amzn deleted the compile_warning_fix_and_force branch November 16, 2022 07:54
bowenlan-amzn added a commit to bowenlan-amzn/index-management that referenced this pull request Nov 21, 2022
* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
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 <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

* Unify test clean logic (#609)

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <[email protected]>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <[email protected]>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
@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-603-to-2.4
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a21e4a60b4f76c18c9f5eb2d2db9649750c92781
# Push it to GitHub
git push --set-upstream origin backport/backport-603-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-603-to-2.4.

Angie-Zhang pushed a commit to Angie-Zhang/index-management that referenced this pull request Dec 9, 2022
* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
(cherry picked from commit a21e4a6)
Angie-Zhang pushed a commit to Angie-Zhang/index-management that referenced this pull request Dec 9, 2022
* Fix all the compile warnings and detekt issues

Signed-off-by: bowenlan-amzn <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
(cherry picked from commit a21e4a6)
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 <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

* Unify test clean logic (#609)

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <[email protected]>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <[email protected]>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
(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 <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

* Unify test clean logic (#609)

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <[email protected]>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <[email protected]>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
(cherry picked from commit 7a02534)

Co-authored-by: bowenlan-amzn <[email protected]>
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 <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

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

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <[email protected]>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <[email protected]>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
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 <[email protected]>

* Fix time capture is 0

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

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

* Unify wipe indices logic after tests

Signed-off-by: bowenlan-amzn <[email protected]>

* Enhance wipeAllIndices function

Signed-off-by: bowenlan-amzn <[email protected]>

* Customize cleanup for multi node test

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
Signed-off-by: Ronnak Saxena <[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 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