This is an automated email from the ASF dual-hosted git repository.
damondouglas pushed a commit to branch fix-distroless-wfs
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/fix-distroless-wfs by this
push:
new d9a1f01399a Update common.gradle
d9a1f01399a is described below
commit d9a1f01399ab53013718ba80b3550f5a61ebe7d8
Author: Damon <[email protected]>
AuthorDate: Thu Jan 16 13:26:46 2025 -0800
Update common.gradle
---
sdks/python/test-suites/dataflow/common.gradle | 44 ++++++++------------------
1 file changed, 14 insertions(+), 30 deletions(-)
diff --git a/sdks/python/test-suites/dataflow/common.gradle
b/sdks/python/test-suites/dataflow/common.gradle
index 0b02baa5348..1c30e7dfb72 100644
--- a/sdks/python/test-suites/dataflow/common.gradle
+++ b/sdks/python/test-suites/dataflow/common.gradle
@@ -382,39 +382,23 @@ task validatesContainer() {
task validatesDistrolessContainer() {
def pyversion = "${project.ext.pythonVersion.replace('.', '')}"
- dependsOn ":sdks:python:container:distroless:py${pyversion}:dockerPush"
-
- def name = project.docker_image_default_repo_prefix +
"python${project.ext.pythonVersion}_sdk_distroless"
-
- def root = project.rootProject.hasProperty(["docker-repository-root"]) ?
- project.rootProject["docker-repository-root"] :
- project.docker_image_default_repo_root
-
- def tag = project.rootProject.hasProperty(["docker-tag"]) ?
- project.rootProject["docker-tag"] : project.sdk_version
-
- def imageURL = containerImageName(
- name: name,
- root: root,
- tag: tag)
-
+ if (project.hasProperty("testRCDependencies")) {
+ // Generate a requirements file with pre-release versions for the docker
task
+ // if testing with pre-release dependencies.
+ dependsOn
":sdks:python:container:py${pyversion}:generatePythonRequirements"
+ mustRunAfter
":sdks:python:container:py${pyversion}:generatePythonRequirements"
+ }
+ dependsOn 'initializeForDataflowJob'
+ dependsOn ":sdks:python:container:py${pyversion}:docker"
+ def runScriptsPath =
"${rootDir}/sdks/python/container/run_validatescontainer.sh"
doLast {
exec {
- def testTarget =
"apache_beam/examples/wordcount_it_test.py::WordCountIT::test_wordcount_it"
- def argMap = [
- "output" :
"gs://temp-storage-for-end-to-end-tests/py-it-cloud/output",
- "project" : "apache-beam-testing",
- "region" : "us-central1",
- "runner" : "TestDataflowRunner",
- "sdk_container_image": "${imageURL}",
- "sdk_location" : "container",
- "staging_location" :
"gs://temp-storage-for-end-to-end-tests/staging-it",
- "temp_location" :
"gs://temp-storage-for-end-to-end-tests/temp-it",
- ]
- def cmdArgs = mapToArgString(argMap)
- workingDir = "${rootDir}/sdks/python"
+ environment 'IMAGE_SUFFIX', '_distroless'
+ environment 'TEST_MARK', 'examples_postcommit'
executable 'sh'
- args '-c', ". ${envdir}/bin/activate && pytest ${testTarget}
--test-pipeline-options=\"${cmdArgs}\""
+ args '-c', ". ${envdir}/bin/activate && cd ${rootDir} &&
${runScriptsPath} " +
+ "${project.ext.pythonVersion} " +
+ "container"
}
}
}