-
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
Optimize Accepts header validation in the common case #15585
Conversation
The common case of having multiple Accepts headers validate against a single @produces media type shows up often (as both browsers and benchmarks send 5 values in the Accepts header)
In my simple hello world style tests with
as the value of the |
@gsmet you might want to know about this:
|
Nice:
hopefully, it won't happen very often :) |
🤞🏼 |
BTW, I'm unhappy with the error management of this thing. It should report the build error of the native image process not the fact that the file does not exist. I wonder if it's a regression because I have a vague recollection it used to report the build error. @zakkak @jonathan-meier could this behavior be related to your recent changes? |
@gsmet I looked into it and it is unlikely to be a regression from our recent changes, but rather a pre-existing issue, though only on Windows (I guess that's why no one noticed until now). On Linux we should correctly report the build error. The exception is thrown on line 185 (and then caught and rethrown on lines 208-209): quarkus/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java Lines 179 to 215 in 2405149
This means we successfully passed the exit code check on line 180, meaning we received exit code 0 even though clearly native-compilation returned a non-zero exit code (1 in this particular case).
It turns out that since For reference, this is the content of
replacing |
FYI: This is fixed by oracle/graal@5cbc36f in GraalVM master. |
Perfect, thanks guys! |
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.
Makes perfect sense. We have tests covering that?
Yes, the TCK covers this stuff |
The common case of having multiple Accepts headers validate
against a single @produces media type shows up often
(as both browsers and benchmarks send 5 values in the Accepts
header)