Repository navigation
Conversation
…and test the same configurations on every run The 11 hand-written test jobs in main.yml ran the same combinations on every commit: the Zulu JDK only, an English locale, two Guava versions, and JDK 24 as the newest JDK. They took about 230 runner-minutes per commit, and adding a JDK meant copying a 30-line job. .github/workflows/matrix.mjs now generates 6 test jobs per run with github-actions-random-matrix. It varies the OS, the test JDK (8 to 24) and its vendor, the Guava version (21.0 to 33.4.8-jre), Avatica (the pinned release or main), the time zone, and the locale. Every run has Windows, macOS, JDK 8, JDK 24, the oldest and the latest Guava, and Avatica main; the remaining rows cover value pairs that no earlier row covers. A pull request keeps the same rows across pushes, and workflow_dispatch replays a run from the seed it printed. The new Gradle property testExtraJvmArgs passes JVM arguments to the test JVM only. CI sets the locale and the time zone there, so Gradle itself keeps the runner's locale. Not changed: the ErrorProne, Checker Framework, and Druid jobs. The avatica axis replaces the separate "Avatica main" job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira Link
CALCITE-7892
Changes Proposed
The 11 hand-written test jobs in
main.ymlran the same combinations on every commit: the Zulu JDK only, an English locale, two Guava versions, and JDK 24 as the newest JDK. They took about 230 runner-minutes per commit (see the dev@ thread "Calcite CI pending delays"), and adding a JDK meant copying a 30-line job..github/workflows/matrix.mjsnow generates 6 test jobs per run with github-actions-random-matrix, which Apache JMeter, pgjdbc, and TestNG use. The axes are OS, test JDK (8, 11, 17, 21, 24), JDK vendor (zulu, temurin, corretto, liberica, microsoft), Guava (21.0, 27.1-jre, 31.1-jre, 33.4.8-jre), Avatica (the pinned release ormain), time zone, and locale. Every run has Windows, macOS, JDK 8, JDK 24, the oldest and the latest Guava, Avaticamain, and javadoc on JDK 8 and 21; the remaining rows cover value pairs no earlier row covers. A pull request keeps the same rows across pushes, each job name lists its parameters, and the first step of each job prints the properties the test JVM sees. To replay a run, pass the seed it printed toworkflow_dispatch, or runRNG_SEED=<seed> node .github/workflows/matrix.mjslocally.The new Gradle property
testExtraJvmArgspasses JVM arguments to the test JVM only. CI sets-Duser.language,-Duser.country, and-Duser.timezonethere, so Gradle itself keeps the runner's locale. A-Din it overrides the valuepassPropertysets.The axes are the same ones the CI previously varied by hand, plus the JDK vendor and the locale; the choice follows past failures in JIRA (time zone: CALCITE-4790, CALCITE-4793, CALCITE-5493; locale: CALCITE-2816, CALCITE-6580; Guava: CALCITE-4789, CALCITE-4815; JDK vendor: CALCITE-5140).
User-visible changes:
testExtraJvmArgs: space-separated JVM arguments for the test JVM, for example./gradlew test -PtestExtraJvmArgs="-Duser.language=de -Duser.country=DE".Verification
Two trial runs on my fork, with 12 jobs and every value of every axis required at least once: run 40321987597 and run 40324575848. Across them, every job without
-XX:hashCode=2passed all 17087:coretests: locales de_DE, fr_CA, ru_RU, and en_US, all four time zones, Guava 21.0 to 33.4.8-jre, every vendor, macOS and Windows, and Avaticamainon JDK 8 and 11. The other failures led to the exclusions under Scope; theLintTestfailures come from the trial branch's commit messages.Scope
The trial runs found three defects that this PR keeps out of the matrix, so CI stays green; each needs its own fix:
-XX:hashCode=2, 41:coretests fail, for exampleSqlValidatorTest#testCastFailsacceptsCAST(DATE '1243-12-01' AS TIME). The cause isSqlTypeMappingRules.Builder#add, which uses a mutable set as a cache key. A follow-up can fix it and add thehashaxis back.InnodbAdapterDataTypesTestfails withColumn parser not supported for type İNT: innodb-java-reader 1.0.10 uppercases column types in the default locale.reference not foundinRelBuilder,SqlFunctions, andSqlValidatorScope, so javadoc runs on JDK 8 and 21, as before.JDK 25 compiles the code but does not run tests: tests run on the JDK that runs Gradle, and Gradle 8.14 runs on JDK 24 at most. Oracle JDK is left out for the same reason: Oracle publishes current builds only for JDK 25, and setup-java takes older Oracle JDKs from the archive, which holds only their first GA build.
Windows now usually runs with JDK 8 or 24, since the Windows row tends to share a required JDK row; Windows with JDK 17 or 21 appears in a few percent of runs.
🤖 Generated with Claude Code