-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore(catalog-generator): Lower the required Java version to 17 #1520
Conversation
...s/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CamelCatalogProcessor.java
Show resolved
Hide resolved
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.
usually a good practice to align the version used for the build on CI with the minimal one, for instance here
kaoto/.github/workflows/deploy-main.yml
Line 38 in 3907213
java-version: "21" |
packages/catalog-generator/pom.xml
Outdated
<configuration> | ||
<rules> | ||
<requireJavaVersion> | ||
<version>[17.0.0,17.0.999],[21.0.0,21.0.999]</version> |
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 will prevent users with Java 22+ to build. or even 21.1
I do no tthink that it is what we want
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.
By reading version range rule defintion https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html, it seems like we are forbiding Java 17.1, 18, 19, 20 too
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 we should go with only 17
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.
Mmm, didn't like it
[ERROR] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message:
[ERROR] Detected JDK version 17.0.12 (JAVA_HOME=/home/rmartinez/.sdkman/candidates/java/17.0.12-tem) is not in the allowed range [17,17].
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 it should be [1.0,)
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.
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.
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.
😕
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 the problem was [17]
getting extrapolated to [17,17]
. I missed the 17
alone.
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.
That was it, using 17
alone works with both 17
and 21
Shouldn't it be updated in the other Maven modules projects? kaoto/packages/camel-catalog/pom.xml Line 47 in 3907213
to avoid having a mix of minimal version of JDK |
readme to update too Line 13 in 3907213
|
We don't use |
b225bc7
to
5b82976
Compare
packages/catalog-generator/pom.xml
Outdated
<configuration> | ||
<rules> | ||
<requireJavaVersion> | ||
<version>[17]</version> |
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.
not [17]
but 17
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.
5b82976
to
8bd3058
Compare
Currently, the `catalog-generator` requires Java 21. While that enable modern syntax, not all users have it installed in their machines, so in order to lower the contribution requirements, we're lowering the required version to be Java 17. By default, in RHEL 9.0, Java 17 is preinstalled. Here is an extract of the available Java version per RHEL version | RHEL Version | Java version | Release date | | --- | --- | --- | | RHEL 7 | Java 8 | June 10, 2014 | | RHEL 8 | Java 11 | May 7, 2019 | | RHEL 9 | Java 17 | May 17, 2022 | fix: KaotoIO#1476
8bd3058
to
015a433
Compare
Quality Gate passedIssues Measures |
@@ -59,7 +59,7 @@ void testGeneratorCalledWithCorrectParameters() { | |||
})) { | |||
generateCommand.run(); | |||
|
|||
CatalogGeneratorBuilder builder = mockedBuilder.constructed().getFirst(); | |||
CatalogGeneratorBuilder builder = mockedBuilder.constructed().get(0); |
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.
😢
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1520 +/- ##
=======================================
Coverage ? 69.90%
Complexity ? 62
=======================================
Files ? 276
Lines ? 7733
Branches ? 1503
=======================================
Hits ? 5406
Misses ? 2277
Partials ? 50 ☔ View full report in Codecov by Sentry. |
I guess this part was forgotten. |
Context
Currently, the
catalog-generator
requires Java 21.While that enables modern syntax, not all users have it installed in their machines, so in order to lower the contribution requirements, we're lowering the required version to be Java 17.
By default, in RHEL 9.0, Java 17 is preinstalled.
Here is an extract of the available Java version per RHEL version
fix: #1476