Skip to content

Upgrade gradle version to 7.3.3 and java version to 17#29

Merged
reta merged 17 commits intoopensearch-project:mainfrom
prudhvigodithi:main
May 3, 2022
Merged

Upgrade gradle version to 7.3.3 and java version to 17#29
reta merged 17 commits intoopensearch-project:mainfrom
prudhvigodithi:main

Conversation

@prudhvigodithi
Copy link
Copy Markdown
Member

@prudhvigodithi prudhvigodithi commented Apr 29, 2022

Description

Upgrade gradle version to 7.3.3 and java version to 17

Issues Resolved

#30

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
@prudhvigodithi prudhvigodithi changed the title Add zip publish plugin to the template. Upgrade gradle version to 7.3.3 and java version to 17. Apr 29, 2022
@prudhvigodithi prudhvigodithi changed the title Upgrade gradle version to 7.3.3 and java version to 17. Upgrade gradle version to 7.3.3 and java version to 17 Apr 29, 2022
@reta
Copy link
Copy Markdown
Collaborator

reta commented Apr 30, 2022

@prudhvigodithi
Copy link
Copy Markdown
Member Author

Hey @reta I have tested with 7.4.2 and with java version 17, I can see build successful but with some warnings, I dint not see much with 7.3.3, so should we still go with 7.4.2, being latest is always good, but I guess few plugins are still using 7.3.3, any thoughts @dblock @reta ?

[opensearch@11827a526d02 opensearch-plugin-template-java]$ ./gradlew build
Downloading https://services.gradle.org/distributions/gradle-7.4.2-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%
Starting a Gradle Daemon (subsequent builds will be faster)
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 7.4.2
  OS Info               : Linux 5.4.186-113.361.amzn2int.x86_64 (amd64)
  JDK Version           : 17 (Eclipse Temurin JDK)
  JAVA_HOME             : /opt/java/openjdk-17
  Random Testing Seed   : 33B66407CABEA770
  In FIPS 140 mode      : false
=======================================

> Task :javadoc
/usr/share/opensearch/git/opensearch-plugin-template-java/src/main/java/org/opensearch/path/to/plugin/RenamePlugin.java:13: warning: no comment
public class RenamePlugin extends Plugin {
       ^
1 warning

> Task :compileTestJava
Note: /usr/share/opensearch/git/opensearch-plugin-template-java/src/test/java/org/opensearch/path/to/plugin/RenamePluginIT.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :integTest
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.BootstrapForTesting (file:/usr/share/opensearch/.m2/repository/org/opensearch/test/framework/2.0.0-alpha1-SNAPSHOT/framework-2.0.0-alpha1-SNAPSHOT.jar)
WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.BootstrapForTesting
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/usr/share/opensearch/.gradle/wrapper/dists/gradle-7.4.2-bin/48ivgl02cpt2ed3fh9dbalvx8/gradle-7.4.2/lib/plugins/gradle-testing-base-7.4.2.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

> Task :test
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.BootstrapForTesting (file:/usr/share/opensearch/.m2/repository/org/opensearch/test/framework/2.0.0-alpha1-SNAPSHOT/framework-2.0.0-alpha1-SNAPSHOT.jar)
WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.BootstrapForTesting
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/usr/share/opensearch/.gradle/wrapper/dists/gradle-7.4.2-bin/48ivgl02cpt2ed3fh9dbalvx8/gradle-7.4.2/lib/plugins/gradle-testing-base-7.4.2.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

> Task :yamlRestTest
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.BootstrapForTesting (file:/usr/share/opensearch/.m2/repository/org/opensearch/test/framework/2.0.0-alpha1-SNAPSHOT/framework-2.0.0-alpha1-SNAPSHOT.jar)
WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.BootstrapForTesting
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/usr/share/opensearch/.gradle/wrapper/dists/gradle-7.4.2-bin/48ivgl02cpt2ed3fh9dbalvx8/gradle-7.4.2/lib/plugins/gradle-testing-base-7.4.2.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 40s
28 actionable tasks: 28 executed

@peterzhuamazon @bbarani

@reta
Copy link
Copy Markdown
Collaborator

reta commented May 2, 2022

Hey @reta I have tested with 7.4.2 and with java version 17, I can see build successful but with some warnings, I dint not see much with 7.3.3, so should we still go with 7.4.2, being latest is always good, but I guess few plugins are still using 7.3.3, any thoughts @dblock @reta ?

Thanks @prudhvigodithi , in my opinion, I don't see the reasons to use the unsupported Gradle version release line, we should aim to stay on the latest one, as core does (and so would be good to have plugins updated as well).

Signed-off-by: pgodithi <pgodithi@amazon.com>
@prudhvigodithi
Copy link
Copy Markdown
Member Author

prudhvigodithi commented May 2, 2022

Hey @reta, make sense, in my latest commit I have updated gradlew, gradlew.bat, gradle/wrapper/gradle-wrapper.properties, gradle/wrapper/gradle-wrapper.jar that support 7.4.2 version.
I have added gradle-7.4.2-all.zip, following OpenSearch, I can change to gradle-7.4.2-bin.zip as well, let me know.

Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
@reta
Copy link
Copy Markdown
Collaborator

reta commented May 2, 2022

Thanks @prudhvigodithi !

@prudhvigodithi
Copy link
Copy Markdown
Member Author

prudhvigodithi commented May 2, 2022

Hey @reta I guess there is something missing, downloading the gradle-7.4.2.zip from releases, I can see gradle-wrapper.properties uses gradle-7.4.1-bin.zip

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

But ya I have added gradle-7.4.2-bin.zip and verified the jar, looks good
https://gradle.org/release-checksums/

shasum -a 256  gradle-wrapper.jar
575098db54a998ff1c6770b352c3b16766c09848bee7555dab09afc34e8cf590  gradle-wrapper.jar

Somehow the gradle jar version of OpenSearch, though it is said as updated to 7.4.2, the jar has the checksum of 7.3.3 version :)

shasum -a 256  gradle-wrapper.jar
33ad4583fd7ee156f533778736fa1b4940bd83b433934d1cc4e9f608e99a6a89  gradle-wrapper.jar

@dblock @bbarani

Signed-off-by: pgodithi <pgodithi@amazon.com>
@reta
Copy link
Copy Markdown
Collaborator

reta commented May 2, 2022

Hey @reta I guess there is something missing, downloading the gradle-7.4.2.zip from releases, I can see gradle-wrapper.properties uses gradle-7.4.1-bin.zip

@prudhvigodithi This is non-issue, the wrapper does not need to change from release to release, you could also check it here:

[1] https://gradle.org/release-checksums/

@prudhvigodithi
Copy link
Copy Markdown
Member Author

@prudhvigodithi This is non-issue, the wrapper does not need to change from release to release, you could also check it here:

[1] https://gradle.org/release-checksums/

@reta yes the link you provided is what I have used to verify the checksums, but found this link upgrading_wrapper, its always good to upgrade the wrapper with version as well.
But ya this separate discussion, need not be with this PR.

@prudhvigodithi
Copy link
Copy Markdown
Member Author

Hey @reta and @dblock can we merge this PR, I will create a new PR adding the custom gradle plugin opensearch.pluginzip, with opensearch_version = "2.0.0-alpha1-SNAPSHOT" .

@reta reta merged commit d39ccda into opensearch-project:main May 3, 2022
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.

3 participants