lostluck commented on code in PR #31075: URL: https://github.com/apache/beam/pull/31075#discussion_r1583393345
########## runners/prism/build.gradle: ########## @@ -0,0 +1,74 @@ +/* + * 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. + */ + +plugins { id 'org.apache.beam.module' } +applyGoNature() + +description = "Apache Beam :: Runners :: Prism" +ext.summary = "Tasks related to executing the Prism Runner" + +// jobPort Property optionally configures the Prism job_port flag. +def jobPort = findProperty("jobPort") + +// buildTargetDir is the gradle build directory convention for this project. +def buildTargetDir = layout.buildDirectory.dir("tmp") + +// buildTarget is the go build output target path for the Prism service. +def buildTarget = buildTargetDir.get().file("prism") + +// modDir is the path containing the go.mod file. +def modDir = project.rootDir.toPath().resolve("sdks") + +// goRootDir is the root directory of the Beam Go SDK. +def goRootDir = modDir.resolve("go") + +// jobPortFlag is Prism service's job management service port flag name. +def jobPortFlag = "job_port" + +// cmdDir is directory conventionally containing Go executables. +def cmdDir = goRootDir.resolve("cmd") Review Comment: Is it strictly necessary to resolve each directory one step at a time? That is, instead of just looking for `modDir.resolve("go/cmd/prism")` directly? Same for the buildTarget chain. If that doesn't work, a comment explaining why we need to go one step at a time (eg. Gradle makes us do it this way), is more useful than adding comments about what each individual directory is. Metaphorically: Documenting the forest is important when there are this many trees. ########## runners/prism/build.gradle: ########## @@ -0,0 +1,74 @@ +/* + * 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. + */ + +plugins { id 'org.apache.beam.module' } +applyGoNature() + +description = "Apache Beam :: Runners :: Prism" +ext.summary = "Tasks related to executing the Prism Runner" + +// jobPort Property optionally configures the Prism job_port flag. +def jobPort = findProperty("jobPort") + +// buildTargetDir is the gradle build directory convention for this project. +def buildTargetDir = layout.buildDirectory.dir("tmp") + +// buildTarget is the go build output target path for the Prism service. +def buildTarget = buildTargetDir.get().file("prism") + +// modDir is the path containing the go.mod file. +def modDir = project.rootDir.toPath().resolve("sdks") + +// goRootDir is the root directory of the Beam Go SDK. +def goRootDir = modDir.resolve("go") + +// jobPortFlag is Prism service's job management service port flag name. +def jobPortFlag = "job_port" Review Comment: Consider moving this either above or below the directory resolutions, likely just below `def jobPort` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
