-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-6907] Simply test setup by reusing Python tarball in tox & dataflow integration tests #9277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -20,6 +20,10 @@ plugins { id 'org.apache.beam.module' } | |||
| applyPythonNature() | ||||
| enablePythonPerformanceTest() | ||||
|
|
||||
| dependencies { | ||||
| distTarBall project(path: ":sdks:python", configuration: "distTarBall") | ||||
| } | ||||
|
|
||||
| def runScriptsDir = "${project.rootDir}/sdks/python/scripts" | ||||
|
|
||||
| // Basic test options for ITs running on Jenkins. | ||||
|
|
@@ -29,7 +33,7 @@ def basicTestOpts = [ | |||
| "--process-timeout=4500", // timeout of whole command execution | ||||
| ] | ||||
|
|
||||
| task preCommitIT(dependsOn: ['sdist', 'installGcpTest']) { | ||||
| task preCommitIT(dependsOn: [':sdks:python:sdist', 'installGcpTest']) { | ||||
| dependsOn ":runners:google-cloud-dataflow-java:worker:shadowJar" | ||||
|
|
||||
| def dataflowWorkerJar = project(":runners:google-cloud-dataflow-java:worker").shadowJar.archivePath | ||||
|
|
@@ -48,7 +52,7 @@ task preCommitIT(dependsOn: ['sdist', 'installGcpTest']) { | |||
| ] | ||||
| def cmdArgs = project.mapToArgString([ | ||||
| "test_opts": testOpts, | ||||
| "sdk_location": "${project.buildDir}/apache-beam.tar.gz", | ||||
| "sdk_location": files(configurations.distTarBall.files).singleFile, | ||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line actually can be removed for all similar integration tests sine the default
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am ok to keep this. It feels like there may be a shorter way to reference the file defined by this configuration. Did you try beam/sdks/python/container/build.gradle Line 46 in 28a4057
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm afraid not. We need full path of this tarball, but |
||||
| "worker_jar": dataflowWorkerJar, | ||||
| "suite": "preCommitIT-df" | ||||
| ]) | ||||
|
|
@@ -61,7 +65,7 @@ task preCommitIT(dependsOn: ['sdist', 'installGcpTest']) { | |||
| } | ||||
|
|
||||
| // Run PostCommit integration tests on default runner (TestDataflowRunner) | ||||
| task postCommitIT(dependsOn: ['installGcpTest', 'sdist']) { | ||||
| task postCommitIT(dependsOn: ['installGcpTest', ':sdks:python:sdist']) { | ||||
| dependsOn ":runners:google-cloud-dataflow-java:worker:shadowJar" | ||||
|
|
||||
| def dataflowWorkerJar = project(":runners:google-cloud-dataflow-java:worker").shadowJar.archivePath | ||||
|
|
@@ -70,7 +74,7 @@ task postCommitIT(dependsOn: ['installGcpTest', 'sdist']) { | |||
| def testOpts = basicTestOpts + ["--attr=IT"] | ||||
| def cmdArgs = project.mapToArgString(["test_opts": testOpts, | ||||
| "worker_jar": dataflowWorkerJar, | ||||
| "sdk_location": "${project.buildDir}/apache-beam.tar.gz", | ||||
| "sdk_location": files(configurations.distTarBall.files).singleFile, | ||||
| "suite": "postCommitIT-df"]) | ||||
| exec { | ||||
| executable 'sh' | ||||
|
|
@@ -79,7 +83,7 @@ task postCommitIT(dependsOn: ['installGcpTest', 'sdist']) { | |||
| } | ||||
| } | ||||
|
|
||||
| task validatesRunnerBatchTests(dependsOn: ['installGcpTest', 'sdist']) { | ||||
| task validatesRunnerBatchTests(dependsOn: ['installGcpTest', ':sdks:python:sdist']) { | ||||
| dependsOn ":runners:google-cloud-dataflow-java:worker:shadowJar" | ||||
|
|
||||
| def dataflowWorkerJar = project(":runners:google-cloud-dataflow-java:worker").shadowJar.archivePath | ||||
|
|
@@ -88,7 +92,7 @@ task validatesRunnerBatchTests(dependsOn: ['installGcpTest', 'sdist']) { | |||
| def testOpts = basicTestOpts + ["--attr=ValidatesRunner"] | ||||
| def cmdArgs = project.mapToArgString(["test_opts": testOpts, | ||||
| "worker_jar": dataflowWorkerJar, | ||||
| "sdk_location": "${project.buildDir}/apache-beam.tar.gz", | ||||
| "sdk_location": files(configurations.distTarBall.files).singleFile, | ||||
| "suite": "validatesRunnerBatchTests-df"]) | ||||
| exec { | ||||
| executable 'sh' | ||||
|
|
@@ -97,7 +101,7 @@ task validatesRunnerBatchTests(dependsOn: ['installGcpTest', 'sdist']) { | |||
| } | ||||
| } | ||||
|
|
||||
| task validatesRunnerStreamingTests(dependsOn: ['installGcpTest', 'sdist']) { | ||||
| task validatesRunnerStreamingTests(dependsOn: ['installGcpTest', ':sdks:python:sdist']) { | ||||
| dependsOn ":runners:google-cloud-dataflow-java:worker:shadowJar" | ||||
|
|
||||
| def dataflowWorkerJar = project(":runners:google-cloud-dataflow-java:worker").shadowJar.archivePath | ||||
|
|
@@ -108,7 +112,7 @@ task validatesRunnerStreamingTests(dependsOn: ['installGcpTest', 'sdist']) { | |||
| def argMap = ["test_opts": testOpts, | ||||
| "streaming": "true", | ||||
| "worker_jar": dataflowWorkerJar, | ||||
| "sdk_location": "${project.buildDir}/apache-beam.tar.gz", | ||||
| "sdk_location": files(configurations.distTarBall.files).singleFile, | ||||
| "suite": "validatesRunnerStreamingTests-df"] | ||||
| def cmdArgs = project.mapToArgString(argMap) | ||||
| exec { | ||||
|
|
@@ -118,11 +122,11 @@ task validatesRunnerStreamingTests(dependsOn: ['installGcpTest', 'sdist']) { | |||
| } | ||||
| } | ||||
|
|
||||
| task dataflowChicagoTaxiExample(dependsOn: ['installGcpTest', 'sdist']) { | ||||
| task dataflowChicagoTaxiExample(dependsOn: ['installGcpTest', ':sdks:python:sdist']) { | ||||
|
|
||||
| def gcsRoot = findProperty('gcsRoot') | ||||
| def runner = findProperty('runner') | ||||
| def cliArgs = "${gcsRoot} ${runner} ${project.buildDir}/apache-beam.tar.gz" | ||||
| def cliArgs = "${gcsRoot} ${runner} ${files(configurations.distTarBall.files).singleFile}" | ||||
|
|
||||
| doLast { | ||||
| exec { | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR - do you remember why do we pass a tarball to tox suite? It looks like we started doing that with #8067.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox will build tarball for venv install automatically if not provided. This build depends on shared file when running in parallel and cause our test flaky. So we prebuild the tarball and pass it from
--installpkgflag to avoid that issue.