[ISSUE #10799] Tolerate unresolved gRPC peer addresses - #10800
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds resilience in HeaderInterceptor when gRPC provides unresolved InetSocketAddress values, preventing NPEs and preserving host:port formatting, with a regression test to cover this case.
Changes:
- Update socket address parsing to gracefully handle unresolved
InetSocketAddressviagetHostString(). - Add regression test verifying remote/local unresolved peer addresses are written into headers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| proxy/src/main/java/org/apache/rocketmq/proxy/grpc/interceptor/HeaderInterceptor.java | Avoids NPE by using getHostString() when InetSocketAddress#getAddress() is null; keeps host:port output. |
| proxy/src/test/java/org/apache/rocketmq/proxy/grpc/interceptor/HeaderInterceptorTest.java | Adds coverage for unresolved remote/local transport addresses being propagated into metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public MethodDescriptor<String, String> getMethodDescriptor() { | ||
| return null; | ||
| } |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10800 +/- ##
=============================================
- Coverage 48.34% 48.28% -0.06%
+ Complexity 13527 13512 -15
=============================================
Files 1380 1380
Lines 101104 101141 +37
Branches 13107 13122 +15
=============================================
- Hits 48882 48840 -42
- Misses 46267 46308 +41
- Partials 5955 5993 +38 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Fixes #10799
Tests