Skip to content

chore(deps): stop shipping okhttp for the plugins that use it - #207

Merged
marevol merged 1 commit into
mainfrom
chore/drop-okhttp
Sep 12, 2026
Merged

marevol merged 1 commit into
mainfrom
chore/drop-okhttp

Conversation

@marevol

@marevol marevol commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

No class here imports okhttp3. The declaration existed so that Fess would carry okhttp-jvm in WEB-INF/lib for data store plugins to pick up at run time, and its comment said so. Those plugins now carry it themselves, so 2.93 MiB leaves every Fess distribution: okhttp-jvm (0.92), kotlin-stdlib (1.64), okio-jvm (0.37).

Fess's WEB-INF/lib goes from 220 jars to 217.

The comment was narrower than the truth

It named only fess-ds-microsoft365, which calls okhttp from its own code. fess-ds-box needed it too, and silently: seventeen classes of box-java-sdk call okhttp, and the SDK was getting Fess's 5.x rather than the 4.12.0 it asks for, because WEB-INF/lib precedes WEB-INF/plugin. Nothing in either pom recorded that.

Both plugins now declare okhttp-jvm at the version fess-parent pins and shade it in, so they agree on one version and neither depends on what the war happens to hold:

Nothing else was using it

Checked across every plugin repository in the workspace:

fess-ds-microsoft365, fess-ds-box genuinely need it — now bundle it
fess-llm-gemini, -ollama, -openai MockWebServer at test scope only; main sources never touch okhttp3
fess-webapp-multimodal, fess-crawler-playwright inherited it from here at compile scope without using it
Fess itself src/test only

Ordering

Both plugin PRs have to be released before this merges. An installation that upgrades the war first would lose okhttp under a plugin still built the old way.

Verification

Full suite: 2,057 tests, one failure — test_doHead_accessTimeoutTarget, which asserts that a one-second timeout interrupts a two-second sleep. It fails on a different client each run and is not related to this change:

run branch failure
1 this branch Hc4HttpClientTest.test_doHead_accessTimeoutTarget
2 this branch FtpClientTest.test_doHead_accessTimeoutTarget
3 unmodified main Hc5HttpClientTest.test_doHead_accessTimeoutTarget plus an error in SmbClientTest.test_resolveSidsDisabled

Run on its own, Hc4HttpClientTest passes 3 times out of 3 on this branch. This module has no okhttp reference at all — no import, no MockWebServer, no test dependency — so there is no path from this change to those tests.

On the Fess side, with this build installed: 7,470 tests, 0 failures, 0 errors, and no NoClassDefFoundError anywhere in the output.

No class here imports okhttp3. The declaration existed so that Fess would carry
okhttp-jvm in WEB-INF/lib for two data store plugins to pick up at run time, and
its comment said so. Those plugins now carry it themselves, so the 2.9 MiB it
brings - okhttp-jvm, okio-jvm and kotlin-stdlib - leaves the distribution.

The comment named only fess-ds-microsoft365, which calls okhttp from its own
code. fess-ds-box needed it too, and silently: seventeen classes of
box-java-sdk call okhttp, and the SDK was getting Fess's 5.x rather than the
4.12.0 it asks for, because WEB-INF/lib precedes WEB-INF/plugin. Both plugins
now declare okhttp-jvm at the version fess-parent pins and shade it in, so they
agree on one version and neither depends on what the war happens to hold.

Nothing else needed it. fess-llm-gemini, -ollama and -openai pull okhttp only
through MockWebServer at test scope; fess-webapp-multimodal and
fess-crawler-playwright were inheriting it from here without using it; Fess
itself only uses it in its own tests.

Both plugin releases have to go out before this, or an installation that
upgrades the war first loses okhttp under a plugin that still expects it.

The full suite passes apart from test_doHead_accessTimeoutTarget, which asserts
that a one-second timeout interrupts a two-second sleep and fails under load on
a different client each run - Hc4 and Ftp here, Hc5 on an unmodified checkout of
main, which also errored in SmbClient. Run alone it passes.
@marevol marevol added this to the 15.9.0 milestone Sep 12, 2026
@marevol marevol self-assigned this Sep 12, 2026
@marevol
marevol merged commit 1a513fa into main Sep 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant