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 qualifier in main response breaks testLuceneVersionConstant #38685

Closed
tvernum opened this issue Feb 11, 2019 · 4 comments
Closed

Version qualifier in main response breaks testLuceneVersionConstant #38685

tvernum opened this issue Feb 11, 2019 · 4 comments
Assignees
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team

Comments

@tvernum
Copy link
Contributor

tvernum commented Feb 11, 2019

In #35412 we added the -SNAPSHOT qualifier to the version in the response for the main action GET /

For example:

{
  "name" : "node01",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "E7dTpDuGR12x4qR_OOP6Rg",
  "version" : {
    "number" : "7.0.0-SNAPSHOT",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "6964083",
    "build_date" : "2019-02-06T06:59:02.386711Z",
    "build_snapshot" : true,
    "lucene_version" : "8.0.0",
    "minimum_wire_compatibility_version" : "6.7.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

In 6.x the qualifier was not included:

{
  "name" : "node01",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "j1Cagrq6Sa6_OxA4g7iu-Q",
  "version" : {
    "number" : "6.7.0",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "Unknown",
    "build_date" : "2019-01-24T04:05:16.950403Z",
    "build_snapshot" : true,
    "lucene_version" : "7.6.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

This causes VerifyVersionConstantsIT.testLuceneVersionConstant to fail (log) becuase it tries to pass the version.number through Version.fromString and fromString does not accept -SNAPSHOT qualifiers for versions new than 2.x

if (rawMajor >= 5 && snapshot) { // we don't support snapshot as part of the version here anymore
throw new IllegalArgumentException("illegal version format - snapshots are only supported until version 2.x");
}

REPRODUCE WITH:

./gradlew :qa:verify-version-constants:v7.0.0#oldClusterTestRunner -Dtests.seed=D70B4DC789F67CC -Dtests.class=org.elasticsearch.qa.verify_version_constants.VerifyVersionConstantsIT -Dtests.method="testLuceneVersionConstant" -Dtests.security.manager=true -Dtests.locale=es-ES -Dtests.timezone=Antarctica/Rothera -Dtests.distribution=default -Dcompiler.java=11 -Druntime.java=8

It looks we either need to:

  1. Drop the qualifier from the main response in 7.0
  2. Accept the qualifier in Version.fromString if we're now including them again
  3. Work around it in testLuceneVersionConstant (but I suspect that won't be the only place).
@tvernum tvernum added the :Delivery/Build Build or test infrastructure label Feb 11, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@tvernum
Copy link
Contributor Author

tvernum commented Feb 11, 2019

@atorok I assigned this to you since it stems from your qualifier changes, so I thought you'd be best placed to decide which fix is most appropriate.

@alpar-t
Copy link
Contributor

alpar-t commented Feb 11, 2019

Thanks @tvernum looks like this is happening on 7.x . We fixed in on master in #38514 but looks like it didn't make it to 7.x.

@alpar-t
Copy link
Contributor

alpar-t commented Feb 11, 2019

back-ported to both 7.x and 7.0

@alpar-t alpar-t closed this as completed Feb 11, 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
Projects
None yet
Development

No branches or pull requests

4 participants