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

Use Version.compareMajor instead of using equals operator #1876

Merged
merged 1 commit into from
Jan 11, 2022
Merged

Use Version.compareMajor instead of using equals operator #1876

merged 1 commit into from
Jan 11, 2022

Conversation

adnapibar
Copy link
Contributor

Description

This test fails due to equality check of majors between OpenSearch Version 1.x and LegacyESVersion 7.x. They should be equivalent but in this case the check fails and LegacyVersion.v6.8.x is chosen which was removed in 52508d5.

This change fixes the comparison logic by using Version.compareMajor method instead.

Issues Resolved

Discovered in #1866
Log - https://ci.opensearch.org/logs/ci/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/gradle_check_1837.log

Check List

  • All tests pass
  • 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.

Signed-off-by: Rabi Panda [email protected]

This test fails due to equality check of majors between OpenSearch Version 1.x and LegacyESVersion 7.x. They should be equivalent but in this case the check fails and LegacyVersion.v6.8.x is chosen which was removed in 52508d5.

This change fixes the comparison logic by using `Version.compareMajor` method instead.

Signed-off-by: Rabi Panda <[email protected]>
@adnapibar adnapibar added bug Something isn't working v2.0.0 Version 2.0.0 labels Jan 11, 2022
@adnapibar adnapibar requested a review from a team as a code owner January 11, 2022 01:00
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Collaborator

@reta reta left a comment

Choose a reason for hiding this comment

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

Thanks @adnapibar !

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 7ea012d
Log 1844

Reports 1844

@adnapibar adnapibar merged commit 28f688f into opensearch-project:main Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants