-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add support for Java 17 #186
Conversation
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
…ava-11 and java-17 Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
…te on `x86_64` Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
@@ -18,7 +18,6 @@ jobs: | |||
packages: | |||
- maven | |||
jdk: | |||
- openjdk8 | |||
- openjdk11 |
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 guess you should add Java 17 here?
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.
Yeah, makes sense.
.travis/build.sh
Outdated
if [ ${JAVA_MAJOR_VERSION} -eq 1 ] ; then | ||
# some parts of the workflow should be done only once on the main build which is currently Java 8 | ||
if [ "$arch" == 'x86_64' ] || [ "$arch" == 'arm64' ] ; then | ||
# some parts of the workflow should be done only once on the main build which is currently Java 11 |
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.
Should you check the Java version here?
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.
If we have multiple java versions enabled as you suggested above then yes.
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.
Actually, the question is do we want to run as many of the tests on as many of the platforms as possible.
I'm not sure but IIRC the Arquillian Cube based testsuite only worked on Java 8, that has been fixed by moving to TestContainers.
Another thing I remember is that the testsuite run would take so long or produce so much output that it triggered some limits and was killed by Travis.
I guess we can try again running the full testsuite on both Java 11 and Java 17, and if that will hit limits then I suggest we limit the testsuite to Java 11, that's due to the next paragraph ...
We have to decide which class version libraries we want to push to maven upon release.
I would still prefer Java 8 as that makes the jars most widely usable, but we decided to move on from there. Therefore I suggest Java 11 for the same reason.
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 don't think anyone is prescribing what Java versions should Oauth support. We need Java 11 as a minimum. But if you want to support Java 8, then fine. But Java 8 is super old, Kafka will stop supporting it soon etc. So I think it is time to cut it. But even if you want to release with Java 8 as a target version, we need to have testing with Java 11 and Java 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.
Ok, I added openjdk8
back to the Travis build, and reworked logic so that testsuite is run for all java versions on all platforms. Only Java 8 build on x86_64
will be published if it's a release build.
…ease 1.8 class version artifacts Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
…oo long Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
…e on s390x Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
…rimzi kafka images for this platform on quay.io Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
.travis/build.sh
Outdated
@@ -18,70 +18,58 @@ exitIfError() { | |||
[ "$EXIT" != "0" ] && exit $EXIT | |||
} | |||
|
|||
arch=$(uname -m) | |||
echo "arch: $arch" |
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.
If you want to keep this, maybe it can be a bit nicer? Architecture:
?
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.
Yes, let's have the printout to be sure that the actual architecture label is not something different then I'm expecting.
I can make it a bit nicer :)
pom.xml
Outdated
<profile> | ||
<id>java-8</id> | ||
<activation> | ||
<jdk>1.8</jdk> | ||
</activation> | ||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>java-11</id> | ||
<activation> | ||
<jdk>[11,17)</jdk> | ||
</activation> | ||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
<maven.compiler.release>11</maven.compiler.release> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>java-17</id> | ||
<activation> | ||
<jdk>[17,</jdk> | ||
</activation> | ||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>17</maven.compiler.target> | ||
<maven.compiler.release>17</maven.compiler.release> | ||
</properties> | ||
</profile> |
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.
Both here and in the other pom.xml ... Do we really need the profiles here? The main point of these Java 11 and Java 17 builds is to ensure that it works in the environments using Java 11 and Java 17. So I do not think we need to change the source / target versions as we want it to be as close as possible to the code you will actually release.
I do not think we did anything like this on the other Strimzi projects either.
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 found that maven.compiler.release
option was necessary to build with Java 11 or 17. Without it I was getting an error like: system modules path not set in conjunction with -source
However, Java-8 build would not build if this option was present.
It could be the specifics of my local environment, but I just did whatever was necessary to get things to work.
The other thing there is the compiler source 11 in java-17 profile. This one I kind of forgot in there.
I'll set it to 17 so it's in sync with the others.
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 sure what maven.compiler.release
does TBH. But maybe we can at least keep the source and target?
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 mean ideally, we would want to have a single build and then test the binaries it produces with the different JDKs. But that would be quite complicated. But I think it would be great to get at least close to 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.
In that case I would most prefer1.8
. We could remove java-8
profile, and remove source and target overrides from java-11
and java-17
profiles, but they would still need the release set to 8
.
Would that be better?
…x from testsuite build - hostname aliases not working Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
…vity on s390x Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
…jdks Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
I modified the profiles and versions in |
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.
Left two nits / questions. But if you think it is needed as it s, then its fine with me.
testsuite/pom.xml
Outdated
<profile> | ||
<id>java-8</id> | ||
<activation> | ||
<jdk>1.8</jdk> | ||
</activation> | ||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>java-11</id> | ||
<activation> | ||
<jdk>[11,17)</jdk> | ||
</activation> | ||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
<maven.compiler.release>11</maven.compiler.release> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>java-17</id> | ||
<activation> | ||
<jdk>[17,</jdk> | ||
</activation> | ||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>17</maven.compiler.target> | ||
<maven.compiler.release>17</maven.compiler.release> | ||
</properties> | ||
</profile> |
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.
Should this use the same profile as the main pom.xml
? Or is there some reason to have it different?
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.
Ugh, missed that. Good catch.
Signed-off-by: Marko Strukelj <marko.strukelj@gmail.com>
.travis/build.sh
script to use Java 11 and run testsuite on x86_64