New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixing erroneous direct construction of Netty3Listener without params in finagle-thrift #412
fixing erroneous direct construction of Netty3Listener without params in finagle-thrift #412
Conversation
Have you tested this to make sure it solves the problem? |
I will be today. Just have to figure out how to build Finagle first. :) |
Yes. Hallelujah. I can confirm that this fix allows me to use the new Finagle 6 APIs to a) do Thrift RPC over TLS and Examples of these miracles are here: https://github.com/DecipherNow/finagle-tls/tree/new-api |
👍 shipit |
Makes sense. Can you add a simple unit test, e.g. by setting the Stats param and checking for stats? |
Sure, though it's crunch-time on another project so it'll have to wait until Monday. |
I verified this with https://groups.google.com/forum/#!topic/finaglers/g_4i1xpfAJo .. Would adding a thrift/TLS test case be overkill? |
Nah, seems reasonable. Do you want to make a PR against Daniel's branch? The one caveat is that because we're going to squash this into one commit, only he would get the authorship credit for the change. |
It would be definitely useful as a reference and as a test for this, thanks! @mosesn we can pull the test separately I think. |
👍 |
Problem PR #412 fixed the netty-pipeline for Thrift but didn't add a test. Solution Added end-to-end test-case for Thrift/TLS for stack based client and server. Result Green ;) Signed-off-by: Kevin Oliver <koliver@twitter.com> RB_ID=743938
Problem Thrift Servers construct a Netty3Listener using just the pipeline and a hardcoded name, ignoring the params. Solution Use the newer constructor that takes a pipeline and params. Signed-off-by: Neuman Vong <nvong@twitter.com> Github: Closes twitter#412 RB_ID=739586
Problem PR twitter#412 fixed the netty-pipeline for Thrift but didn't add a test. Solution Added end-to-end test-case for Thrift/TLS for stack based client and server. Result Green ;) Signed-off-by: Kevin Oliver <koliver@twitter.com> RB_ID=743938
Greetings Finagle masters,
TL;DR In finagle-thrift (and none of the other protocol libraries),
Netty3Listener
was being constructed directly, without passing in theparams
.I was originally trying to test the official solution to #175 and was able to get TLS over Thrift and extraction of the client certificate working using the old builder API, but not with the new Finagle 6 API. Eventually I discovered that
apply
on theNetty3Listener
object was never being called, which led to this adjustment.@mosesn and I discussed the removal of the hard-coded "thrift" label, and since it's only used as a backup scope for the stats receiver if the
ServerRegistry
doesn't have one for the listening address, and because it's manually configurable by the user, it seemed safe to remove it. I think it was probably only put there anyway because direct use of the constructor requires it.Thanks to @mosesn @jeremyrsmith for helping me run this to ground.