ahmedabu98 commented on code in PR #25685:
URL: https://github.com/apache/beam/pull/25685#discussion_r1132907027
##########
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy:
##########
@@ -2353,6 +2395,98 @@ class BeamModulePlugin implements Plugin<Project> {
}
}
+ /**
***********************************************************************************************/
+ // Method to create the createCrossLanguageUsingJavaExpansionTask.
+ // The method takes CrossLanguageUsingJavaExpansionConfiguration as
parameter.
+ // This method creates a task that runs Python SDK pipeline tests that use
Java transforms via an input expansion service
+ project.ext.createCrossLanguageUsingJavaExpansionTask = {
+ // This task won't work if the python build file doesn't exist.
+ if (!project.project(":sdks:python").buildFile.exists()) {
+ System.err.println 'Python build file not found. Skipping
createCrossLanguageUsingJavaExpansionTask.'
+ return
+ }
+ def config = it ? it as CrossLanguageUsingJavaExpansionConfiguration :
new CrossLanguageUsingJavaExpansionConfiguration()
+
+ project.evaluationDependsOn(":sdks:python")
+ project.evaluationDependsOn(config.expansionProjectPath)
+ project.evaluationDependsOn(":runners:core-construction-java")
+ project.evaluationDependsOn(":sdks:java:extensions:python")
+
+ // Setting up args to launch the expansion service
+ def envDir = project.project(":sdks:python").envdir
+ def pythonDir = project.project(":sdks:python").projectDir
+ def javaExpansionPort = getRandomPort()
Review Comment:
Thanks for catching that, moved port acquisition to be right before
expansion service launch
--
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]