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

Upgrade to Gradle 7 #107

Closed
15 tasks done
Tracked by #566 ...
reta opened this issue Nov 29, 2021 · 6 comments
Closed
15 tasks done
Tracked by #566 ...

Upgrade to Gradle 7 #107

reta opened this issue Nov 29, 2021 · 6 comments
Labels
campaign Parent issues of OpenSearch release campaigns. enhancement New feature or request v2.0.0

Comments

@reta
Copy link

reta commented Nov 29, 2021

Is your feature request related to a problem?
The OpenSearch Plugins are still built using Gradle 6.6.x whereas the Gradle release train has moved to 7.x already. The OpenSearch core is about to be switched to Gradle 7.3 (see please opensearch-project/OpenSearch#1609), it would make sense to switch all plugins to Gradle 7.3 as well.

What solution would you like?
Update Gradle to 7.3

What alternatives have you considered?
N/A

Do you have any additional context?
See please opensearch-project/OpenSearch#1246

@dblock
Copy link
Member

dblock commented Nov 29, 2021

Added this issue to 1.3.0 campaigns, opensearch-project/opensearch-build#889

@dblock dblock added the v1.3.0 label Dec 1, 2021
@jmazanec15
Copy link
Member

Getting a failure related to GlobalBuildInfoPlugin with Java 14 for k-NN upgrade PR:

* What went wrong:
A problem occurred evaluating root project 'opensearch-knn'.
> Failed to apply plugin class 'org.opensearch.gradle.info.GlobalBuildInfoPlugin'.
   > Could not create plugin of type 'GlobalBuildInfoPlugin'.
      > Could not generate a decorated class for type GlobalBuildInfoPlugin.
         > org/gradle/jvm/toolchain/JavaInstallation

Anyone else run into this?

@reta
Copy link
Author

reta commented Dec 3, 2021

@jmazanec15 yes, the plugin uses OpenSearch 1.3.0-SNAPSHOT which is not yet on Gradle 7, the PR opensearch-project/OpenSearch#1622 is not merged yet :(

@dlvenable
Copy link
Member

Here are instructions for updating a project to Gradle 7:

  1. You can try to fix Gradle 7 errors in your project before any update. Run your build with the --warning-mode all flag. Fix issues your your build files.
./gradlew --warning-mode all clean build
  1. Run the Gradle wrapper task to update:
./gradlew wrapper --gradle-version 7.3
  1. Add the OpenSearch snapshot repository to your buildscript repositories list. It may already be included.
maven { url 'https://aws.oss.sonatype.org/content/repositories/snapshots/' }
  1. Update the OpenSearch build-tools dependency to the correct version. Right now, this change is only available in the 2.0.0-SNAPSHOT build.
classpath 'org.opensearch.gradle:build-tools:2.0.0-SNAPSHOT'
  1. Run your build as usual.

Configuration snippet for reference:

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/' }
        mavenCentral()
        maven { url 'https://aws.oss.sonatype.org/content/repositories/snapshots/' }
    }

    dependencies {
        classpath 'org.opensearch.gradle:build-tools:2.0.0-SNAPSHOT'
    }
}

@reta
Copy link
Author

reta commented Dec 6, 2021

@dblock could you please add 2.0 label to this issue and remove 1.3.0? Thank you.

@dblock dblock changed the title [Meta] Update to Gradle 7 [Meta] Upgrade to Gradle 7, build and test on JDK 11, 14 and 17 Mar 8, 2022
@dblock dblock changed the title [Meta] Upgrade to Gradle 7, build and test on JDK 11, 14 and 17 [Meta] Upgrade to Gradle 7, Mar 8, 2022
@dblock dblock changed the title [Meta] Upgrade to Gradle 7, [Meta] Upgrade to Gradle 7 Mar 8, 2022
@dblock dblock mentioned this issue Mar 8, 2022
14 tasks
@dblock dblock changed the title [Meta] Upgrade to Gradle 7 Upgrade to Gradle 7 Mar 8, 2022
@dblock dblock added the campaign Parent issues of OpenSearch release campaigns. label Apr 18, 2022
@dblock
Copy link
Member

dblock commented Apr 18, 2022

@dlvenable says Data Prepper cannot update to Gradle 7 until after OpenSearch 2.0 releases. Retaining Gradle 6 in Data Prepper does not block OpenSearch 2.0 or cause any sort of incompatibility between Data Prepper and OpenSearch. I am going to close this for 2.0.0.

@dblock dblock closed this as completed Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
campaign Parent issues of OpenSearch release campaigns. enhancement New feature or request v2.0.0
Projects
None yet
Development

No branches or pull requests

5 participants