Repository navigation
refactor(runtime): extract plain resolver into PlainResolverHandler - #5319
tombentley merged 1 commit into
Conversation
Move the anonymous "plainResolver" handler out of KafkaProxyInitializer.initPlainChannel into a package-private PlainResolverHandler. The binding resolver, a callback that initialises the connection and the client-to-proxy error counter are passed to its constructor. Behaviour is unchanged, except that the warning logged when binding resolution fails now uses the PlainResolverHandler logger. Cover the handler's state machine directly in PlainResolverHandlerTest using EmbeddedChannel. Replace the ArgumentCaptor based tests in KafkaProxyInitializerTest with a smoke test that checks the handler is installed in the pipeline of a plain channel. The TLS/SNI resolver is not extracted here. Closes kroxylicious#5317 Assisted-by: Claude Fable 5.2 <[email protected]> Signed-off-by: Naitik Singh <[email protected]>
There was a problem hiding this comment.
LGTM. Thank you @ig-suyas. Appears to be a faithful extract class, which is what the issue requested.
Since I raised the original issue, I'd like another committer to review too.
The TLS/SNI resolver is not extracted here. I can do that in a follow-up PR if you'd like.
My gut feel is that this would be an improvement. Try it and see what you think. If it looks good, we'd be happy to see a follow up PR.
|
Thanks for the review, @k-wall ! I'll take a look at the TLS resolver extraction and open a follow-up PR. |
|
|
|
Hi @k-wall , just a quick update: I'm working on the TlsResolverHandler extraction now. I'll open it as a separate follow-up PR and tag you for review. Should I wait for this PR to merge first, or is it fine to open it on top of this branch? |
|
something has gone a bit wrong with the CI, I've tried kicking off a re-run of the PR integration tests, hopefully that unblocks things. Else would be cleanest to update the branch to incorporate the latest |
|
Thanks @robobario for re-running the tests. I can still see the same checks failing. Has the re-run finished, or should I update the branch with the latest main to start a fresh run? I’m happy to do either. |
CI Failure AnalysisFailed Test: Failure Details: Related Issues:
Analysis: |
a0a6344



Closes #5317
Moves the anonymous
plainResolverhandler out ofKafkaProxyInitializer.initPlainChannelinto a package-privatePlainResolverHandler. The binding resolver, aninitConnectioncallback and the client-to-proxy error counter are passed to its constructor.Behaviour is unchanged, except that the warning logged when binding resolution fails now uses the
PlainResolverHandlerlogger.Tests:
PlainResolverHandlerTestcovers the state machine directly withEmbeddedChannel. TheArgumentCaptor-based tests inKafkaProxyInitializerTestare replaced with a smoke test that checks the handler is installed in the pipeline.The TLS/SNI resolver is not extracted here. I can do that in a follow-up PR if you'd like.
I ran the affected unit tests, the license check and the formatter locally. I couldn't run the full suite locally because of a Windows loopback networking problem (Netty "Invalid argument: connect"), so I'm relying on CI for that.
AI disclosure: AI tools assisted with this change (Claude Fable 5.2). The commit includes the
Assisted-by:trailer, and I reviewed the code myself.