hibernate-search
hibernate-search copied to clipboard
HSEARCH-5155 Build with JDK 21
https://hibernate.atlassian.net/browse/HSEARCH-5155
Looks nice 😃 thanks! Version in GH actions should probably be updated too 🙈
Version in GH actions should probably be updated too 🙈
Right, sorry. Done.
So... turns out this won't work because impsort maven plugin needs a release... see https://github.com/revelc/impsort-maven-plugin/pull/83. Moving to draft.
Draft again... https://github.com/revelc/formatter-maven-plugin/issues/881
Thanks for your pull request!
This pull request appears to follow the contribution rules.
› This message was automatically generated.
I added an upgrade to formatter-maven-plugin 2.24.0, which supposedly solves the Java 21 compatibility problem... but then it has other problems, so we'll probably have to wait for 2.24.1 or 2.25.0 :(
I added an upgrade to formatter-maven-plugin 2.24.0, which supposedly solves the Java 21 compatibility problem... but then it has other problems, so we'll probably have to wait for 2.24.1 or 2.25.0 :(
Alright, 2.24.1 is out, I updated the PR... and...
[ERROR] Failed to execute goal net.revelc.code:impsort-maven-plugin:1.10.0:sort (import-sorting) on project hibernate-search-parent-integrationtest: Execution import-sorting of goal net.revelc.code:impsort-maven-plugin:1.10.0:sort failed: No enum constant com.github.javaparser.ParserConfiguration.LanguageLevel.JAVA_21 -> [Help 1]
:facepalm:
https://github.com/revelc/impsort-maven-plugin/issues/101#issuecomment-2140991247
:cry:
Added an upgrade to a version of impsort that supports JDK 21, and rebased.
:crossed_fingers:
😖 😕 there seems to be some precision loss with JDK 21 switch... RangeAggregationSpecificsIT fails in this PR (but only on OpenSearch) as the upper bound on JDK 17 1.58451456E9 and on JDK 21 1.5845146E9 (56 gets rounded to just 6)
This is very odd... If this is related to the jdk, I'd expect this to affect Elasticsearch as well... ? Or maybe there's some opensearch-specific testing or JSON handling at play?
Did you pinpoint where the precision loss occurs exactly? Compilation of a constant, or Jason parsing/formatting, or... ?
yeah ... looking into this right now 🙈 that info I posted yesterday was by looking at the generated query string. I'll post here once I find something.
https://bugs.openjdk.org/browse/JDK-8202555 https://bugs.openjdk.org/browse/JDK-8291475
^ looks like that's the reason 😕 I've tested with JDK 17 (ok) 18 (ok) 19 (not ok) and 21 (not ok) 😄
This "loss" happens inside of the JsonPrimitive when the query is sent.
OpenSearch has a JDK 21 bundled while Elasticsearch has JDK 22. I've tried starting OpenSearch with JDK 22 just to see if that would make a difference, but no.
I also tried running this test on OpenSearch 2.15 - 2.1 and got the same result on all.
I guess let's just update the test value and move on? ( 1584514514.000000184f -> 1584514414.000000184f )
I guess let's just update the test value and move on? (
1584514514.000000184f->1584514414.000000184f)
+1 if it's a jdk bug, and it's already been reported, not much we can do.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
The build passed! thanks 😃!