[
https://issues.apache.org/jira/browse/BEAM-4392?focusedWorklogId=105737&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-105737
]
ASF GitHub Bot logged work on BEAM-4392:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/May/18 21:37
Start Date: 24/May/18 21:37
Worklog Time Spent: 10m
Work Description: lukecwik closed pull request #5457: [BEAM-4392] Fix
:beam-runners-java-fn-execution failure
URL: https://github.com/apache/beam/pull/5457
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/build_rules.gradle b/build_rules.gradle
index 0132c062c56..7e876035e94 100644
--- a/build_rules.gradle
+++ b/build_rules.gradle
@@ -319,9 +319,12 @@ ext.getJavaRelocatedPath = { String suffix ->
+ suffix)
}
+// By default if there is at least one include rule then all included
dependencies must be specified.
+// This overrides the default behavior of include all if no includes are
specified.
+// See details here:
+//
https://github.com/johnrengelman/shadow/blob/98191096a94674245c7b3e63975df9e14f67074e/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/DefaultDependencyFilter.groovy#L123
ext.DEFAULT_SHADOW_CLOSURE = {
dependencies {
- exclude(".*")
include(dependency(library.java.guava))
}
relocate("com.google.common", getJavaRelocatedPath("com.google.common")) {
diff --git a/sdks/java/harness/build.gradle b/sdks/java/harness/build.gradle
index 254f89a9221..b3206101cf2 100644
--- a/sdks/java/harness/build.gradle
+++ b/sdks/java/harness/build.gradle
@@ -16,6 +16,15 @@
* limitations under the License.
*/
+
+// We specifically enumerate all the projects that we depend on since
+// the list is used in both defining the included set for the uber jar
+// and also the set of project level dependencies.
+def dependOnProjects = [":beam-model-pipeline", ":beam-model-fn-execution",
":beam-sdks-java-core",
+ ":beam-sdks-java-fn-execution",
+
":beam-sdks-java-extensions-google-cloud-platform-core",
+ ":beam-runners-core-java",
":beam-runners-core-construction-java"]
+
apply from: project(":").file("build_rules.gradle")
applyJavaNature(shadowClosure: DEFAULT_SHADOW_CLOSURE <<
// Create an uber jar without repackaging for the SDK harness
@@ -24,7 +33,12 @@ applyJavaNature(shadowClosure: DEFAULT_SHADOW_CLOSURE <<
// jars.
{
dependencies {
- include('**/*.class')
+ // Directly include all projects depended on
+ dependOnProjects.each {
+ include(project(path: it, configuration: "shadow"))
+ }
+ // Include all dependencies and transitive dependencies
+ include(dependency(".*:.*"))
}
})
@@ -32,13 +46,9 @@ description = "Apache Beam :: SDKs :: Java :: Harness"
ext.summary = "This contains the SDK Fn Harness for Beam Java"
dependencies {
- compile project(path: ":beam-model-pipeline", configuration: "shadow")
- compile project(path: ":beam-model-fn-execution", configuration: "shadow")
- compile project(path: ":beam-sdks-java-core", configuration: "shadow")
- compile project(path: ":beam-sdks-java-fn-execution", configuration:
"shadow")
- compile project(path:
":beam-sdks-java-extensions-google-cloud-platform-core", configuration:
"shadow")
- compile project(path: ":beam-runners-core-java", configuration: "shadow")
- compile project(path: ":beam-runners-core-construction-java", configuration:
"shadow")
+ dependOnProjects.each {
+ compile project(path: it, configuration: "shadow")
+ }
compile library.java.jackson_databind
compile library.java.findbugs_jsr305
compile library.java.guava
diff --git a/sdks/java/io/google-cloud-platform/build.gradle
b/sdks/java/io/google-cloud-platform/build.gradle
index c0cf6ed4d5e..788123d411d 100644
--- a/sdks/java/io/google-cloud-platform/build.gradle
+++ b/sdks/java/io/google-cloud-platform/build.gradle
@@ -24,9 +24,7 @@ applyJavaNature(
// Bigtable needs to expose Guava types.
shadowClosure: {
dependencies {
- exclude(".*")
- // Exclude netty due to conflict with spark runner, see [BEAM-3519].
- exclude("io/netty/**")
+ exclude(dependency(".*:.*"))
}
})
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 105737)
Time Spent: 3h 10m (was: 3h)
> Task :beam-runners-java-fn-execution:test gradle build failed
> -------------------------------------------------------------
>
> Key: BEAM-4392
> URL: https://issues.apache.org/jira/browse/BEAM-4392
> Project: Beam
> Issue Type: Bug
> Components: build-system
> Reporter: Boyuan Zhang
> Assignee: Boyuan Zhang
> Priority: Major
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> build scan:
> https://www.google.com/url?q=https://scans.gradle.com/s/7ueucex6axz7g&sa=D&usg=AFQjCNGpWIafl8oZttFesg0MVWu7uA8Qmw
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)