-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix Nexmark Flink lz4-java capability conflict #39055
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "comment": "Modify this file in a trivial way to cause this test suite to run", | ||
| "modification": 1 | ||
| "modification": 2 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,6 +99,19 @@ if (isSparkRunner) { | |
| } | ||
| } | ||
|
|
||
| // Flink 2.1+ uses at.yawk.lz4:lz4-java instead of org.lz4:lz4-java | ||
| // Explicitly prefer Flink's at.yawk.lz4 version to resolve capability conflict | ||
| configurations.gradleRun { | ||
| resolutionStrategy.capabilitiesResolution.withCapability('org.lz4:lz4-java') { | ||
| def candidate = candidates.find { it.id.toString().contains('at.yawk.lz4') } | ||
| if (candidate != null) { | ||
| select(candidate) | ||
| } else { | ||
| selectHighestVersion() | ||
| } | ||
| } | ||
| } | ||
|
Comment on lines
+104
to
+113
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Configuring the capability resolution strategy only on |
||
|
|
||
| def getNexmarkArgs = { | ||
| def nexmarkArgsStr = project.findProperty(nexmarkArgsProperty) ?: "" | ||
| def nexmarkArgsList = new ArrayList<String>() | ||
|
|
||
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.
Thanks for the fix. Since this chunk of code needs to be repeated in a few place, can we generalize it into BeamModulePlugin, see comments
#39049 (comment)
I'm preparing a PR to fix all of these
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.
Opened #39061
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.
Makes sense to generalize it in BeamModulePlugin instead of copying it in each build.gradle