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

Update dependency gradle to v8 - autoclosed #441

Closed
wants to merge 1 commit into from

Conversation

mend-for-github-com[bot]
Copy link
Contributor

@mend-for-github-com mend-for-github-com bot commented Feb 13, 2023

This PR contains the following updates:

Package Update Change
gradle (source) major 7.6.1 -> 8.0.2

Release Notes

gradle/gradle

v8.0.2: 8.0.2

The Gradle team is excited to announce Gradle 8.0.2.

This is the second patch release for Gradle 8.0. We recommend using 8.0.2 instead of 8.0.

It fixes the following issues:

  • #​23698 Gradle 8 RC2 runs out of metaspace
  • #​23962 Java/Scala build with no explicit toolchain: build fails with Gradle 8.0.1 / Scala 2.13
  • #​23990 Gradle 8.0.+ silently dropped support for custom compilers in JavaCompile
  • #​24031 InstrumentingTransformer generates different class files in Gradle 8 and 7.6 which leads to Remote Build-Cache misses
  • #​24109 Extending an already resolved configuration no longer works correctly
  • #​24122 Update configuration cache state for some plugins
  • #​24129 includeBuild in PluginManagementSpec deincubated in Gradle 8, docs still say it's incubating

Issues fixed in the first patch release:

  • #​21551 Document integration of Scala plugin with toolchains and problems with target flag
  • #​23888 --no-rebuild suddenly gone without new deprecation cycle and without the reason for its undeprecation being void
  • #​23905 Gradle 8.0 fails Scala build with isBlank not found in String class error

Read the Release Notes

Upgrade Instructions

Switch your build to use Gradle 8.0.2 by updating your wrapper:

./gradlew wrapper --gradle-version=8.0.2

See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 8.0.2.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v8.0.1: 8.0.1

This is a patch release for 8.0. We recommend using 8.0.1 instead of 8.0.

It fixes the following issues:

  • #​21551 - Document integration of Scala plugin with toolchains and problems with target flag
  • #​23888 - --no-rebuild suddenly gone without new deprecation cycle and without the reason for its undeprecation being void
  • #​23905 - Gradle 8.0 fails Scala build with isBlank not found in String class error

Read the Release Notes

Upgrade Instructions

Switch your build to use Gradle 8.0.1 by updating your wrapper:

./gradlew wrapper --gradle-version=8.0.1

See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 8.0.1.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java.lang.RuntimeException: found jar hell in test classpath
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:118)
... 85 more

        Caused by:
        java.lang.IllegalStateException: jar hell!
        class: org.junit.platform.engine.CompositeFilter$1
        jar1: /home/runner/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.9.2/40aeef2be7b04f96bb91e8b054affc28b7c7c935/junit-platform-engine-1.9.2.jar
        jar2: /home/runner/.gradle/wrapper/dists/gradle-8.0-bin/ca5e32bp14vu59qr[306](https://github.com/opensearch-project/opensearch-sdk-java/actions/runs/4167084505/jobs/7212240564#step:4:307)oxotwh/gradle-8.0/lib/plugins/junit-platform-engine-1.8.2.jar

Looks like Gradle is introducing a JUnit 1.8.2 dependency and we have 1.9.2. We may need to introduce a configuration to force the newer dependency.

@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/gradle-8.x branch 7 times, most recently from 2a190d0 to 4ccbf9d Compare February 20, 2023 19:54
@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/gradle-8.x branch 5 times, most recently from d39a5c8 to 3872031 Compare February 24, 2023 17:24
@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/gradle-8.x branch 2 times, most recently from 31933cb to f07234c Compare February 28, 2023 07:20
@dbwiddis
Copy link
Member

OpenSearch repo has worked around this:

allprojects {
  group = 'org.opensearch'
  version = VersionProperties.getOpenSearch()
  description = "OpenSearch subproject ${project.path}"

  afterEvaluate {
    project.tasks.withType(Test) { task ->
      // This is so hacky: now, by default, test tasks uses JUnit framework and always includes 'junit'
      // JARs from the Gradle distribution (no ways to override this behavior). It causes JAR hell on test 
      // classpath, example of the report:
      //
      //  jar1: /home/ubuntu/.gradle/caches/modules-2/files-2.1/junit/junit/4.13.2/8ac9e16d933b6fb43bc7f576336b8f4d7eb5ba12/junit-4.13.2.jar
      //  jar2: /home/ubuntu/.gradle/wrapper/dists/gradle-8.0-rc-1-all/2p8rgxxewg8l61n1p3vrzr9s8/gradle-8.0-rc-1/lib/junit-4.13.2.jar
      // 
      task.getTestFrameworkProperty().convention(getProviderFactory().provider(() -> new JUnitTestFramework(task, task.getFilter(), false)));
    }
  }
}

@dbwiddis
Copy link
Member

@reta you worked around this issue in OpenSearch in #5666. I tried copy-pasting your solution over here but got

Could not compile build file '/Users/widdisd/git/opensearch-sdk-java/build.gradle'.

startup failed:
build file '/Users/widdisd/git/opensearch-sdk-java/build.gradle': 51: unable to resolve class JUnitTestFramework
@ line 51, column 84.
viderFactory().provider(() -> new JUnitT

Any helpful hints on applying the same or similar hack here?

@dbwiddis
Copy link
Member

Looks like this issue is being tracked at Gradle

@dbwiddis
Copy link
Member

Best (as in easiest for us) path forward is to wait for Gradle 8.0.2. :-)

@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/gradle-8.x branch 2 times, most recently from 7bc4732 to fcc25c0 Compare March 1, 2023 01:11
@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/gradle-8.x branch from fcc25c0 to aa38713 Compare March 2, 2023 01:55
@dbwiddis
Copy link
Member

dbwiddis commented Mar 2, 2023

Closing this PR to reduce update noise for 8.0.1. Mend should generate a new PR for 8.0.2.

That may not fix it either, looking at the linked issue; if so we'll have to wait for 8.1.

@dbwiddis dbwiddis closed this Mar 2, 2023
@mend-for-github-com
Copy link
Contributor Author

Renovate Ignore Notification

As this PR has been closed unmerged, Renovate will ignore this upgrade and you will not receive PRs for any future 8.x releases. However, if you upgrade to 8.x manually then Renovate will reenable minor and patch updates automatically.

If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.

@mend-for-github-com mend-for-github-com bot deleted the whitesource-remediate/gradle-8.x branch March 2, 2023 19:25
@reta
Copy link
Contributor

reta commented Mar 3, 2023

@reta you worked around this issue in OpenSearch in #5666. I tried copy-pasting your solution over here but got

@dbwiddis My apologies for late replay (just got back from vacation), indeed there is a workaround for this issue, I will take a look shortly what we could do here (so we won't be waiting for 8.1)

@dbwiddis
Copy link
Member

dbwiddis commented Mar 3, 2023

@reta thanks! It might be fixed in 8.0.2 (see linked issue at gradle), so I'm willing to wait that long before doing anything. Don't spend too much time on this.

And since I closed this issue I'll need to click the box in our dependency dashboard to re-trigger a new 8.x PR.

(Re-opened.)

@dbwiddis dbwiddis restored the whitesource-remediate/gradle-8.x branch March 3, 2023 16:19
@dbwiddis dbwiddis reopened this Mar 3, 2023
@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/gradle-8.x branch from aa38713 to 2d13265 Compare March 3, 2023 18:33
Signed-off-by: mend-for-github-com[bot] <mend-for-github-com[bot]@users.noreply.github.com>
@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/gradle-8.x branch from 2d13265 to 4fb1bc9 Compare March 4, 2023 02:02
@mend-for-github-com mend-for-github-com bot changed the title Update dependency gradle to v8 Update dependency gradle to v8 - autoclosed Mar 5, 2023
@mend-for-github-com mend-for-github-com bot deleted the whitesource-remediate/gradle-8.x branch March 5, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants