Skip to content

Fix OkHttpGrpcSender mTLS when using the platform default trust store - #8758

Draft
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:fix/okhttp-grpc-sender-default-trust-manager
Draft

Fix OkHttpGrpcSender mTLS when using the platform default trust store#8758
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:fix/okhttp-grpc-sender-default-trust-manager

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Fixes #8754

Description

Testing done

  • Added OkHttpGrpcSenderTest#constructor_usesDefaultTrustManagerWhenTrustManagerIsNull and #constructor_wrapsDefaultTrustManagerFailure, mirroring the tests Fix OkHttp client mTLS when using the platform default trust store #8565 added to OkHttpHttpSenderTest.
  • ./gradlew :exporters:sender:okhttp:check — 48 tests passed.
  • Reverting the production change makes constructor_wrapsDefaultTrustManagerFailure fail: OkHttp's own trust manager lookup throws NoSuchAlgorithmException instead of the wrapped IllegalStateException. constructor_usesDefaultTrustManagerWhenTrustManagerIsNull still passes, since without the fix the branch is skipped rather than throwing.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.29%. Comparing base (e2efec5) to head (a916b26).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8758   +/-   ##
=========================================
  Coverage     91.29%   91.29%           
  Complexity    10498    10498           
=========================================
  Files          1006     1006           
  Lines         28338    28344    +6     
  Branches       3581     3582    +1     
=========================================
+ Hits          25870    25876    +6     
  Misses         1675     1675           
  Partials        793      793           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-09-02 14:35 UTC

Move out of draft to request review.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

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.

OkHttpGrpcSender ignores the client certificate when no trusted certificates are configured

1 participant