Skip to content

Commit

Permalink
Fix XVR test fail python docker (#29256)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abacn authored Nov 2, 2023
1 parent 9aeb4fe commit bc29b96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions sdks/java/container/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ docker {
dockerfile project.file("../Dockerfile")
files "./build/"
buildArgs([
'pull_licenses': project.rootProject.hasProperty(["docker-pull-licenses"]) ||
project.rootProject.hasProperty(["isRelease"]),
'pull_licenses': project.rootProject.hasProperty("docker-pull-licenses") ||
project.rootProject.hasProperty("isRelease"),
'base_image': javaBaseImage,
'java_version': imageJavaVersion,
])
Expand All @@ -148,8 +148,8 @@ docker {
push pushContainers
}

if (project.rootProject.hasProperty(["docker-pull-licenses"]) ||
project.rootProject.hasProperty(["isRelease"])) {
if (project.rootProject.hasProperty("docker-pull-licenses") ||
project.rootProject.hasProperty("isRelease")) {
project.logger.lifecycle('docker-pull-licenses set, creating go-licenses')
dockerPrepare.dependsOn copyJavaThirdPartyLicenses
dockerPrepare.dependsOn copyGolangLicenses
Expand Down
6 changes: 5 additions & 1 deletion sdks/python/container/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def copyLicenseScripts = tasks.register("copyLicenseScripts", Copy){
def copyLauncherDependencies = tasks.register("copyLauncherDependencies", Copy) {
from configurations.pythonHarnessLauncher
into "build/target/launcher"

// Avoid seemingly gradle bug stated in https://github.com/apache/beam/issues/29220
mustRunAfter "copyLicenses"

if(configurations.pythonHarnessLauncher.isEmpty()) {
throw new StopExecutionException();
}
Expand Down Expand Up @@ -93,7 +97,7 @@ dockerPrepare.dependsOn copyLauncherDependencies
dockerPrepare.dependsOn copyDockerfileDependencies
dockerPrepare.dependsOn copyLicenseScripts

if (project.rootProject.hasProperty(["docker-pull-licenses"])) {
if (project.rootProject.hasProperty("docker-pull-licenses")) {
def copyGolangLicenses = tasks.register("copyGolangLicenses", Copy) {
from "${project(':release:go-licenses:py').buildDir}/output"
into "build/target/go-licenses"
Expand Down

0 comments on commit bc29b96

Please sign in to comment.