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

[BUG] Opensearchplugin is not compatible with Gradle 8.8 #13921

Closed
dbwiddis opened this issue Jun 1, 2024 · 1 comment · Fixed by #13584
Closed

[BUG] Opensearchplugin is not compatible with Gradle 8.8 #13921

dbwiddis opened this issue Jun 1, 2024 · 1 comment · Fixed by #13584
Labels
bug Something isn't working Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement.

Comments

@dbwiddis
Copy link
Member

dbwiddis commented Jun 1, 2024

Describe the bug

Gradle version 8.8 removes the constructor signature used here:

final InstallationLocation location = new InstallationLocation(javaHome, "Java home");

Prior to the removal that method delegated to the constructor with autoprovisioned set false

public InstallationLocation(File location, String source) {
    this(location, source, false);
}

Related component

Build

To Reproduce

  1. Update gradle wrapper version to 8.8
  2. Attempt to build a plugin using apply plugin: 'opensearch.opensearchplugin'
  3. Observe failure pointing to the above line. Stack trace:

Caused by: java.lang.NoSuchMethodError: 'void org.gradle.jvm.toolchain.internal.InstallationLocation.(java.io.File, java.lang.String)'
at org.opensearch.gradle.info.GlobalBuildInfoPlugin.getJavaInstallation(GlobalBuildInfoPlugin.java:202)

Sample failure:
opensearch-project/flow-framework#725

Expected behavior

The gradle build builds.

Additional Details

Additional context

The removal is a breaking change that occurred in a minor version bump. However, the package is clearly marked "internal", so we probably shouldn't be calling that method.

The removal occurred in this commit:
gradle/gradle@5044b43

@dbwiddis dbwiddis added bug Something isn't working untriaged labels Jun 1, 2024
@github-actions github-actions bot added the Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. label Jun 1, 2024
@dbwiddis dbwiddis linked a pull request Jun 1, 2024 that will close this issue
8 tasks
@peternied
Copy link
Member

[Triage - attendees 1 2 3 4 5 6 7]
@dbwiddis Thanks for creating this issue and creating a PR to address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement.
Projects
None yet
2 participants