Skip to content

Conversation

@alpar-t
Copy link
Contributor

@alpar-t alpar-t commented Feb 19, 2019

This changes does the following:

  • version collections now:
    • returns a fully qualified Gradle project for unreleased versions
    • the current version is not filtered out when returning compatible versions
    • we return :distribution for the current version
  • :distribution now emulates the configurations of a project that builds an unreleased version so bwc tests can use it.

This change causes the current version to be included as an "old" version in bwc tests, such that bwc tests will now test a currentVersion to currentVersion upgrade.

This has the advantage of testing the plain restarts, but also makes the part of the test meant to run against the old cluster also run against the current version, this is important because in time the current version actually becomes the old version and suddenly we have a lot of test code that was never ran against it. This change makes sure that this is not the case and version bumps can be smooth.

@alpar-t alpar-t added :Delivery/Build Build or test infrastructure v8.0.0 labels Feb 19, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@alpar-t alpar-t added the WIP label Feb 19, 2019
@alpar-t
Copy link
Contributor Author

alpar-t commented Feb 19, 2019

I was too quick to submit this one as it has changes from #39059. Added the WIP label.

@mark-vieira
Copy link
Contributor

I was too quick to submit this one as it has changes from #39059. Added the WIP label.

Please ping when this is ready fro review again.

@alpar-t alpar-t removed the WIP label Feb 21, 2019
@alpar-t
Copy link
Contributor Author

alpar-t commented Feb 21, 2019

@mark-vieira @jasontedor @rjernst

This is now ready for review. The last test failure is being addressed by @jkakavas ( the test assumed that a master on current version will not be elected in oneThirdUpgraded). This does happen to hold true when upgrading across major versions, but it's not otherwise guaranteed.

I will not merge this before that fix is in, but I think we can start the review process.

@mark-vieira
Copy link
Contributor

Can't provide a lot of insight here as I'm not completely aware of all the business rules with regards to versions. I wouldn't mind sitting down with someone to go over the differences between bugfix, maintenance, staged, etc as well as our definitions of wire-compatible vs index-compatible.

@jasontedor
Copy link
Member

@mark-vieira I am happy to do this! Please ping me tomorrow?

}
}

['archives:windows-zip','archives:oss-windows-zip',
Copy link
Member

Choose a reason for hiding this comment

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

Can you please explain this block?

Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

While reading the javadoc there was a bit of confusion, with regards to the following:

<li>the unreleased <b>bugfix</b>, M.N.c (c &gt; 0) on the `M.b` branch</li>

I believe the branch in question here should be M.N as it's never explained what b is. As I understand it, work on 6.6.2 should be done in the 6.6 branch, yes?

We make a similar mention to an undefined b later in the javadoc:

* E.x when M.N.c is released M.N.c+1 is added to the Version class mentioned above in all the following branches:
*  `M.b`, `M.x` and `master` so we can reliably assume that the leafs of the version tree are unreleased.

Again, I think we should refer to branch M.N rather than M.b.

collect.forEach(uvi -> consumer.accept(uvi));
}

private String getGradleProjectNameFor(Version version) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should rename this getGradleProjectPathFor() to be more pedantically accurate.

Similarly, UnreleasedVersionInfo.gradleProjectName should probably be gradleProjectPath.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed, makes much more sense.

collect.forEach(uvi -> consumer.accept(uvi));
}

private String getGradleProjectNameFor(Version version) {
Copy link
Contributor

@mark-vieira mark-vieira Feb 22, 2019

Choose a reason for hiding this comment

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

While @jasontedor and I were walking through this together we found it really hard to reason about this logic. I later read the top-level javadoc and that cleared a few things up but I think in general this method in particular could use some comments to guide the reader along. Can we add some comments to the logic in this method to better explain what is happening?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a few comments and a pointer to the class javadoc

@alpar-t
Copy link
Contributor Author

alpar-t commented Feb 28, 2019

Again, I think we should refer to branch M.N rather than M.b.

Fixed all of those, good catch, this was an oversight, it really should have been N rather than b.

@alpar-t alpar-t merged commit bb5e339 into elastic:master Mar 4, 2019
@alpar-t alpar-t deleted the run-bwc-from-current branch March 4, 2019 09:21
@alpar-t
Copy link
Contributor Author

alpar-t commented Mar 4, 2019

Will back-port build setup only, without enabling the tests to make it easier to back-port future build changes.

alpar-t added a commit to alpar-t/elasticsearch that referenced this pull request Mar 6, 2019
This back-ports how versions are determined and bwc test are set up from
 elastic#39102 without enabling the bwc from current version tests so it's
 easier/possible to backmerge future buld changes.
It's expected that the tets are lacking many of the required fixes in
this version to enable them.
alpar-t added a commit that referenced this pull request Mar 7, 2019
* Back port build changes from #39102

This back-ports how versions are determined and bwc test are set up from
 #39102 without enabling the bwc from current version tests so it's
 easier/possible to backmerge future buld changes.
It's expected that the tets are lacking many of the required fixes in
this version to enable them.
@alpar-t alpar-t mentioned this pull request Mar 7, 2019
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v7.2.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants