Skip to content

Consolidate version-numbering semantics #27397

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

Closed

Conversation

DaveCTurner
Copy link
Contributor

At the moment we interpret version numbers, and our expectations for things like which unreleased versions there are and on which branches their code lives, in a number of different places. These various interpretations are not obviously equivalent, and the bump to 6.0.1 certainly uncovered some issues in this code. The way that some of the issues were fixed will bite us at the bump to 6.0.2.

The plan is to consolidate this logic into one place, and test it more thoroughly, to avoid this kind of thing catching us out in future.

@DaveCTurner DaveCTurner self-assigned this Nov 15, 2017
@DaveCTurner DaveCTurner added v6.1.0 :Delivery/Build Build or test infrastructure labels Nov 15, 2017
DaveCTurner added a commit that referenced this pull request Nov 15, 2017
An attempt to bump to 6.0.1 on the 6.0 branch exposed up a handful of issues that this commit fixes. One of those fixes is a terrible hack that will be fixed more thoroughly in #27397, and another is a back port of d5e56c5 which is related to #27251.
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Nov 15, 2017
An attempt to bump to 6.0.1 on the 6.0 branch exposed up a handful of issues that this commit fixes. One of those fixes is a terrible hack that will be fixed more thoroughly in elastic#27397, and another is a back port of d5e56c5 which is related to elastic#27251.
@DaveCTurner DaveCTurner added v6.0.1 v7.0.0 >test Issues or PRs that are addressing/adding tests labels Nov 19, 2017
@DaveCTurner DaveCTurner requested a review from nik9000 November 22, 2017 16:14
build.gradle Outdated
}
final def bwcPreviousReleaseSnapshot = versionCollection.BWCSnapshotForPreviousMinorOfCurrentMajor
if (bwcPreviousReleaseSnapshot != null) {
throw new NotImplementedException(
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gah, the version bump to 6.2.0 just got pushed, so now I can't merge this without throwing this exception. :(

@@ -107,7 +107,8 @@ class VagrantTestPlugin implements Plugin<Project> {
if (upgradeFromVersion == null) {
String firstPartOfSeed = project.rootProject.testSeed.tokenize(':').get(0)
final long seed = Long.parseUnsignedLong(firstPartOfSeed, 16)
upgradeFromVersion = project.indexCompatVersions[new Random(seed).nextInt(project.indexCompatVersions.size())]
final def indexCompatVersions = project.versionCollection.versionsIndexCompatibleWithCurrent
Copy link
Member

Choose a reason for hiding this comment

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

We've been mostly avoiding def in .groovy files so they are more "java-like". Can you use the type here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, no probs

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Nov 23, 2017
Fixes to the build system, particularly around BWC testing, and to make future
version bumps less painful.
@DaveCTurner
Copy link
Contributor Author

@martijnvg Jenkins and I are happy about this. Hopefully your test run is too.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

@DaveCTurner My test run (gradle bwcTest) was happy too.

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Nov 23, 2017
Fixes to the build system, particularly around BWC testing, and to make future
version bumps less painful.
DaveCTurner added a commit that referenced this pull request Nov 23, 2017
Fixes to the build system, particularly around BWC testing, and to make future
version bumps less painful.
DaveCTurner added a commit that referenced this pull request Nov 23, 2017
Fixes to the build system, particularly around BWC testing, and to make future
version bumps less painful.
@DaveCTurner
Copy link
Contributor Author

Merged and backported:

89ba899 on master
27ae6ac on 6.x
a762da6 on 6.1
2c72681 on 6.0

martijnvg added a commit that referenced this pull request Nov 24, 2017
martijnvg added a commit that referenced this pull request Nov 24, 2017
* es/master: (38 commits)
  Backport wait_for_initialiazing_shards to cluster health API
  Carry over version map size to prevent excessive resizing (#27516)
  Fix scroll query with a sort that is a prefix of the index sort (#27498)
  Delete shard store files before restoring a snapshot (#27476)
  Replace `delimited_payload_filter` by `delimited_payload` (#26625)
  CURRENT should not be a -SNAPSHOT version if build.snapshot is false (#27512)
  Fix merging of _meta field (#27352)
  Remove unused method (#27508)
  unmuted test, this has been fixed by #27397
  Consolidate version numbering semantics (#27397)
  Add wait_for_no_initializing_shards to cluster health API (#27489)
  [TEST] use routing partition size based on the max routing shards of the second split
  Adjust CombinedDeletionPolicy for multiple commits (#27456)
  Update composite-aggregation.asciidoc
  Deprecate `levenstein` in favor of `levenshtein` (#27409)
  Automatically prepare indices for splitting (#27451)
  Validate `op_type` for `_create` (#27483)
  Minor ShapeBuilder cleanup
  muted test
  Decouple nio constructs from the tcp transport (#27484)
  ...
martijnvg added a commit that referenced this pull request Nov 24, 2017
* es/6.x: (30 commits)
  Add wait_for_no_initializing_shards to cluster health API (#27489)
  Carry over version map size to prevent excessive resizing (#27516)
  Fix scroll query with a sort that is a prefix of the index sort (#27498)
  Delete shard store files before restoring a snapshot (#27476)
  CURRENT should not be a -SNAPSHOT version if build.snapshot is false (#27512)
  Fix merging of _meta field (#27352)
  test: do not run percolator query builder bwc test against 5.x versions
  Remove unused method (#27508)
  Consolidate version numbering semantics (#27397)
  Adjust CombinedDeletionPolicy for multiple commits (#27456)
  Minor ShapeBuilder cleanup
  [GEO] Deprecate ShapeBuilders and decouple geojson parse logic
  Improve docs for split API in 6.1/6.x (#27504)
  test: use correct pre 6.0.0-alpha1 format
  Update composite-aggregation.asciidoc
  Deprecate `levenstein` in favor of `levenshtein` (#27409)
  Decouple nio constructs from the tcp transport (#27484)
  Bump version from 6.1 to 6.2
  Fix whitespace in Security.java
  Tighten which classes can exit
  ...
alpar-t added a commit that referenced this pull request Jul 18, 2018
Implement buildSrc Version in java

- This allows to move all  all .java files from .groovy.
- Will prevent eclipse from tangling up in this setup
- make it possible to use Version from Java

This backport pulls in some changes from the non backported #27397
but that should be fine
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
@DaveCTurner DaveCTurner deleted the 2017-11-20-version-numbering branch July 23, 2022 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker :Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test Issues or PRs that are addressing/adding tests v6.0.1 v6.1.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants