Skip to content

Commit

Permalink
Fix XVR_Direct time out
Browse files Browse the repository at this point in the history
* Bump XVR_Direct timeout to 2h

* Only run GoUsingJava test suite once
  • Loading branch information
Abacn committed Feb 1, 2023
1 parent f77366a commit 59654c7
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Direct',
description('Runs the CrossLanguageValidatesRunner suite on the Direct runner.')

// Set common parameters.
commonJobProperties.setTopLevelMainJobProperties(delegate)
commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 120)

// Publish all test results to Jenkins
publishers {
Expand All @@ -43,6 +43,8 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Direct',
tasks(':sdks:python:test-suites:direct:xlang:validatesCrossLanguageRunner')
commonJobProperties.setGradleSwitches(delegate)
switches("-PpythonVersion=${pythonVersion}")
// only run non-python task (e.g. GoUsingJava) once
switches("-PskipNonPythonTask=${pythonVersion != CROSS_LANGUAGE_VALIDATES_RUNNER_PYTHON_VERSIONS[0]}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Flink',
tasks(":runners:flink:${CommonTestProperties.getFlinkVersion()}:job-server:validatesCrossLanguageRunner")
commonJobProperties.setGradleSwitches(delegate)
switches("-PpythonVersion=${pythonVersion}")
// only run non-python task (e.g. GoUsingJava) once
switches("-PskipNonPythonTask=${pythonVersion != CROSS_LANGUAGE_VALIDATES_RUNNER_PYTHON_VERSIONS[0]}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Samza',
tasks(":runners:samza:job-server:validatesCrossLanguageRunner")
commonJobProperties.setGradleSwitches(delegate)
switches("-PpythonVersion=${pythonVersion}")
// only run non-python task (e.g. GoUsingJava) once
switches("-PskipNonPythonTask=${pythonVersion != CROSS_LANGUAGE_VALIDATES_RUNNER_PYTHON_VERSIONS[0]}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Spark',
tasks(':runners:spark:2:job-server:validatesCrossLanguageRunner')
commonJobProperties.setGradleSwitches(delegate)
switches("-PpythonVersion=${pythonVersion}")
// only run non-python task (e.g. GoUsingJava) once
switches("-PskipNonPythonTask=${pythonVersion != CROSS_LANGUAGE_VALIDATES_RUNNER_PYTHON_VERSIONS[0]}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Spark3',
tasks(':runners:spark:3:job-server:validatesCrossLanguageRunner')
commonJobProperties.setGradleSwitches(delegate)
switches("-PpythonVersion=${pythonVersion}")
// only run non-python task (e.g. GoUsingJava) once
switches("-PskipNonPythonTask=${pythonVersion != CROSS_LANGUAGE_VALIDATES_RUNNER_PYTHON_VERSIONS[0]}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,7 @@ class BeamModulePlugin implements Plugin<Project> {
"python_port": pythonPort
]
def serviceArgs = project.project(':sdks:python').mapToArgString(expansionServiceOpts)
def pythonContainerSuffix = project.project(':sdks:python').pythonVersion == '2.7' ? '2' : project.project(':sdks:python').pythonVersion.replace('.', '')
def pythonContainerSuffix = project.project(':sdks:python').pythonVersion.replace('.', '')
def javaContainerSuffix
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
javaContainerSuffix = 'java8'
Expand Down Expand Up @@ -2534,9 +2534,13 @@ class BeamModulePlugin implements Plugin<Project> {
dependsOn setupTask
dependsOn config.startJobServer
}
mainTask.configure{dependsOn goTask}
cleanupTask.configure{mustRunAfter goTask}
config.cleanupJobServer.configure{mustRunAfter goTask}
// CrossLanguageValidatesRunnerTask is setup under python sdk but also runs tasks not involving
// python versions. set 'skipNonPythonTask' property to avoid duplicated run of these tasks.
if (!(project.hasProperty('skipNonPythonTask') && project.skipNonPythonTask == 'true')) {
mainTask.configure { dependsOn goTask }
}
cleanupTask.configure { mustRunAfter goTask }
config.cleanupJobServer.configure { mustRunAfter goTask }
}

/** ***********************************************************************************************/
Expand Down Expand Up @@ -2795,7 +2799,7 @@ class BeamModulePlugin implements Plugin<Project> {
}

project.ext.getVersionSuffix = { String version ->
return version == '2.7' ? '2' : version.replace('.', '')
return version.replace('.', '')
}

project.ext.getVersionsAsList = { String propertyName ->
Expand Down
2 changes: 1 addition & 1 deletion sdks/python/test-suites/direct/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

def pythonVersionSuffix = project.ext.pythonVersion.replace('.', '')
def pythonContainerVersion = project.ext.pythonVersion == '2.7' ? '2' : project.ext.pythonVersion
def pythonContainerVersion = project.ext.pythonVersion
def runScriptsDir = "${rootDir}/sdks/python/scripts"
// Basic test options for ITs running on Jenkins.
def basicTestOpts = [
Expand Down

0 comments on commit 59654c7

Please sign in to comment.