Skip to content

fix(search): move httpclient5 to 5.6.3 and disable transport-level content compression - #31667

Merged
pmbrull merged 2 commits into
mainfrom
pmbrull/fix-hc5-async-pool-wedge
Aug 18, 2026
Merged

pmbrull merged 2 commits into
mainfrom
pmbrull/fix-hc5-async-pool-wedge

Conversation

@pmbrull

@pmbrull pmbrull commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #31657. Self-contained, branched off current main, no conflicts.

What this does

1. httpclient5 5.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 httpcore5 5.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 invalid Content-Encoding and eventually exhausts the pool.

5.6.3 clears the CVE and is the better pairing anyway:

httpclient5 declares httpcore5
5.5 (the original bug) 5.3.4
5.5.2 (currently on main) 5.3.6
5.6.3 5.4.3 ← exactly what's pinned here

2. disableContentCompression() in OpenSearchClient and ElasticSearchClient

Required 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:

java.util.zip.ZipException: Not in GZIP format
  at ... LazyDecompressingInputStream

Disabled at the transport layer; the search clients keep ownership of decompression.

The connectionRequestTimeout bound from #31657 is untouched.

Verification

# openmetadata-service
+- org.apache.httpcomponents.client5:httpclient5:jar:5.6.3:runtime
   +- org.apache.httpcomponents.core5:httpcore5:jar:5.4.3:runtime
   \- org.apache.httpcomponents.core5:httpcore5-h2:jar:5.4.3:runtime

# openmetadata-shaded-deps/{opensearch,elasticsearch}-dep — rebuilt, embedded copies:
elasticsearch-deps   httpclient5=5.6.3  httpcore5=5.4.3
opensearch-deps      httpclient5=5.6.3  httpcore5=5.4.3

mvn -pl openmetadata-service compile → BUILD SUCCESS. spotless:apply clean.

Worth knowing for the next bump

The shaded uber-jars in openmetadata-shaded-deps bundle org.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 dependencyManagement block, 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. Relocating org.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 httpclient5 block and its copies of the two client files predate CONNECTION_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.0 and 1.13 carry httpcore5 5.4.3 with no httpclient5 pin, so they have the original mismatch and need this backported. 1.13.3 has 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.

  • Updates httpclient5 from 5.5.2 to 5.6.3.
  • Disables transport-level content compression in production search clients.
  • Mirrors the compression configuration in integration-test clients.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
pom.xml Updates the managed HttpClient 5 dependency to 5.6.3 while retaining the aligned HttpCore 5.4.3 pin.
openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchClient.java Disables Apache transport decompression so the configured Elasticsearch client transport remains responsible for response compression handling.
openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchClient.java Disables Apache transport decompression on the non-IAM OpenSearch transport path to avoid a second decompression pass.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/bootstrap/TestSuiteBootstrap.java Mirrors the Elasticsearch production compression configuration while preserving credentials setup.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/SearchConsumerFieldBehaviorIT.java Configures the integration-test OpenSearch transport with transport-level decompression disabled.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/VectorEmbeddingIntegrationIT.java Configures the vector integration-test OpenSearch transport consistently with production.

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]
Loading

Reviews (2): Last reviewed commit: "test(search): disable transport-level co..." | Re-trigger Greptile

…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]>
@pmbrull
pmbrull requested a review from a team as a code owner August 18, 2026 05:59
Copilot AI lite review requested due to automatic review settings August 18, 2026 05:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Aug 18, 2026
…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]>
Copilot AI review requested due to automatic review settings August 18, 2026 06:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit f303b4b0c78777e060fcf9c2d15bf69a79233f59 in Playwright run 32105290164, attempt 1.

✅ 1026 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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:

  • Common shard skew was 31.33% (convergence target: at most 15%).
  • Application boot ratio was 2.21 per UI scenario (2312 boots / 1044 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 135 0 0 0 0 0
🟡 Shard chromium-02 144 0 1 0 0 0
✅ Shard chromium-03 136 0 0 0 0 0
✅ Shard chromium-04 140 0 0 0 0 0
✅ Shard chromium-05 139 0 0 0 0 0
✅ Shard chromium-06 145 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 7 0 0 0 0 0
✅ Shard ingestion-01 2 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 1 flaky test(s) (passed on retry)
  • Pages/ExplorePageRightPanel.spec.ts › Should follow Data Consumer role policies for ownerless database (shard chromium-02, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@pmbrull pmbrull added this to Shipping Aug 18, 2026
@pmbrull
pmbrull merged commit 4d626ad into main Aug 18, 2026
116 of 120 checks passed
@pmbrull
pmbrull deleted the pmbrull/fix-hc5-async-pool-wedge branch August 18, 2026 08:41
@github-project-automation github-project-automation Bot moved this to Done ✅ in Shipping Aug 18, 2026
@gitar-bot

gitar-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Upgrades 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.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

pmbrull added a commit that referenced this pull request Aug 18, 2026
…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]>
@pmbrull

pmbrull commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

picked to 2.0

@pmbrull

pmbrull commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

picked to 1.13

pmbrull added a commit that referenced this pull request Aug 18, 2026
…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]>

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

Status: Done ✅

Development

Successfully merging this pull request may close these issues.

3 participants