refactor: compile fess-crawler-opensearch against the forked OpenSearch package - #208
Merged
Merged
Conversation
…ch package fesen-httpclient now ships the OpenSearch DTOs and query builders under org.codelibs.fesen.opensearch, so org.opensearch:opensearch is no longer inherited transitively. Rewrite every org.opensearch reference in the module - 147 imports and 6 fully-qualified inner-class references in FesenClient - to the forked package. The four node-booting tests need no structural change: they drive FesenClient over HTTP via a host:port system property and never touch runner.client(), so the embedded node keeps using the real org.opensearch types from the test-scope opensearch-runner dependency.
marevol
added a commit
that referenced
this pull request
Sep 14, 2026
#209) The package rename in #208 was applied to every `org.opensearch.*` reference without checking that each type survived the fork. `PitSegmentsRequest` did not: fesen-httpclient's `Client` no longer declares `pitSegments`, so the rewritten import resolves to nothing and the method is an `@Override` of nothing. The PR's CI could not have caught this - it was red for the whole of its life because the forked fesen-httpclient was unpublished, so `fess-crawler-opensearch` never actually compiled there. Removed the method and the two imports it needed. Every other `org.codelibs.fesen.opensearch.*` name the module references was checked against the published jar's 2,491 classes; this was the only one missing.
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.
fesen-httpclientnow carries the OpenSearch DTOs and query builders Fess needs underorg.codelibs.fesen.opensearch.*, pruned from 8,578 classes to 3,751, so the 17 MiBorg.opensearch:opensearchjar can leave the Fess distribution.fess-crawler-opensearchfollows.This module is the cheapest of the migration: 20 files, an import rewrite, and no pom change. It already declares
fesen-httpclientat compile scope, so the forked classes arrive directly; the only non-import hunk is the formatter re-wrapping oneFesenClientsignature that grew with the longer package name.fess-crawlerandfess-crawler-lastareference OpenSearch nowhere and are untouched.FesenClientstill implements the client interface with its 64 overrides;OpenSearchAccessResult,OpenSearchAccessResultData,OpenSearchUrlQueueandOpenSearchUrlFilterstill implementToXContent;UrlQueueOrder.buildSortsstill returnsSortBuilder<?>[]. All of those are now the forked types.The tests needed nothing structural
The four classes that start an embedded node —
CrawlerTest,OpenSearchDataServiceTest,OpenSearchUrlFilterServiceTest,OpenSearchUrlQueueServiceTest— never callrunner.client(). They handFesenClientahost:portstring and let it speak HTTP, so the node keeps using the realorg.opensearchtypes internally through the test-scopeopensearch-runnerdependency, and the client under test uses the forked ones. That is the most honest arrangement available: a forked client talking to a genuine OpenSearch server.FesenClientTestmocks the client interfaces with Mockito; only the import prefix changes.opensearch-runnerstays at test scope — it is now the only thing pulling the real server jar, which is correct, and it must stay or the node cannot boot.Verification
mvn clean packageover the whole reactor — 2,125 tests, 0 failures (fess-crawler2,057,fess-crawler-lasta15,fess-crawler-opensearch53). No test was deleted or weakened.Ordering
Requires codelibs/fesen-httpclient#43 (and #42) to be released first.
fess-suggest,fessand five plugin repositories have matching branches and ship together.