-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Delivery/BuildBuild or test infrastructureBuild or test infrastructureTeam:DeliveryMeta label for Delivery teamMeta label for Delivery team
Description
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
elasticsearch/server/src/main/java/org/elasticsearch/Version.java
Lines 297 to 299 in b8be6cb
| 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:
- Drop the qualifier from the main response in 7.0
- Accept the qualifier in
Version.fromStringif we're now including them again - Work around it in
testLuceneVersionConstant(but I suspect that won't be the only place).
Metadata
Metadata
Assignees
Labels
:Delivery/BuildBuild or test infrastructureBuild or test infrastructureTeam:DeliveryMeta label for Delivery teamMeta label for Delivery team