-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Native: Brotli4J compression requires explicit config #40533
Comments
Just a note. This is also happening on baremetal. You can check it with provided reproducer by running
|
Hello @jcarranzan, I have your reproducer working properly in native. Let me polish the how-to and share it with you. This is neither Quarkus nor GraalVM issue per se. It's just that AOT requires some more config work to get it working. |
Here is a working example, tested with Quarkus 3.10.0 on Linux aarch64 (see README.md) and Linux amd64, using Mandrel native-image, Mandrel-23.1.3.1-Final (JDK 21.0.3+9-LTS). See: The example is heavily simplified version of your original reproducer, because the issue has nothing to do with either OpenShift or some other dependencies you had there. You don't need to do anything in the Java code, you just need to mark Brotli4jLoader.java for runtime init and you need to specify resource config so as See |
Is this usage widespread? Would it make sense to develop a small extension similar to what I did here: https://github.com/quarkiverse/quarkus-opencv/ ? |
@gsmet https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Webserver.20compression/near/438350071 I'd say yes. Unless I misunderstood and it's already a part of e.g. Vert.x. |
I would not say 'widespread'. It's starting to be used. Vert.x already has the support (via netty), and due to some ugly substitution business, we have it on the classpath. @Karm Based on your exploration, I would do the same thing I did for RocksDB, Snappy... If a built-time property enables Brotli, we include the appropriate native library into the native executable and mark Broli4Loarder as runtime init. |
Should we re-open this ticket then? |
I don't know. Not a bug... it's a missing feature :) I will work on the seamless integration regardless of this particular issue being open or not. |
I guess the next to be PR should be enough. This ticket provides the workaround (correct instructions). |
@Karm thanks i will monitor for PR's! |
yeah, we also need to know to change our tests, so let's all monitor instead of having a tracker that will notify us |
Describe the bug
I've been doing a Quarkus Http Brotli4J test coverage development and the tests were passing ok in different environments also in Openshift tests were ok. However, it just gave me issues in Openshift with native mode execution.
Context execution found in:
RHEL8 / JDK 17 / Run OpenShift tests in native mode
native image used:
<quarkus.s2i.base-native-image>quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0</quarkus.s2i.base-native-image>
Quarkus platform version:
3.10.0
This is my reproducer:
https://github.com/jcarranzan/quarkus-reproducer/tree/brotli4j-native
This is the maven command execution:
mvn clean verify -Dnative -Popenshift -Dfailsafe.failIfNoSpecifiedTests=false -Dit.test="OpenShiftBrotli4JIT"
Error logs:
Expected behavior
Works properly
Actual behavior
Tests failed because of the error mentioned above in the description.
How to Reproduce?
git clone -b brotli4j-native https://github.com/jcarranzan/quarkus-reproducer.git
mvn clean verify -Dnative -Popenshift -Dfailsafe.failIfNoSpecifiedTests=false -Dit.test="OpenShiftBrotli4JIT"
Output of
uname -a
orver
Linux Fedora 39 x86_64
Output of
java -version
openjdk version "17.0.9" 2023-10-17
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
The issue was found in Openshift but also is produced in baremetal with native mode execution.
No response
The text was updated successfully, but these errors were encountered: