Skip to content

fix: make main compile against the forked OpenSearch package - #3442

Merged
marevol merged 1 commit into
mainfrom
fix/fess-pit-segments
Sep 14, 2026
Merged

marevol merged 1 commit into
mainfrom
fix/fess-pit-segments

Conversation

@marevol

@marevol marevol commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

main does not compile since #3439.

Two things the migration missed

SearchEngineClient.pitSegments overrides nothing. #3439 rewrote every
org.opensearch.* reference to org.codelibs.fesen.opensearch.*. The rename was
applied uniformly, but not every type survived the fork — PitSegmentsRequest did
not, and fesen-httpclient's Client no longer declares pitSegments:

SearchEngineClient.java:[97] cannot find symbol
  symbol:   class PitSegmentsRequest
  location: package org.codelibs.fesen.opensearch.action.admin.indices.segments
SearchEngineClient.java:[3513] method does not override or implement a method from a supertype

The method and its two imports are removed. Every other
org.codelibs.fesen.opensearch.* name in the tree was checked against the 2,491
classes the fork ships; this was the only one missing.

AbstractDocumentSearcherTest was never migrated. It arrived with #3440, after
the migration branch was cut, so its six org.opensearch.* imports stayed as they
were. They are rewritten now. grep -rn 'org\.opensearch\.' src/ returns nothing.

#3439's CI could not have caught either one. It was red for its whole life because
the forked fesen-httpclient was unpublished, so fess never reached javac there.

This needs codelibs/fesen-httpclient#46 published first

That test builds a SearchResponse by hand and calls four members the fork had
pruned — SearchHits.empty(boolean), ShardSearchFailure(Exception), and one
constructor each on InternalSearchResponse and SearchResponse. #46 puts them
back. Until it is published, CI here will fail on those four symbols and nothing
else.

Verification

With #46 installed locally: mvn test-compileBUILD SUCCESS, from a
compilation failure on main.

#3439 left two things behind.

`SearchEngineClient.pitSegments` overrides a `Client` method that the fork does
not have. The package rename was applied to every `org.opensearch.*` reference
without checking that each type survived: `PitSegmentsRequest` did not, so the
import resolves to nothing and the method is an `@Override` of nothing. Removed,
with the two imports it needed.

`AbstractDocumentSearcherTest` arrived from #3440 after the migration branch was
cut, so its six `org.opensearch.*` imports were never rewritten. They are now.

Nothing else in the tree still names `org.opensearch`.
@marevol

marevol commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

The CI failure here is not this change — it is a dependency that had not been
published yet when the run started.

CrawlerEngineClient.java:34: error: cannot access Client
public class CrawlerEngineClient extends FesenClient {
  class file for org.opensearch.transport.client.Client not found

That run started at 14:31. codelibs/fess-crawler#209 merged at 14:34 and its
snapshot was published at 14:39, so the run resolved the fess-crawler from
before the fork migration, whose FesenClient still implements the old Client.

What still has to land first

dependency snapshot published state
fesen-httpclient:3.8.1-SNAPSHOT 14:35 current, includes codelibs/fesen-httpclient#46
fess-crawler-opensearch:15.9.0-SNAPSHOT 14:39 current, includes codelibs/fess-crawler#209
fess-suggest:15.9.0-SNAPSHOT yesterday 19:09 stale — codelibs/fess-suggest#98 is still open

So a re-run now gets past CrawlerEngineClient and then fails in SuggestHelper
instead: the published fess-suggest still exposes org.opensearch.transport.client.Client
in its API, and SuggestHelper passes a SearchEngineClient to it.

codelibs/fess-suggest#98 has to be merged and published before this can go green.
There is nothing further to change in this PR.

Verified locally, with all three dependencies at the right versions

  • mvn test-compile — BUILD SUCCESS (a compilation failure on main).
  • mvn javadoc:jar — BUILD SUCCESS. This is the goal that failed above, so it is
    worth stating separately: the gate passes once the dependency is current.

@marevol
marevol merged commit 944b709 into main Sep 14, 2026
1 of 2 checks passed
@marevol
marevol deleted the fix/fess-pit-segments branch September 16, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant