-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Enable Brotli decompression #44348
Enable Brotli decompression #44348
Conversation
Note: Zstd and Snappy remain unsupported. Fixes quarkusio#43392
This comment has been minimized.
This comment has been minimized.
Are we waiting for something for this one or should it go in? |
@geoand I'll add a test case, hopefully today. Could be a separate PR, could be this one... |
Thanks for the update. I'll ket @zakkak comment on his preference |
Given that adding a test is in @Karm's immediate plans I prefer waiting for it so that we can backport the PR as a whole (including tests) in one go. |
@zakkak @cescoffier I added a Decompressor tests in commit 1aa2223 It works fine with HotSpot, client sends compressed PUT and POST to various endpoints and Server decompresses and either sends back or compresses again and sends back, client decompresses and checks. All fine. Native testing fails
Native test flow fails for a peculiar reason:
I originally thought that for some reason the test code itself is baked in the executable, but it is not the case. So far it escapes me what happens that when running the integration test native, the test code, i.e. what is typed in the Junit, cannot find the Brotli4j .so :-( |
For the record, doing this doesn't help the native integration test:
and neither does this:
|
I'll revisit it later... |
This comment has been minimized.
This comment has been minimized.
The CI test result is apparently misleading again 😔 I haven't fixed the Native test yet. It passed for me locally only with HotSpot. |
@zakkak @cescoffier --- a/integration-tests/vertx-http-compressors/app/src/test/java/io/quarkus/compressors/it/Testflow.java
+++ b/integration-tests/vertx-http-compressors/app/src/test/java/io/quarkus/compressors/it/Testflow.java
@@ -149,6 +149,7 @@ public static Buffer compress(String algorithm, String payload) {
}
return Buffer.buffer(byteStream.toByteArray());
} else if ("br".equalsIgnoreCase(algorithm)) {
+ System.load("/tmp/brotli/lib/linux-x86_64/libbrotli.so");
try (BrotliOutputStream brotliStream = new BrotliOutputStream(byteStream)) {
brotliStream.write(payload.getBytes(StandardCharsets.UTF_8));
} catch (IOException e) { Do you think it's some kind of classloading issue that manifests only when running with |
I have a fix, gonna push later. |
@zakkak @cescoffier ❌ Why the CI was all green here? See https://karms.biz/pastebin/errors-labeled-as-flakes.txt I'll open a separate issue for it. |
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 added tests and it's all good now. Thanks.
extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/NettySubstitutions.java
Show resolved
Hide resolved
Status for workflow
|
Thank you @Karm !!! |
I tried adding a test that gets an encrypted text and sends it encrypted to the server for decryption as in #43392 with no success (I couldn't get the test properly set up, not that it decompression fails). Manually running the reproducer from #43392 confirms the fix, but we should have a test in Quarkus IT. @Karm do you think you can help with this given your prior experience?
Note/Thoughts: Zstd and Snappy (cc @gastaldi) remain unsupported. Since we already support snappy in Kafka, and there is quarkus-snappy we should probably support it in vertx as well.
Fixes #43392