-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
ESQL: Send language version in spec tests #107268
ESQL: Send language version in spec tests #107268
Conversation
For now this just sends a random version; later, we will want to specify applicable versions in the csv tests themselves.
@@ -96,6 +100,8 @@ protected EsqlSpecTestCase(String fileName, String groupName, String testName, I | |||
this.lineNumber = lineNumber; | |||
this.testCase = testCase; | |||
this.mode = mode; | |||
// TODO: Read applicable versions from csv-spec files/make it part of testCase. | |||
this.versions = Build.current().isSnapshot() ? Set.of(EsqlVersion.values()) : Set.of(EsqlVersion.releasedAscending()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we introduce the first change that requires a new lang version, I think our csv tests will look roughly like this:
mvMedian
// Until version 2024.04.01, inclusive
versions:-=2024.04.01
row i = [1,2,3,4] | eval mv_median(i) | drop i;
mv_median(i):i
2
;
mvMedianNew
// From the next version
versions:2024.04.01+
row i = [1,2,3,4] | eval mv_median(i) | drop i;
mv_median(i):d
2.5
;
The old mvMedian
test will be tested with a random version up to 2024.04.01
, while mvMedianNew
will be tested with a random later version, including snapshot
.
I think we'll also want a mechanism to specify the version to run the spec/csv tests at; when making a breaking change (like having mv_median
return a different data type), it's important to run as many tests against snapshot
as possible to see what breaks.
buildkite run elasticsearch-ci/bwc-snapshots |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
For now this just sends a random version; later, we will want to specify applicable versions in the csv tests themselves.
For now this just sends a random version; later, we will want to specify applicable versions in the csv tests themselves.
Relates #104890
For now this just send a random version; later, we will want to specify applicable versions in the csv tests themselves.