Skip to content

Commit a75f28f

Browse files
adityamparikhclaude
andcommitted
feat(ci): add Solr 9.10 and 10 compatibility testing
Add Solr 9.10 and 10 to the CI compatibility matrix, running integration tests against all supported versions (8.11, 9.4, 9.9, 9.10, 10) on every PR and push to main. Also update AGENTS.md to document Solr 10 compatibility status: the /admin/mbeans endpoint removal is handled gracefully, and all other functionality is verified working with solr:10-slim. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
1 parent 9224e8e commit a75f28f

2 files changed

Lines changed: 47 additions & 8 deletions

File tree

.github/workflows/build-and-publish.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,40 @@ jobs:
175175
retention-days: 7
176176

177177
# ============================================================================
178-
# Job 2: Publish Docker Images
178+
# Job 2: Solr Version Compatibility Tests
179+
# ============================================================================
180+
# Tests the server against multiple Solr versions using Testcontainers.
181+
# Runs in parallel so each Solr version is an independent job.
182+
# Tested versions: 8.11, 9.4, 9.9, 9.10, 10
183+
# ============================================================================
184+
solr-compatibility:
185+
name: Solr ${{ matrix.solr-version }} Compatibility
186+
runs-on: ubuntu-latest
187+
188+
strategy:
189+
fail-fast: false
190+
matrix:
191+
solr-version:
192+
- "8.11-slim"
193+
- "9.4-slim"
194+
- "9.9-slim"
195+
- "9.10-slim"
196+
- "10-slim"
197+
198+
steps:
199+
- name: Checkout code
200+
uses: actions/checkout@v4
201+
202+
- name: Set up Java
203+
uses: ./.github/actions/setup-java
204+
205+
- name: Run tests against Solr ${{ matrix.solr-version }}
206+
env:
207+
SOLR_VERSION: ${{ matrix.solr-version }}
208+
run: ./gradlew test "-Dsolr.test.image=solr:${SOLR_VERSION}"
209+
210+
# ============================================================================
211+
# Job 3: Publish Docker Images
179212
# ============================================================================
180213
# This job builds multi-platform Docker images using Jib and publishes them
181214
# to GitHub Container Registry (GHCR) and Docker Hub.

AGENTS.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,24 @@ The Solr Docker image used in tests is configurable via the `solr.test.image` sy
8181
./gradlew test -Dsolr.test.image=solr:8.11-slim # Solr 8.11
8282
./gradlew test -Dsolr.test.image=solr:9.4-slim # Solr 9.4
8383
./gradlew test -Dsolr.test.image=solr:9.9-slim # Solr 9.9 (default)
84+
./gradlew test -Dsolr.test.image=solr:9.10-slim # Solr 9.10
85+
./gradlew test -Dsolr.test.image=solr:10-slim # Solr 10
8486
```
8587

86-
**Tested compatible versions:** 8.11, 9.4, 9.9
88+
**Tested compatible versions:** 8.11, 9.4, 9.9, 9.10, 10
8789

88-
### Solr 10 Compatibility Notes
90+
### Solr 10 Compatibility
8991

90-
Solr 10 introduces breaking changes that will require updates to this project:
92+
Solr 10.0.0 is fully supported with the JSON wire format. The `/admin/mbeans` endpoint was
93+
removed in Solr 10; `getCacheMetrics()` and `getHandlerMetrics()` now catch `RuntimeException`
94+
(which covers `RemoteSolrException`) so they degrade gracefully and return `null`. Tests that
95+
check `cacheStats` and `handlerStats` already handle `null` values.
9196

92-
- **MBeans removal:** `SolrInfoMBeanHandler` is removed. `CollectionService.getCollectionStats()` uses `/admin/mbeans` for cache and handler metrics — this will need to migrate to the `/admin/metrics` endpoint or OpenTelemetry.
93-
- **Metrics migration:** Dropwizard metrics replaced by OpenTelemetry. All metric names switch to snake_case. JMX, Prometheus exporter, SLF4J, and Graphite reporters are removed.
94-
- **SolrJ base URL:** SolrClient now only accepts root URLs (e.g., `http://host:8983/solr`). This project already uses root URLs with per-request collection names, so **no change needed** here.
95-
- **SolrJ dependency:** Upgrade `solr-solrj` from 9.x to 10.x in `gradle/libs.versions.toml`. The Jetty BOM alignment (`jetty = "10.0.22"`) will also need updating since Solr 10 uses Jetty 12.x.
97+
Remaining known differences from Solr 9:
98+
- **`/admin/mbeans` removed:** Cache and handler stats from `getCollectionStats()` will always be `null` on Solr 10. A future migration to `/admin/metrics` will restore these metrics.
99+
- **Metrics migration:** Dropwizard metrics replaced by OpenTelemetry. Metric names switch to snake_case in Solr 10.
100+
- **SolrJ base URL:** Already uses root URLs — **no change needed**.
101+
- **SolrJ 10.x dependency:** Not yet on Maven Central (as of 2026-03-06); tests use SolrJ 9.x against a Solr 10 server. Update `solr-solrj` and Jetty BOM when 10.x is released.
96102

97103
## Key Configuration
98104

0 commit comments

Comments
 (0)