Open devinsba opened 5 years ago
I'm not sure I have the time to take this over the finish line right now. I ended up using an approach based around RequestHander2
, influenced by this code, in our code base which I plan to open source as soon as I get a free hour but that is questionable unless I can find some time over the weekend
I see anyways flags zero is invalid. we only actually encode when context.debug is true. iotw this test isnt testing something we would emit.
On Fri, Mar 1, 2019, 12:09 AM Brian Devins-Suresh notifications@github.com wrote:
@devinsba commented on this pull request.
In brave-http-common/src/test/java/smartthings/brave/propagation/SimpleB3ContextCarrierEncodingTest.java https://github.com/SmartThingsOSS/smartthings-brave/pull/29#discussion_r261268153 :
@@ -135,7 +137,7 @@ public void injectingFlagsShouldNotUnsetBuilderValues() { SimpleB3ContextCarrier.Setter setter = new SimpleB3ContextCarrier.Setter(); setter.put(carrier, SimpleB3ContextCarrier.TRACE_ID_NAME, HexCodec.toLowerHex(1234)); setter.put(carrier, SimpleB3ContextCarrier.SPAN_ID_NAME, HexCodec.toLowerHex(9012));
- setter.put(carrier, SimpleB3ContextCarrier.FLAGS_NAME, "0000000000000000");
- setter.put(carrier, SimpleB3ContextCarrier.FLAGS_NAME, "0000000000000000"); // TODO 0 is not a valid hex anymore
The brave HexCodec class throws a NumberFormatException if you try to encode hex that ends up equaling 0
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SmartThingsOSS/smartthings-brave/pull/29#discussion_r261268153, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD61__Hn2YNICYAt7GS3HztJcqUp74Aks5vR_9XgaJpZM4bQQ6X .
Really appreciate the attempt to upgrade things. I will take a look through this ASAP and see where I can help out.
Would love to use this library once its all updated.
Any update on this?
@YasinK-IW do you have time to pick this up and address the comments?
I've started the process toward Brave 5, I need to fix a couple more things in the tests. I may need some guidance from @adriancole on the HTTP ones, I'm not entirely sure how to convert those to be more idiomatic so that they pass the tests. I put notes and
@Ignore
on all the tests that didn't pass so that I could work through all the modules. I don't intend for this to be merged before all the@Ignore
's are removed