-
Notifications
You must be signed in to change notification settings - Fork 36
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
[BUG] OpenSearch Devops Failed to validate on github actions with 3.0.0 version #200
Comments
We will unset the JAVA_HOME var in github actions for now in order to fix the issue: |
The earliest failure of this exact issue is here: 2024/06/07 5:23 PST. However, upon manual testing it works fine with jdk11. |
We are waiting for the 3.0.0 to have JDK21 set as default: |
In this action, 3.0.0 always seem to fail the validation here:
https://github.com/opensearch-project/opensearch-devops/actions/runs/10495619352/job/29074434034
The issue is actually within the
opensearch-tar-install.sh
that calls$OPENSEARCH_HOME/plugins/opensearch-security/tools/install_demo_configuration.sh
which located here:https://github.com/opensearch-project/security/blob/06d8c29eea9a648c463e6063542283222e5b1805/tools/install_demo_configuration.sh
The problem is, when
install_demo_configuration.sh
callsorg.opensearch.security.tools.democonfig.Installer
that located here:https://github.com/opensearch-project/security/blob/06d8c29eea9a648c463e6063542283222e5b1805/src/main/java/org/opensearch/security/tools/democonfig/Installer.java
It has different behavior between 2.16.0 (latest 2.x at the time of writing) and 3.0.0 (latest main), when dealing with jdk 11 vs jdk 17 or above.
Apparently 2.x security is having java compatibility at 11, while main change to use 21.
https://github.com/opensearch-project/security/blob/89ca6a8530bb0892140dbe9cf72f065dcb862b16/build.gradle#L95-L96
https://github.com/opensearch-project/security/blob/8fdc00dfe35078edce760d8019df86615a306eb4/build.gradle#L96-L97
It is because of this commit: opensearch-project/security@439606c
The problem is, even core itself did not update this value to 21, still on 17:
https://github.com/opensearch-project/OpenSearch/blob/b31627986fde9e9a8ed0cd1e94529df965acc5b1/buildSrc/src/main/resources/minimumCompilerVersion
Back to workflow:
The reason jdk11 was used here even though that is not defined in the workflow file here:
install_demo_configuration.sh
script prioritizeOPENSEARCH_JDK_HOME
beforeJAVA_HOME
and the bundled jdkOPENSEARCH_HOME/jdk
: https://github.com/opensearch-project/security/blob/06d8c29eea9a648c463e6063542283222e5b1805/tools/install_demo_configuration.sh#L34-L40ubuntu-latest
at the time of writing isubuntu-22.04
and its image include jdk11 as default JAVA_HOME (JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-amd64
): https://github.com/actions/runner-images/blob/69f706a1062a11c09911d22f8545a1cae5826bec/images/ubuntu/Ubuntu2204-Readme.md#javaThis forced the script to use jdk11 to run
org.opensearch.security.tools.democonfig.Installer
and cause the failure above.Thanks.
The text was updated successfully, but these errors were encountered: