Skip to content
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

Avoid flaky OracleJDK in tests #192

Merged
merged 2 commits into from
Jun 17, 2024
Merged

Conversation

dagguh
Copy link
Contributor

@dagguh dagguh commented Jun 17, 2024

No description provided.

@dagguh dagguh requested a review from a team as a code owner June 17, 2024 09:32
@dagguh dagguh enabled auto-merge (rebase) June 17, 2024 09:32
@dagguh dagguh merged commit e91a93f into master Jun 17, 2024
3 of 4 checks passed
@dagguh dagguh deleted the avoid-flaky-oracle-jdk-in-tests branch June 17, 2024 22:13
@dagguh
Copy link
Contributor Author

dagguh commented Jun 18, 2024

Wut, this got merged with red CI...

@dagguh
Copy link
Contributor Author

dagguh commented Jun 18, 2024

The CI was correctly red.

It showed Wrong JVM version! You are running with .. but JIRA requires at least 1.8 to run..
Just like in teamatldocker/jira#86

The Jira 7.6 docs said it supported AdoptOpenJDK - Java 8 - but it's a straight up lie.
This is from Jira 7 check-java.sh:

"$_RUNJAVA" -version 2>&1 | grep "java version" | (
        IFS=. read ignore1 version ignore2
        if [ ! ${version:-0} -ge "$_EXPECTED_JAVA_VERSION" ]
        then
           echo "*************************************************************************************************************************************"
           echo "**********     Wrong JVM version! You are running with "$ignore1"."$version"."$ignore2" but JIRA requires at least 1.8 to run.      **********"
           echo "*************************************************************************************************************************************"
           exit 1
        fi
    )

The grep "java version" is the culprit.
java -version for Oracle matches:

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

But Adopt does not:

openjdk version "1.8.0_412"
OpenJDK Runtime Environment (build 1.8.0_412-8u412-ga-1~20.04.1-b08)
OpenJDK 64-Bit Server VM (build 25.412-b08, mixed mode)

The fixed check-java.sh came only in Jira 8.

Summing up, Jira 7 works only with Oracle JDK 1.8. If we want to switch away from the flaky Oracle mess, we need to drop Jira 7 support in JPT, a breaking change and a major SemVer. We can do it, FYI @mgrzaslewicz.

@dagguh
Copy link
Contributor Author

dagguh commented Jun 18, 2024

PS. Fixed master protection to look at build job and not build-check (unnecessary and gone in #190).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants