Skip to content

Commit

Permalink
Some more runner v2 cleanup (#27464)
Browse files Browse the repository at this point in the history
* Some more runner v2 cleanup

* Fix suffix

* Remove duplicate tasks

* Remove duplicate tasks

* Syntax
  • Loading branch information
damccorm authored Jul 12, 2023
1 parent 48dacc2 commit 843e7fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ tasks.register("pythonPreCommit") {
tasks.register("pythonPreCommitIT") {
dependsOn(":sdks:python:test-suites:tox:pycommon:preCommitPyCommon")
dependsOn(":sdks:python:test-suites:dataflow:preCommitIT")
dependsOn(":sdks:python:test-suites:dataflow:preCommitIT_V2")
}

tasks.register("pythonDocsPreCommit") {
Expand Down
7 changes: 0 additions & 7 deletions sdks/python/test-suites/dataflow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ task preCommitIT {
}
}

task preCommitIT_V2{
getVersionsAsList('dataflow_precommit_it_task_py_versions').each {
dependsOn.add(":sdks:python:test-suites:dataflow:py${getVersionSuffix(it)}:preCommitIT_batch_V2")
dependsOn.add(":sdks:python:test-suites:dataflow:py${getVersionSuffix(it)}:preCommitIT_streaming_V2")
}
}

task mongodbioIT {
getVersionsAsList('dataflow_mongodbio_it_task_py_versions').each {
dependsOn.add(":sdks:python:test-suites:dataflow:py${getVersionSuffix(it)}:mongodbioIT")
Expand Down
19 changes: 4 additions & 15 deletions sdks/python/test-suites/dataflow/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ def basicPytestOpts = [
"--log-cli-level=INFO", //log level
]

def preCommitIT(String runScriptsDir, String envdir, Boolean streaming, Boolean runnerV2, String pythonSuffix) {
def suffix = runnerV2 ? '_V2' : ''
suffix = streaming ? "_streaming$suffix" : "_batch$suffix"
def preCommitIT(String runScriptsDir, String envdir, Boolean streaming, String pythonSuffix) {
def suffix = streaming ? "_streaming" : "_batch"
task "preCommitIT${suffix}" {
dependsOn 'initializeForDataflowJob'

Expand All @@ -97,9 +96,6 @@ def preCommitIT(String runScriptsDir, String envdir, Boolean streaming, Boolean

if (streaming){
argMap.put("streaming", "true")
argMap.put("runner_v2", "true")
} else if (runnerV2) {
argMap.put("runner_v2", "true")
}

def cmdArgs = mapToArgString(argMap)
Expand All @@ -111,21 +107,14 @@ def preCommitIT(String runScriptsDir, String envdir, Boolean streaming, Boolean
}
}

preCommitIT(runScriptsDir, envdir, false, false, pythonVersionSuffix)
preCommitIT(runScriptsDir, envdir, true, false, pythonVersionSuffix)
preCommitIT(runScriptsDir, envdir, false, true, pythonVersionSuffix)
preCommitIT(runScriptsDir, envdir, true, true, pythonVersionSuffix)
preCommitIT(runScriptsDir, envdir, false, pythonVersionSuffix)
preCommitIT(runScriptsDir, envdir, true, pythonVersionSuffix)

task preCommitIT{
dependsOn preCommitIT_batch
dependsOn preCommitIT_streaming
}

task preCommitIT_V2{
dependsOn preCommitIT_batch_V2
dependsOn preCommitIT_streaming_V2
}

task postCommitIT {
dependsOn 'initializeForDataflowJob'

Expand Down

0 comments on commit 843e7fd

Please sign in to comment.