Add lucene version compatibility tests#121104
Conversation
|
Pinging @elastic/es-delivery (Team:Delivery) |
| ES_VERSION: | ||
| - "9.0.0" | ||
| ES_COMMIT: | ||
| - "b2cc9d9b8f00ee621f93ddca07ea9c671aab1578" # update to match last commit before lucene bump |
There was a problem hiding this comment.
Do we wanna coordinate on this commit hash, or just go with what is here and update it after the Lucene 10.1.0 upgrade has been merged?
There was a problem hiding this comment.
Tying testing to a specific commit is ok, yet I wonder if it would be possible in the future to tie to index version changes. I think that besides codec changes, we are totally lacking test coverage for index version changes that we make. And a codec change implies an index version change.
There was a problem hiding this comment.
We have to know what hash to checkout. So if we do based on index version we still have to have some mapping of version -> commit somewhere.
| })); | ||
|
|
||
| // Distribution resolution for "override" versions. This allows for building from source for any version, including the current | ||
| // version of existing released versions from a commit form the main branch. This is done by passing certain system properties, ex: |
There was a problem hiding this comment.
minor, typo "... form the main branch"
| String versionProperty = System.getProperty("tests.bwc.main.version"); | ||
| // We use this phony version as a placeholder for the real version | ||
| if (distribution.getVersion().equals("0.0.0")) { | ||
| BwcVersions.UnreleasedVersionInfo unreleasedVersionInfo = new BwcVersions.UnreleasedVersionInfo( |
There was a problem hiding this comment.
do we want to assert that versionProperty is non-null here? Or maybe it's already implied by the following fromString ?
|
|
||
| tasks.register("luceneBwcTest", StandaloneRestIntegTestTask) { | ||
| // We use a phony version here as the real version is provided via `tests.bwc.main.version` system property | ||
| usesBwcDistribution(Version.fromString("0.0.0")) |
There was a problem hiding this comment.
ha! this is a cute trick. Nice!
This commit adds compatibility tests that target ES revisions that align with specific Lucene versions. In this case, we are intending to upgrade from Lucene 10.0 to 10.1. Since no on-prem Elasticsearch release exists with 10.0, we need another method to ensure compatibility with Lucene 10.0 indicies.
The work here is a bit hacky since all our compatibility testing infrastructure is centered around versions and we're now effectively doing compatibility tests between two different revisions of Elasticsearch that both report the same version. Ideally this specific testing would be replaced by unit tests, rather that reusing our full cluster restart tests for this purpose.
We'll also want to bump the commit referenced in the CI pipelines here to align with the last commit using Lucene 10.0.