[GitHub] [beam] TheNeuralBit commented on a change in pull request #13211: [BEAM-8106] Separate Java8/11 container image build tasks

2020-11-16 Thread GitBox


TheNeuralBit commented on a change in pull request #13211:
URL: https://github.com/apache/beam/pull/13211#discussion_r524529168



##
File path: sdks/java/container/common.gradle
##
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Build script containign common build tasks for Java SDK Docker images.

Review comment:
   typo nit:
   
   ```suggestion
* Build script containing common build tasks for Java SDK Docker images.
   ```





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [beam] TheNeuralBit commented on a change in pull request #13211: [BEAM-8106] Separate Java8/11 container image build tasks

2020-11-16 Thread GitBox


TheNeuralBit commented on a change in pull request #13211:
URL: https://github.com/apache/beam/pull/13211#discussion_r524528475



##
File path: sdks/java/container/build.gradle
##
@@ -86,51 +76,21 @@ licenseReport {
   renderers = [new JsonReportRenderer()]
 }
 
-def imageJavaVersion = project.hasProperty('imageJavaVersion') ? 
project.findProperty('imageJavaVersion') : '8'
-docker {

Review comment:
   Hm ok, I'm not sure if we have any precedent to follow for this. I don't 
think it's worth going to a lot of trouble for. Instead you could just send an 
FYI email to dev@ once this is merged letting people know they may need to 
change :sdks:java:container:docker -> :sdks:java:container:java8:docker.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [beam] TheNeuralBit commented on a change in pull request #13211: [BEAM-8106] Separate Java8/11 container image build tasks

2020-11-10 Thread GitBox


TheNeuralBit commented on a change in pull request #13211:
URL: https://github.com/apache/beam/pull/13211#discussion_r520854059



##
File path: sdks/java/container/build.gradle
##
@@ -86,51 +76,21 @@ licenseReport {
   renderers = [new JsonReportRenderer()]
 }
 
-def imageJavaVersion = project.hasProperty('imageJavaVersion') ? 
project.findProperty('imageJavaVersion') : '8'
-docker {
-  name containerImageName(
-  name: 
"${project.docker_image_default_repo_prefix}java${imageJavaVersion}_sdk",
-  root: project.rootProject.hasProperty(["docker-repository-root"]) ?
-  project.rootProject["docker-repository-root"] :
-  project.docker_image_default_repo_root,
-  tag: project.rootProject.hasProperty(["docker-tag"]) ?
-  project.rootProject["docker-tag"] : project.sdk_version)
-  dockerfile project.file("./Dockerfile")
-  files "./build/"
-  buildArgs([
-'pull_licenses': project.rootProject.hasProperty(["docker-pull-licenses"]) 
||
- project.rootProject.hasProperty(["isRelease"]),
-'java_version': imageJavaVersion,
-  ])
+task buildAll {
+  dependsOn ':sdks:java:container:java8:docker'
+  dependsOn ':sdks:java:container:java11:docker'
 }
 
 task pullLicenses(type: Exec) {
+  dependsOn generateLicenseReport
+  generateLicenseReport.outputs.cacheIf { false }

Review comment:
   (not a blocker for this PR) @kennknowles can you comment on why we need 
this? It would be good to have a comment explaining it. Looks like it was added 
in 
https://github.com/apache/beam/commit/ebd65e5314eb42131eace3be62390b3570e71292

##
File path: runners/portability/java/build.gradle
##
@@ -214,7 +214,7 @@ def createUlrValidatesRunnerTask = { name, environmentType 
->
   }
 
   if (environmentType == "DOCKER") {
-vrTask.dependsOn ":sdks:java:container:docker"
+vrTask.dependsOn ":sdks:java:container:java8:docker"

Review comment:
   Are there plans to make this and the other portable tests runnable with 
the Java 11 container? Seems like we should drop a TODO and/or file a jira

##
File path: sdks/java/container/build.gradle
##
@@ -86,51 +76,21 @@ licenseReport {
   renderers = [new JsonReportRenderer()]
 }
 
-def imageJavaVersion = project.hasProperty('imageJavaVersion') ? 
project.findProperty('imageJavaVersion') : '8'
-docker {

Review comment:
   Maybe we should keep the `:sdks:java:container:docker` task for a bit 
and just have it error with a message directing people to java8:docker and/or 
java11:docker?

##
File path: sdks/java/container/build.gradle
##
@@ -54,17 +55,6 @@ dependencies {
   dockerDependency library.java.kafka_clients
 }
 
-task copyDockerfileDependencies(type: Copy) {

Review comment:
   Ack, thank you





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org