Repository navigation
fix(search): move httpclient5 to 5.6.3 and disable transport-level content compression - #31667
Conversation
…ntent compression Follow-up to #31657, which pinned httpclient5 to 5.5.2 so it stopped being mismatched against the httpcore5 5.4 line. 5.5.2 was the minimal fix but it still sits inside the CVE-2026-64607 range (affects 5.0-alpha1 through 5.6.2: the classic i/o client leaks a connection when a response carries an invalid Content-Encoding, exhausting the pool). 5.6.3 clears that CVE and is a better pairing besides: httpclient5-parent 5.6.3 declares httpcore5 5.4.3, exactly the version pinned here, whereas 5.5.2 targets 5.3.6. Client and core now come from the same line Apache releases together. Moving to the 5.6 line requires one code change. httpclient5 5.6.0 turned on automatic content decompression in the async client pipeline by default, and both search transports already decompress the response body themselves. Leaving both enabled runs the second pass over already-inflated bytes and throws "java.util.zip.ZipException: Not in GZIP format". Disable it at the transport layer in OpenSearchClient and ElasticSearchClient and let the search clients own decompression. The connection-request timeout bound from #31657 is unchanged. Note for future bumps: the shaded uber-jars in openmetadata-shaded-deps bundle org.apache.hc.* unrelocated, so they carry their own copy of httpclient5 and httpcore5 and precede the standalone jars on the classpath. They inherit this dependencyManagement block, so a clean build keeps both copies aligned - but the pin only takes effect once those modules are rebuilt. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
…ion test clients The integration tests build their own OpenSearch/Elasticsearch clients, so they need the same disableContentCompression() call as the production search clients once httpclient5 moves to the 5.6 line. Without it they fail with "java.util.zip.ZipException: Not in GZIP format". Taken from #31525 by yan-3005. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
✅ Playwright Results — workflow succeededValidated commit ✅ 1026 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 57m 53s ⏱️ Max setup 3m 11s · max shard execution 17m 43s · max shard-job elapsed before upload 25m 58s · reporting 6s 🌐 196.02 requests/attempt · 2.21 app boots/UI scenario · 31.33% common-shard skew Optimization targets still in progress:
🟡 1 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedUpgrades httpclient5 to version 5.6.3 to resolve CVE-2026-64607 and explicitly disables transport-level content decompression in the search clients. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
…ntent compression (#31667) * fix(search): move httpclient5 to 5.6.3 and disable transport-level content compression Follow-up to #31657, which pinned httpclient5 to 5.5.2 so it stopped being mismatched against the httpcore5 5.4 line. 5.5.2 was the minimal fix but it still sits inside the CVE-2026-64607 range (affects 5.0-alpha1 through 5.6.2: the classic i/o client leaks a connection when a response carries an invalid Content-Encoding, exhausting the pool). 5.6.3 clears that CVE and is a better pairing besides: httpclient5-parent 5.6.3 declares httpcore5 5.4.3, exactly the version pinned here, whereas 5.5.2 targets 5.3.6. Client and core now come from the same line Apache releases together. Moving to the 5.6 line requires one code change. httpclient5 5.6.0 turned on automatic content decompression in the async client pipeline by default, and both search transports already decompress the response body themselves. Leaving both enabled runs the second pass over already-inflated bytes and throws "java.util.zip.ZipException: Not in GZIP format". Disable it at the transport layer in OpenSearchClient and ElasticSearchClient and let the search clients own decompression. The connection-request timeout bound from #31657 is unchanged. Note for future bumps: the shaded uber-jars in openmetadata-shaded-deps bundle org.apache.hc.* unrelocated, so they carry their own copy of httpclient5 and httpcore5 and precede the standalone jars on the classpath. They inherit this dependencyManagement block, so a clean build keeps both copies aligned - but the pin only takes effect once those modules are rebuilt. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(search): disable transport-level content compression in integration test clients The integration tests build their own OpenSearch/Elasticsearch clients, so they need the same disableContentCompression() call as the production search clients once httpclient5 moves to the 5.6 line. Without it they fail with "java.util.zip.ZipException: Not in GZIP format". Taken from #31525 by yan-3005. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
picked to 2.0 |
|
picked to 1.13 |
…ntent compression (#31667) * fix(search): move httpclient5 to 5.6.3 and disable transport-level content compression Follow-up to #31657, which pinned httpclient5 to 5.5.2 so it stopped being mismatched against the httpcore5 5.4 line. 5.5.2 was the minimal fix but it still sits inside the CVE-2026-64607 range (affects 5.0-alpha1 through 5.6.2: the classic i/o client leaks a connection when a response carries an invalid Content-Encoding, exhausting the pool). 5.6.3 clears that CVE and is a better pairing besides: httpclient5-parent 5.6.3 declares httpcore5 5.4.3, exactly the version pinned here, whereas 5.5.2 targets 5.3.6. Client and core now come from the same line Apache releases together. Moving to the 5.6 line requires one code change. httpclient5 5.6.0 turned on automatic content decompression in the async client pipeline by default, and both search transports already decompress the response body themselves. Leaving both enabled runs the second pass over already-inflated bytes and throws "java.util.zip.ZipException: Not in GZIP format". Disable it at the transport layer in OpenSearchClient and ElasticSearchClient and let the search clients own decompression. The connection-request timeout bound from #31657 is unchanged. Note for future bumps: the shaded uber-jars in openmetadata-shaded-deps bundle org.apache.hc.* unrelocated, so they carry their own copy of httpclient5 and httpcore5 and precede the standalone jars on the classpath. They inherit this dependencyManagement block, so a clean build keeps both copies aligned - but the pin only takes effect once those modules are rebuilt. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(search): disable transport-level content compression in integration test clients The integration tests build their own OpenSearch/Elasticsearch clients, so they need the same disableContentCompression() call as the production search clients once httpclient5 moves to the 5.6 line. Without it they fail with "java.util.zip.ZipException: Not in GZIP format". Taken from #31525 by yan-3005. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Follow-up to #31657. Self-contained, branched off current
main, no conflicts.What this does
1.
httpclient55.5.2 → 5.6.3 (edits the existing pin, does not add a second block)#31657 pinned 5.5.2 to stop httpclient5 being mismatched against the
httpcore55.4 line. That was the minimal fix, but 5.5.2 is still inside the CVE-2026-64607 range — affects 5.0-alpha1 through 5.6.2, where the classic i/o client leaks a connection on an invalidContent-Encodingand eventually exhausts the pool.5.6.3 clears the CVE and is the better pairing anyway:
2.
disableContentCompression()inOpenSearchClientandElasticSearchClientRequired by the move, not optional. httpclient5 5.6.0 turned on automatic content decompression in the async client pipeline by default. Both search transports already decompress the response body themselves, so leaving both enabled runs the second pass over already-inflated bytes:
Disabled at the transport layer; the search clients keep ownership of decompression.
The
connectionRequestTimeoutbound from #31657 is untouched.Verification
mvn -pl openmetadata-service compile→ BUILD SUCCESS.spotless:applyclean.Worth knowing for the next bump
The shaded uber-jars in
openmetadata-shaded-depsbundleorg.apache.hc.*unrelocated, so each carries its own copy of httpclient5/httpcore5 and they precede the standalone jars on the classpath. Before this change they held httpclient5 5.4.4 (elasticsearch-deps) and 5.5 (opensearch-deps).They inherit this
dependencyManagementblock, so a clean build keeps every copy aligned — but the pin only takes effect once those modules are rebuilt, and a stale local uber-jar will shadow the pinned version. Relocatingorg.apache.hc.*in the shade config would remove the ambiguity; left out of scope here.Relationship to #31525
#31525 covers the same pin + gzip fix but branched before #31657 merged, so it adds a duplicate
httpclient5block and its copies of the two client files predateCONNECTION_REQUEST_TIMEOUT— resolving those conflicts risks reverting it. This PR is the rebased equivalent; #31525 can be closed in favour of it (its integration-test changes are worth keeping separately if still needed).Follow-up, not included
2.0and1.13carryhttpcore55.4.3 with nohttpclient5pin, so they have the original mismatch and need this backported.1.13.3has no core pin and is unaffected.🤖 Generated with Claude Code
Greptile Summary
This PR aligns Apache HttpClient 5 with the pinned HttpCore version and prevents duplicate response decompression in the Elasticsearch and OpenSearch transports.
httpclient5from 5.5.2 to 5.6.3.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Search request] --> B[Apache HttpClient 5 transport] B -->|Compressed response retained| C[Elasticsearch or OpenSearch transport] C -->|Single decompression pass| D[JSON response handling]Reviews (2): Last reviewed commit: "test(search): disable transport-level co..." | Re-trigger Greptile