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

Version checks are incorrectly returning versions < 1.0.0. #797

Merged
merged 3 commits into from
Jun 2, 2021

Conversation

dblock
Copy link
Member

@dblock dblock commented May 28, 2021

Same as #791 but into main, where we run all of CI, first. Not sure what the correct protocol is.

Description

The first issue in #786 is caused by integration tests trying to fetch 7.10.3 from source. This is because the code thinks 7.10.3 has not been released yet. There are two problems fixed in this PR:

  • The current unreleased version is 1.0.0 and code needs to understand that 1.0 > 7.x.
  • The 7.10.3 version has not been released as of time of the fork, and the code needs to express that 7.10.2 has been released.

There's a new set of tests for versions for OpenSearch 1.0 to avoid conflating with version tests that presume that the next released version will be 8 and that the 7 series is not fully released. Thanks @adnapibar for those!

Check List

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

dblock and others added 3 commits May 28, 2021 17:04
- no unreleased version if the current version is "1.0.0"
- add unit tests for OpenSearch 1.0.0 with legacy ES versions.
- update VersionUtils to include all legacy ES versions as released.

Signed-off-by: Rabi Panda <[email protected]>
@dblock dblock requested a review from nknize May 28, 2021 17:06
@adnapibar adnapibar mentioned this pull request May 28, 2021
2 tasks
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 5bf797a

@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed 5bf797a

@adnapibar adnapibar added :test Adding or fixing a test backwards-compatibility labels May 28, 2021
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 5bf797a

@dblock
Copy link
Member Author

dblock commented May 28, 2021

start gradle check

1 similar comment
@adnapibar
Copy link
Contributor

start gradle check

@dblock dblock added the backport PRs or issues specific to backporting features or enhancments label May 28, 2021
@dblock
Copy link
Member Author

dblock commented May 28, 2021

I wonder whether infra automation kicked off the job twice ;) @camerski

Screen Shot 2021-05-28 at 1 19 14 PM

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 5bf797a
Log 218

Reports 218

@@ -139,7 +139,6 @@
public static final LegacyESVersion V_7_10_0 = new LegacyESVersion(7100099, org.apache.lucene.util.Version.LUCENE_8_7_0);
public static final LegacyESVersion V_7_10_1 = new LegacyESVersion(7100199, org.apache.lucene.util.Version.LUCENE_8_7_0);
public static final LegacyESVersion V_7_10_2 = new LegacyESVersion(7100299, org.apache.lucene.util.Version.LUCENE_8_7_0);
public static final LegacyESVersion V_7_10_3 = new LegacyESVersion(7100399, org.apache.lucene.util.Version.LUCENE_8_7_0);
Copy link
Member

@saratvemulapalli saratvemulapalli May 28, 2021

Choose a reason for hiding this comment

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

My understanding was the 7.10 branch in elastic which we forked out was 7.10.3.
So we are saying the next releasable version after 7.10.2 is 1.0.0. Is my understanding correct?

Copy link
Contributor

@adnapibar adnapibar May 28, 2021

Choose a reason for hiding this comment

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

The version logic is to bump the version after a release. 7.10.3 was the unreleased version of the fork which effectively became 1.0.0 - the current unreleased version for OpenSearch.

When it's released, we will bump to 1.0.1 for the Version file of 1.0 branch and that will be the next unreleased version for that branch. This is the unreleased bugfix.

The 1.x branch's unreleased version will be 1.1.0 that is unreleased minor.

The main branch will be updated to the next major version 2.0.0 which will be the next unreleased major.

So, in the Version file , the last version is the unreleased one, everything else is released.

Copy link
Member Author

Choose a reason for hiding this comment

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

The special case is that 7.10.3 will never exist in our world, we just say that 7.10.2 was the last released version and aren't trying to assume there will be a 7.10.3 in the future at all.

@@ -268,6 +268,11 @@ private String getBranchFor(Version version) {
// The current version is being worked, is always unreleased
unreleased.add(currentVersion);

// No unreleased versions for 1.0.0
Copy link
Member

Choose a reason for hiding this comment

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

Trying to wrap my head around this.
When we have 1.1.0 released how would this be?

Copy link
Contributor

Choose a reason for hiding this comment

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

See my comment above

@adnapibar adnapibar removed their request for review May 28, 2021 20:46
@dblock dblock requested review from shwetathareja and adnapibar June 1, 2021 17:36
@dblock dblock added the v1.0.0 Version 1.0.0 label Jun 1, 2021
@dblock dblock merged commit bd9ca7c into opensearch-project:main Jun 2, 2021
@dblock dblock deleted the version-checks-main branch June 2, 2021 20:04
dblock added a commit to dblock/OpenSearch that referenced this pull request Jun 2, 2021
…h-project#797)

* Version checks are incorrectly returning versions < 1.0.0.

Signed-off-by: dblock <[email protected]>

* Removed V_7_10_3 which has not been released as of time of the fork.

Signed-off-by: dblock <[email protected]>

* Update check for current version to get unreleased versions.

- no unreleased version if the current version is "1.0.0"
- add unit tests for OpenSearch 1.0.0 with legacy ES versions.
- update VersionUtils to include all legacy ES versions as released.

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

Co-authored-by: Rabi Panda <[email protected]>
dblock added a commit to dblock/OpenSearch that referenced this pull request Jun 2, 2021
…h-project#797)

* Version checks are incorrectly returning versions < 1.0.0.

Signed-off-by: dblock <[email protected]>

* Removed V_7_10_3 which has not been released as of time of the fork.

Signed-off-by: dblock <[email protected]>

* Update check for current version to get unreleased versions.

- no unreleased version if the current version is "1.0.0"
- add unit tests for OpenSearch 1.0.0 with legacy ES versions.
- update VersionUtils to include all legacy ES versions as released.

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

Co-authored-by: Rabi Panda <[email protected]>
dblock added a commit that referenced this pull request Jun 3, 2021
* Version checks are incorrectly returning versions < 1.0.0.
* Removed V_7_10_3 which has not been released as of time of the fork.
* Update check for current version to get unreleased versions.

- no unreleased version if the current version is "1.0.0"
- add unit tests for OpenSearch 1.0.0 with legacy ES versions.
- update VersionUtils to include all legacy ES versions as released.

Signed-off-by: Rabi Panda <[email protected]>
Signed-off-by: dblock <[email protected]>
Co-authored-by: Rabi Panda <[email protected]>
nknize pushed a commit that referenced this pull request Jun 25, 2021
* Version checks are incorrectly returning versions < 1.0.0.
* Removed V_7_10_3 which has not been released as of time of the fork.
* Update check for current version to get unreleased versions.

- no unreleased version if the current version is "1.0.0"
- add unit tests for OpenSearch 1.0.0 with legacy ES versions.
- update VersionUtils to include all legacy ES versions as released.

Signed-off-by: Rabi Panda <[email protected]>
Signed-off-by: dblock <[email protected]>
Co-authored-by: Rabi Panda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments backwards-compatibility :test Adding or fixing a test v1.0.0 Version 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants