-
Notifications
You must be signed in to change notification settings - Fork 58
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
Conversation
20198ac
to
8a3fc01
Compare
There was a problem hiding this 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 moreCaused 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.
2a190d0
to
4ccbf9d
Compare
d39a5c8
to
3872031
Compare
31933cb
to
f07234c
Compare
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)));
}
}
} |
@reta you worked around this issue in OpenSearch in #5666. I tried copy-pasting your solution over here but got
Any helpful hints on applying the same or similar hack here? |
Looks like this issue is being tracked at Gradle |
Best (as in easiest for us) path forward is to wait for Gradle 8.0.2. :-) |
7bc4732
to
fcc25c0
Compare
fcc25c0
to
aa38713
Compare
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. |
Renovate Ignore NotificationAs 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. |
@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) |
@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.
(Re-opened.) |
aa38713
to
2d13265
Compare
Signed-off-by: mend-for-github-com[bot] <mend-for-github-com[bot]@users.noreply.github.com>
2d13265
to
4fb1bc9
Compare
This PR contains the following updates:
7.6.1
->8.0.2
Release Notes
gradle/gradle
v8.0.2
: 8.0.2The 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:
JavaCompile
Issues fixed in the first patch release:
target
flag--no-rebuild
suddenly gone without new deprecation cycle and without the reason for its undeprecation being voidRead the Release Notes
Upgrade Instructions
Switch your build to use Gradle 8.0.2 by updating your wrapper:
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.1This is a patch release for 8.0. We recommend using 8.0.1 instead of 8.0.
It fixes the following issues:
target
flag--no-rebuild
suddenly gone without new deprecation cycle and without the reason for its undeprecation being voidRead the Release Notes
Upgrade Instructions
Switch your build to use Gradle 8.0.1 by updating your wrapper:
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.