-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix snappy/framed-snappy encoding/decoding #12911
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
Conversation
|
Hey @skandragon, I took the liberty of continuing your PR just because we're blocked in developing the prometheusremotewritereceiver. I hope that's okay! |
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (70.58%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #12911 +/- ##
==========================================
- Coverage 91.70% 91.64% -0.06%
==========================================
Files 503 503
Lines 27568 27634 +66
==========================================
+ Hits 25280 25326 +46
- Misses 1808 1822 +14
- Partials 480 486 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| If the feature-gate "confighttp.framedSnappy" is enabled, you'll see new behavior for both client and server: | ||
| - Client compression type "snappy" will now compress to the "block" variant of snappy | ||
| instead of "framed". Client compression type "x-snappy-framed" will now compress to the "framed" variant of snappy. | ||
| - Servers will accept both "snappy" and "x-snappy-framed" as valid content-encodings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not clear about when gate is disabled (default).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first paragraph of the Subtext explains what happens when the gate is disabled. Could you suggest a better version of those paragraphs?
bogdandrutu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, would like @jade-guiton-dd to review as well.
jade-guiton-dd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few nitpicks and questions.
After reviewing the docs for both formats, the protocol-detection and compression logic looks sound to me.
0a145dc to
afb1474
Compare
Not only is it OK, it is amazing :) Thank you. |
|
Urgh, I'm struggling a bit with the tests now... It looks like there's some flakyness that I can't understand why it's happening. |
|
I also get that error when running |
@ArthurSens, this command already save my life for this type of flaky tests. Maybe could be helpful. You can pass to it just the files that you want to validate..
|
|
I did a bit of debugging: the crash in the tests occurs because of the "caching" of I don't think the state of feature gates should change during a normal run of the Collector, so I think this is a test-only issue. A dirty solution could be to manually set |
|
Thanks for digging this up ❤️. I'll find some time to work on this later today |
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
It sounds like a good idea, but that would require changing the |
Signed-off-by: Arthur Silva Sens <[email protected]>
Co-authored-by: Jonathan <[email protected]>
c85ebbe
Description
This is an alternative PR to #12825.
I'm taking all the commits from that PR and adding the feature gate on the client side, as requested by reviews. The server behavior of peeking into the initial bytes to identify the encoding is kept :)
If you've reviewed the previous PR, you can just review the latest commit!
Link to tracking issue
Fixes #10584