From eb36027f18a13994bf69737ddaa690ea32effb5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 00:15:24 +0100 Subject: [PATCH 01/11] Remove tests-via-crave.yml workflow; Crave is going away --- .github/workflows/tests-via-crave.yml | 48 --------------------------- 1 file changed, 48 deletions(-) delete mode 100644 .github/workflows/tests-via-crave.yml diff --git a/.github/workflows/tests-via-crave.yml b/.github/workflows/tests-via-crave.yml deleted file mode 100644 index 14d09a964b11..000000000000 --- a/.github/workflows/tests-via-crave.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Solr Tests via Crave - -on: - pull_request: - branches: - - '*' - paths: - - 'solr/**/src/**' - - 'gradle/libs.versions.toml' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - test: - name: Run Solr Tests using Crave.io resources - - runs-on: self-hosted - timeout-minutes: 40 - - env: - # Use a PR-scoped workspace path so that each new run for the same PR - # destroys any leftover resources from a previous run (including cancelled - # runs whose cleanup step may not have completed in time). - CRAVE_WORKSPACE: /crave-devspaces/pipeline/prs/${{ github.event.pull_request.number }} - - steps: - - name: Destroy previous clone - run: crave clone destroy -y ${CRAVE_WORKSPACE} || echo "Clone did not exist" - continue-on-error: true - - name: Crave clone sources - run: crave clone create --projectID 39 ${CRAVE_WORKSPACE} - - name: Checkout the correct branch - run: | - git -C ${CRAVE_WORKSPACE} fetch origin ${GITHUB_REF}:${GITHUB_REF} - git -C ${CRAVE_WORKSPACE} checkout ${GITHUB_REF} - - name: Initialize, build, test - run: | - cd ${CRAVE_WORKSPACE} - crave run --clean --message "PR: ${GITHUB_REF_NAME}" -- env CI=true ./gradlew --console=plain test - - name: Cleanup - if: ${{ always() }} - run: | - pushd ${CRAVE_WORKSPACE} - crave stop --all - popd - crave clone destroy -y ${CRAVE_WORKSPACE} From 78865b07fcc59b56955bc432c9beb927f9a2a0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 00:40:23 +0100 Subject: [PATCH 02/11] Per-module test workflows replacing the Crave full-suite run - tests-core.yml: solr/core split into four package slices (cloud, search, handler, other) run as a parallel matrix; cloud runs with tests.jvms=3 - tests-solrj.yml (was solrj-test.yml): also solrj-jetty, solrj-zookeeper, solrj-streaming and api - tests-modules-search.yml and tests-modules-cloud.yml group the modules - tests-extraction.yml (was gradle-extraction-check.yml) - tests-misc.yml: test-framework, benchmark, ref-guide examples - New tests.exclude option (comma-separated --tests patterns to exclude), needed for the exclusion-based "other" core slice --- .github/workflows/gradle-extraction-check.yml | 29 ------- .github/workflows/solrj-test.yml | 29 ------- .github/workflows/tests-core.yml | 81 +++++++++++++++++++ .github/workflows/tests-extraction.yml | 40 +++++++++ .github/workflows/tests-misc.yml | 44 ++++++++++ .github/workflows/tests-modules-cloud.yml | 51 ++++++++++++ .github/workflows/tests-modules-search.yml | 54 +++++++++++++ .github/workflows/tests-solrj.yml | 46 +++++++++++ gradle/testing/defaults-tests.gradle | 10 +++ 9 files changed, 326 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/gradle-extraction-check.yml delete mode 100644 .github/workflows/solrj-test.yml create mode 100644 .github/workflows/tests-core.yml create mode 100644 .github/workflows/tests-extraction.yml create mode 100644 .github/workflows/tests-misc.yml create mode 100644 .github/workflows/tests-modules-cloud.yml create mode 100644 .github/workflows/tests-modules-search.yml create mode 100644 .github/workflows/tests-solrj.yml diff --git a/.github/workflows/gradle-extraction-check.yml b/.github/workflows/gradle-extraction-check.yml deleted file mode 100644 index 5f742b2f90aa..000000000000 --- a/.github/workflows/gradle-extraction-check.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This test covers TikaServer tests for SolrCell, since crave does not support docker yet. -name: Extraction module tests with Docker - -on: - pull_request: - branches: - - '*' - paths: - - 'solr/modules/extraction/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - test: - name: extraction module tests with docker - - runs-on: ubuntu-latest - timeout-minutes: 15 - - steps: - - name: Checkout code - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - uses: ./.github/actions/prepare-for-build - - - name: Run extraction module tests - run: ./gradlew --no-daemon solr:modules:extraction:check diff --git a/.github/workflows/solrj-test.yml b/.github/workflows/solrj-test.yml deleted file mode 100644 index 4e66e4af85df..000000000000 --- a/.github/workflows/solrj-test.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: SolrJ Tests - -on: - pull_request: - branches: - - '*' - paths: - - '.github/workflows/solrj-test.yml' - - 'solr/solrj/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - test: - name: Run SolrJ Tests - - runs-on: ubuntu-latest - timeout-minutes: 15 - - steps: - - name: Checkout code - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - uses: ./.github/actions/prepare-for-build - - - name: Test SolrJ module - run: ./gradlew solr:solrj:test diff --git a/.github/workflows/tests-core.yml b/.github/workflows/tests-core.yml new file mode 100644 index 000000000000..ed7fa4983d41 --- /dev/null +++ b/.github/workflows/tests-core.yml @@ -0,0 +1,81 @@ +name: Solr Core Tests + +# solr/core is 78% of the whole test suite, so it is split into four slices by +# Java package that run in parallel. Each slice is sized to finish in roughly +# 15 minutes on an ubuntu-latest runner. The "other" slice is exclusion-based so +# that a new package can never silently fall outside every slice. + +on: + pull_request: + branches: + - '*' + paths: + - '.github/workflows/tests-core.yml' + - 'gradle/libs.versions.toml' + - 'solr/core/**' + # core tests are built on these; a change here can break them + - 'solr/test-framework/**' + - 'solr/api/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run Solr Core Tests (${{ matrix.slice }}) + + runs-on: ubuntu-latest + timeout-minutes: 25 + + strategy: + fail-fast: false + matrix: + slice: [cloud, search, handler, other] + jvms: [2] + include: + # cloud tests mostly wait on ZooKeeper and Jetty, so oversubscribe the 4 vCPUs + - slice: cloud + jvms: 3 + + env: + # Top-level packages under org.apache.solr for each named slice. + # The "other" slice runs everything not listed here. + SLICE_CLOUD: cloud + SLICE_SEARCH: search uninverting spelling highlight analysis legacy index parser + SLICE_HANDLER: handler cli response request servlet jersey rest security api + + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: ./.github/actions/prepare-for-build + + - name: Test solr/core slice "${{ matrix.slice }}" + run: | + args=() + case "${{ matrix.slice }}" in + cloud) pkgs="$SLICE_CLOUD" ;; + search) pkgs="$SLICE_SEARCH" ;; + handler) pkgs="$SLICE_HANDLER" ;; + other) + pkgs="" + excl="" + for p in $SLICE_CLOUD $SLICE_SEARCH $SLICE_HANDLER; do + excl="${excl:+$excl,}org.apache.solr.$p.*" + done + args+=("-Ptests.exclude=$excl") + ;; + esac + for p in $pkgs; do + args+=(--tests "org.apache.solr.$p.*") + done + ./gradlew :solr:core:test -Ptests.jvms=${{ matrix.jvms }} "${args[@]}" + + - name: Archive test output + if: ${{ failure() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: test-output-core-${{ matrix.slice }} + path: | + solr/core/build/test-results/** diff --git a/.github/workflows/tests-extraction.yml b/.github/workflows/tests-extraction.yml new file mode 100644 index 000000000000..a34e5e75a42c --- /dev/null +++ b/.github/workflows/tests-extraction.yml @@ -0,0 +1,40 @@ +# The extraction module tests need Docker for the TikaServer tests of SolrCell, +# so they get a workflow of their own. +name: Extraction Module Tests + +on: + pull_request: + branches: + - '*' + paths: + - '.github/workflows/tests-extraction.yml' + - 'gradle/libs.versions.toml' + - 'solr/modules/extraction/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run Extraction Module Tests + + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: ./.github/actions/prepare-for-build + + - name: Run extraction module tests + run: ./gradlew --no-daemon :solr:modules:extraction:check + + - name: Archive test output + if: ${{ failure() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: test-output-extraction + path: | + solr/modules/extraction/build/test-results/** diff --git a/.github/workflows/tests-misc.yml b/.github/workflows/tests-misc.yml new file mode 100644 index 000000000000..0abb4bf6d553 --- /dev/null +++ b/.github/workflows/tests-misc.yml @@ -0,0 +1,44 @@ +name: Misc Tests + +# Small test suites that do not belong to any other tests-* workflow. + +on: + pull_request: + branches: + - '*' + paths: + - '.github/workflows/tests-misc.yml' + - 'gradle/libs.versions.toml' + - 'solr/benchmark/**' + - 'solr/test-framework/**' + - 'solr/solr-ref-guide/modules/*/examples/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run Misc Tests + + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: ./.github/actions/prepare-for-build + + - name: Test the test-framework, benchmark and ref-guide example code + run: ./gradlew :solr:test-framework:test :solr:benchmark:test :solr:solr-ref-guide:test + + - name: Archive test output + if: ${{ failure() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: test-output-misc + path: | + solr/test-framework/build/test-results/** + solr/benchmark/build/test-results/** + solr/solr-ref-guide/build/test-results/** diff --git a/.github/workflows/tests-modules-cloud.yml b/.github/workflows/tests-modules-cloud.yml new file mode 100644 index 000000000000..6f367048d7ab --- /dev/null +++ b/.github/workflows/tests-modules-cloud.yml @@ -0,0 +1,51 @@ +name: Cloud Modules Tests + +on: + pull_request: + branches: + - '*' + paths: + - '.github/workflows/tests-modules-cloud.yml' + - 'gradle/libs.versions.toml' + - 'solr/cross-dc-manager/**' + - 'solr/modules/cross-dc/**' + - 'solr/modules/gcs-repository/**' + - 'solr/modules/jwt-auth/**' + - 'solr/modules/opentelemetry/**' + - 'solr/modules/s3-repository/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run Cloud Modules Tests + + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: ./.github/actions/prepare-for-build + + - name: Test the cloud and infrastructure modules + run: > + ./gradlew + :solr:cross-dc-manager:test + :solr:modules:cross-dc:test + :solr:modules:gcs-repository:test + :solr:modules:jwt-auth:test + :solr:modules:opentelemetry:test + :solr:modules:s3-repository:test + + - name: Archive test output + if: ${{ failure() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: test-output-modules-cloud + path: | + solr/cross-dc-manager/build/test-results/** + solr/modules/*/build/test-results/** diff --git a/.github/workflows/tests-modules-search.yml b/.github/workflows/tests-modules-search.yml new file mode 100644 index 000000000000..a97c8ae3b5db --- /dev/null +++ b/.github/workflows/tests-modules-search.yml @@ -0,0 +1,54 @@ +name: Search Modules Tests + +on: + pull_request: + branches: + - '*' + paths: + - '.github/workflows/tests-modules-search.yml' + - 'gradle/libs.versions.toml' + - 'solr/modules/analysis-extras/**' + - 'solr/modules/clustering/**' + - 'solr/modules/cuvs/**' + - 'solr/modules/langid/**' + - 'solr/modules/language-models/**' + - 'solr/modules/ltr/**' + - 'solr/modules/scripting/**' + - 'solr/modules/sql/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run Search Modules Tests + + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: ./.github/actions/prepare-for-build + + - name: Test the search-related modules + run: > + ./gradlew + :solr:modules:analysis-extras:test + :solr:modules:clustering:test + :solr:modules:cuvs:test + :solr:modules:langid:test + :solr:modules:language-models:test + :solr:modules:ltr:test + :solr:modules:scripting:test + :solr:modules:sql:test + + - name: Archive test output + if: ${{ failure() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: test-output-modules-search + path: | + solr/modules/*/build/test-results/** diff --git a/.github/workflows/tests-solrj.yml b/.github/workflows/tests-solrj.yml new file mode 100644 index 000000000000..6568f71aa502 --- /dev/null +++ b/.github/workflows/tests-solrj.yml @@ -0,0 +1,46 @@ +name: SolrJ Tests + +on: + pull_request: + branches: + - '*' + paths: + - '.github/workflows/tests-solrj.yml' + - 'gradle/libs.versions.toml' + - 'solr/api/**' + - 'solr/solrj/**' + - 'solr/solrj-jetty/**' + - 'solr/solrj-zookeeper/**' + - 'solr/solrj-streaming/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run SolrJ Tests + + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: ./.github/actions/prepare-for-build + + - name: Test the SolrJ modules and the API module + run: ./gradlew :solr:api:test :solr:solrj:test :solr:solrj-jetty:test :solr:solrj-zookeeper:test :solr:solrj-streaming:test + + - name: Archive test output + if: ${{ failure() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: test-output-solrj + path: | + solr/api/build/test-results/** + solr/solrj/build/test-results/** + solr/solrj-jetty/build/test-results/** + solr/solrj-zookeeper/build/test-results/** + solr/solrj-streaming/build/test-results/** diff --git a/gradle/testing/defaults-tests.gradle b/gradle/testing/defaults-tests.gradle index fbe118548d51..a646ce5edd94 100644 --- a/gradle/testing/defaults-tests.gradle +++ b/gradle/testing/defaults-tests.gradle @@ -47,6 +47,9 @@ allprojects { description: "Number of forked test JVMs", includeInReproLine: false], [propName: 'tests.haltonfailure', value: true, description: "Halt processing on test failure."], + [propName: 'tests.exclude', value: null, + description: "Comma-separated test class patterns to exclude (same syntax as --tests), e.g. org.apache.solr.cloud.*", + includeInReproLine: false], // Default code cache size is 240m, but disabling C2 compiler shrinks it to 48m, which turns out to not be enough [propName: 'tests.jvmargs', value: {-> @@ -117,6 +120,13 @@ allprojects { ignoreFailures = resolvedTestOption("tests.haltonfailure").toBoolean() == false + def excludePatterns = resolvedTestOption("tests.exclude") + if (excludePatterns) { + filter { + excludePatterns.split(',').each { excludeTestsMatching(it.trim()) } + } + } + jvmArgs Commandline.translateCommandline(resolvedTestOption("tests.jvmargs")) // Enable the vector incubator module on supported Java versions: From 7f529be063285862f9f600fc8cdf64c71d988db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 01:06:04 +0100 Subject: [PATCH 03/11] Run the cloud slice once: let the include add jvms instead of a fifth job An include that differs from every base combination on a key is added as a new combination, so {cloud, jvms: 3} joined {cloud, jvms: 2} instead of replacing it and the cloud slice ran twice. With jvms gone from the base axis the include only decorates the existing cloud job, and the step defaults the other slices to 2. --- .github/workflows/tests-core.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests-core.yml b/.github/workflows/tests-core.yml index ed7fa4983d41..825e33406e56 100644 --- a/.github/workflows/tests-core.yml +++ b/.github/workflows/tests-core.yml @@ -32,7 +32,6 @@ jobs: fail-fast: false matrix: slice: [cloud, search, handler, other] - jvms: [2] include: # cloud tests mostly wait on ZooKeeper and Jetty, so oversubscribe the 4 vCPUs - slice: cloud @@ -70,7 +69,7 @@ jobs: for p in $pkgs; do args+=(--tests "org.apache.solr.$p.*") done - ./gradlew :solr:core:test -Ptests.jvms=${{ matrix.jvms }} "${args[@]}" + ./gradlew :solr:core:test -Ptests.jvms=${{ matrix.jvms || 2 }} "${args[@]}" - name: Archive test output if: ${{ failure() }} From 8bc1d75e272bb374146ea6eed23fd18d43827af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 01:38:05 +0100 Subject: [PATCH 04/11] Mark the two two-minute core tests nightly CoreContainerShutdownTest waits out the production close timeouts and TestCpuAllowedLimit runs queries until the CPU limit trips: each holds one test JVM for about two minutes on every PR run, by design. Both keep running nightly. --- .../test/org/apache/solr/core/CoreContainerShutdownTest.java | 3 +++ .../src/test/org/apache/solr/search/TestCpuAllowedLimit.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/solr/core/src/test/org/apache/solr/core/CoreContainerShutdownTest.java b/solr/core/src/test/org/apache/solr/core/CoreContainerShutdownTest.java index ea14a6b2ad92..6d3f2f4b5fe6 100644 --- a/solr/core/src/test/org/apache/solr/core/CoreContainerShutdownTest.java +++ b/solr/core/src/test/org/apache/solr/core/CoreContainerShutdownTest.java @@ -21,6 +21,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; +import org.apache.lucene.tests.util.LuceneTestCase.Nightly; import org.apache.solr.SolrTestCase; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.util.ObjectReleaseTracker; @@ -41,6 +42,8 @@ * container's metrics contexts; skipping them leaks the whole metrics tree, and in a test JVM the * leaked contexts are then charged to an unrelated suite by the object release tracker. */ +// Two minutes of waiting on the production close timeouts, so nightly only. +@Nightly public class CoreContainerShutdownTest extends SolrTestCase { private static final String SOLR_XML = diff --git a/solr/core/src/test/org/apache/solr/search/TestCpuAllowedLimit.java b/solr/core/src/test/org/apache/solr/search/TestCpuAllowedLimit.java index 2afe765197ae..a6066ada10c5 100644 --- a/solr/core/src/test/org/apache/solr/search/TestCpuAllowedLimit.java +++ b/solr/core/src/test/org/apache/solr/search/TestCpuAllowedLimit.java @@ -21,6 +21,7 @@ import java.nio.file.Path; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import org.apache.lucene.tests.util.LuceneTestCase.Nightly; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.client.solrj.response.QueryResponse; @@ -35,6 +36,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +// Runs queries until the CPU limit trips, close to two minutes, so nightly only. +@Nightly public class TestCpuAllowedLimit extends SolrCloudTestCase { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); From 6fe675688f2cdd3cb26cb0911dd12efc26be1e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 02:15:33 +0100 Subject: [PATCH 05/11] Balance the core slices from measured CI timings The cloud slice set the critical path at 16.6 minutes against 12 for search and other, and the cloud package alone is the largest unit in solr/core. Its api and overseer sub-packages now run in the search slice, which had the most room, and request moves there from handler. Every slice runs with two test JVMs: the third JVM the cloud slice had was measured slower, not faster, and the include that added it ran the whole slice a second time. --- .github/workflows/tests-core.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests-core.yml b/.github/workflows/tests-core.yml index 825e33406e56..ea77c27a7c86 100644 --- a/.github/workflows/tests-core.yml +++ b/.github/workflows/tests-core.yml @@ -1,9 +1,11 @@ name: Solr Core Tests # solr/core is 78% of the whole test suite, so it is split into four slices by -# Java package that run in parallel. Each slice is sized to finish in roughly -# 15 minutes on an ubuntu-latest runner. The "other" slice is exclusion-based so -# that a new package can never silently fall outside every slice. +# Java package that run in parallel. The slices are balanced from measured CI +# timings: the cloud package alone is the largest unit in solr/core and sets +# the critical path, so its api and overseer sub-packages run in the search +# slice instead. The "other" slice is exclusion-based so that a new package +# can never silently fall outside every slice. on: pull_request: @@ -32,17 +34,13 @@ jobs: fail-fast: false matrix: slice: [cloud, search, handler, other] - include: - # cloud tests mostly wait on ZooKeeper and Jetty, so oversubscribe the 4 vCPUs - - slice: cloud - jvms: 3 env: # Top-level packages under org.apache.solr for each named slice. # The "other" slice runs everything not listed here. SLICE_CLOUD: cloud - SLICE_SEARCH: search uninverting spelling highlight analysis legacy index parser - SLICE_HANDLER: handler cli response request servlet jersey rest security api + SLICE_SEARCH: search uninverting spelling highlight analysis legacy index parser request cloud.api cloud.overseer + SLICE_HANDLER: handler cli response servlet jersey rest security api steps: - name: Checkout code @@ -54,7 +52,10 @@ jobs: run: | args=() case "${{ matrix.slice }}" in - cloud) pkgs="$SLICE_CLOUD" ;; + cloud) + pkgs="$SLICE_CLOUD" + args+=("-Ptests.exclude=org.apache.solr.cloud.api.*,org.apache.solr.cloud.overseer.*") + ;; search) pkgs="$SLICE_SEARCH" ;; handler) pkgs="$SLICE_HANDLER" ;; other) @@ -69,7 +70,7 @@ jobs: for p in $pkgs; do args+=(--tests "org.apache.solr.$p.*") done - ./gradlew :solr:core:test -Ptests.jvms=${{ matrix.jvms || 2 }} "${args[@]}" + ./gradlew :solr:core:test -Ptests.jvms=2 "${args[@]}" - name: Archive test output if: ${{ failure() }} From 4488ea50d91775495dfc92dbd8880babe993abb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 11:34:32 +0100 Subject: [PATCH 06/11] Run solrj-zookeeper in the core "other" slice The SolrJ job was the shortest of the test jobs and solrj-zookeeper is the heaviest module in it, so move that module to the exclusion-based "other" slice of the core workflow, which has the most headroom. The cloud slice is the critical path, so it does not take on more work. The "other" slice passes no --tests, only a -Ptests.exclude of the packages owned by the three named slices, so a single gradle invocation can drive both test tasks without the filter becoming ambiguous. None of the excluded package prefixes match solrj-zookeeper's tests, which live in org.apache.solr.client.solrj.impl and org.apache.solr.common.cloud. --- .github/workflows/tests-core.yml | 9 ++++++++- .github/workflows/tests-solrj.yml | 4 +--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-core.yml b/.github/workflows/tests-core.yml index ea77c27a7c86..a1ac5be791a7 100644 --- a/.github/workflows/tests-core.yml +++ b/.github/workflows/tests-core.yml @@ -18,6 +18,7 @@ on: # core tests are built on these; a change here can break them - 'solr/test-framework/**' - 'solr/api/**' + - 'solr/solrj-zookeeper/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -50,6 +51,7 @@ jobs: - name: Test solr/core slice "${{ matrix.slice }}" run: | + tasks=(:solr:core:test) args=() case "${{ matrix.slice }}" in cloud) @@ -59,7 +61,11 @@ jobs: search) pkgs="$SLICE_SEARCH" ;; handler) pkgs="$SLICE_HANDLER" ;; other) + # This slice has the most headroom, so it also runs solrj-zookeeper. + # It passes no --tests, so one invocation can drive both test tasks, + # and the excluded packages do not overlap solrj-zookeeper's tests. pkgs="" + tasks+=(:solr:solrj-zookeeper:test) excl="" for p in $SLICE_CLOUD $SLICE_SEARCH $SLICE_HANDLER; do excl="${excl:+$excl,}org.apache.solr.$p.*" @@ -70,7 +76,7 @@ jobs: for p in $pkgs; do args+=(--tests "org.apache.solr.$p.*") done - ./gradlew :solr:core:test -Ptests.jvms=2 "${args[@]}" + ./gradlew "${tasks[@]}" -Ptests.jvms=2 "${args[@]}" - name: Archive test output if: ${{ failure() }} @@ -79,3 +85,4 @@ jobs: name: test-output-core-${{ matrix.slice }} path: | solr/core/build/test-results/** + solr/solrj-zookeeper/build/test-results/** diff --git a/.github/workflows/tests-solrj.yml b/.github/workflows/tests-solrj.yml index 6568f71aa502..6ad6459f7bd9 100644 --- a/.github/workflows/tests-solrj.yml +++ b/.github/workflows/tests-solrj.yml @@ -10,7 +10,6 @@ on: - 'solr/api/**' - 'solr/solrj/**' - 'solr/solrj-jetty/**' - - 'solr/solrj-zookeeper/**' - 'solr/solrj-streaming/**' concurrency: @@ -31,7 +30,7 @@ jobs: - uses: ./.github/actions/prepare-for-build - name: Test the SolrJ modules and the API module - run: ./gradlew :solr:api:test :solr:solrj:test :solr:solrj-jetty:test :solr:solrj-zookeeper:test :solr:solrj-streaming:test + run: ./gradlew :solr:api:test :solr:solrj:test :solr:solrj-jetty:test :solr:solrj-streaming:test - name: Archive test output if: ${{ failure() }} @@ -42,5 +41,4 @@ jobs: solr/api/build/test-results/** solr/solrj/build/test-results/** solr/solrj-jetty/build/test-results/** - solr/solrj-zookeeper/build/test-results/** solr/solrj-streaming/build/test-results/** From 08ccd96dcda36d825ca4e5469293fd4933604336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 11:34:46 +0100 Subject: [PATCH 07/11] Trigger the core tests on SolrJ changes too The core tests build on the SolrJ modules, so a change confined to solrj, solrj-jetty or solrj-streaming can break them without the core workflow running at all. Add those to the existing "built on these" group, and list solrj-zookeeper with solr/core since the workflow now tests it. --- .github/workflows/tests-core.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-core.yml b/.github/workflows/tests-core.yml index a1ac5be791a7..18acf7e7c685 100644 --- a/.github/workflows/tests-core.yml +++ b/.github/workflows/tests-core.yml @@ -15,10 +15,13 @@ on: - '.github/workflows/tests-core.yml' - 'gradle/libs.versions.toml' - 'solr/core/**' + - 'solr/solrj-zookeeper/**' # core tests are built on these; a change here can break them - 'solr/test-framework/**' - 'solr/api/**' - - 'solr/solrj-zookeeper/**' + - 'solr/solrj/**' + - 'solr/solrj-jetty/**' + - 'solr/solrj-streaming/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} From f03f0c310c018d016631976379aa7ef6c9a132cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 11:34:55 +0100 Subject: [PATCH 08/11] Move the cli tests out of the handler slice The handler slice was the second longest at 15.2 minutes while the exclusion-based "other" slice ran 12.0, so drop cli from the handler list and let it fall through to "other". --- .github/workflows/tests-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-core.yml b/.github/workflows/tests-core.yml index 18acf7e7c685..84688467a951 100644 --- a/.github/workflows/tests-core.yml +++ b/.github/workflows/tests-core.yml @@ -44,7 +44,7 @@ jobs: # The "other" slice runs everything not listed here. SLICE_CLOUD: cloud SLICE_SEARCH: search uninverting spelling highlight analysis legacy index parser request cloud.api cloud.overseer - SLICE_HANDLER: handler cli response servlet jersey rest security api + SLICE_HANDLER: handler response servlet jersey rest security api steps: - name: Checkout code From d4827d5784965710ec0d559ba474a497f1b17a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 11:35:06 +0100 Subject: [PATCH 09/11] Rename the cloud modules workflow to ops modules The modules it runs are the operational ones -- backup repositories, cross-dc, jwt-auth, opentelemetry -- and "cloud" invited confusion with SolrCloud and with the cloud slice of the core tests. --- .../{tests-modules-cloud.yml => tests-modules-ops.yml} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{tests-modules-cloud.yml => tests-modules-ops.yml} (85%) diff --git a/.github/workflows/tests-modules-cloud.yml b/.github/workflows/tests-modules-ops.yml similarity index 85% rename from .github/workflows/tests-modules-cloud.yml rename to .github/workflows/tests-modules-ops.yml index 6f367048d7ab..b2ab91652991 100644 --- a/.github/workflows/tests-modules-cloud.yml +++ b/.github/workflows/tests-modules-ops.yml @@ -1,11 +1,11 @@ -name: Cloud Modules Tests +name: Ops Modules Tests on: pull_request: branches: - '*' paths: - - '.github/workflows/tests-modules-cloud.yml' + - '.github/workflows/tests-modules-ops.yml' - 'gradle/libs.versions.toml' - 'solr/cross-dc-manager/**' - 'solr/modules/cross-dc/**' @@ -20,7 +20,7 @@ concurrency: jobs: test: - name: Run Cloud Modules Tests + name: Run Ops Modules Tests runs-on: ubuntu-latest timeout-minutes: 20 @@ -31,7 +31,7 @@ jobs: - uses: ./.github/actions/prepare-for-build - - name: Test the cloud and infrastructure modules + - name: Test the ops and infrastructure modules run: > ./gradlew :solr:cross-dc-manager:test @@ -45,7 +45,7 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: test-output-modules-cloud + name: test-output-modules-ops path: | solr/cross-dc-manager/build/test-results/** solr/modules/*/build/test-results/** From 912a7b4092f9836d178e96b94c12e05295e6386e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 11:35:19 +0100 Subject: [PATCH 10/11] Give the SolrJ tests three test JVMs These modules are mostly unit tests that do not each start a cluster, so they take a third JVM on the runner better than the core slices do. --- .github/workflows/tests-solrj.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-solrj.yml b/.github/workflows/tests-solrj.yml index 6ad6459f7bd9..72a5a98fec49 100644 --- a/.github/workflows/tests-solrj.yml +++ b/.github/workflows/tests-solrj.yml @@ -30,7 +30,7 @@ jobs: - uses: ./.github/actions/prepare-for-build - name: Test the SolrJ modules and the API module - run: ./gradlew :solr:api:test :solr:solrj:test :solr:solrj-jetty:test :solr:solrj-streaming:test + run: ./gradlew :solr:api:test :solr:solrj:test :solr:solrj-jetty:test :solr:solrj-streaming:test -Ptests.jvms=3 - name: Archive test output if: ${{ failure() }} From 0e44e98d0e3f7e7208cb4c748ef349ea065afc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 17 Nov 2026 11:35:19 +0100 Subject: [PATCH 11/11] Tidy two workflow headers Drop the percentage from the core workflow's header, since it only has to say that solr/core dominates the suite, and put the extraction workflow's name above its comment so every workflow file opens with its name. --- .github/workflows/tests-core.yml | 2 +- .github/workflows/tests-extraction.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-core.yml b/.github/workflows/tests-core.yml index 84688467a951..8f4007bcb162 100644 --- a/.github/workflows/tests-core.yml +++ b/.github/workflows/tests-core.yml @@ -1,6 +1,6 @@ name: Solr Core Tests -# solr/core is 78% of the whole test suite, so it is split into four slices by +# solr/core is most of the whole test suite, so it is split into four slices by # Java package that run in parallel. The slices are balanced from measured CI # timings: the cloud package alone is the largest unit in solr/core and sets # the critical path, so its api and overseer sub-packages run in the search diff --git a/.github/workflows/tests-extraction.yml b/.github/workflows/tests-extraction.yml index a34e5e75a42c..98ceca47c959 100644 --- a/.github/workflows/tests-extraction.yml +++ b/.github/workflows/tests-extraction.yml @@ -1,6 +1,7 @@ +name: Extraction Module Tests + # The extraction module tests need Docker for the TikaServer tests of SolrCell, # so they get a workflow of their own. -name: Extraction Module Tests on: pull_request: