diff --git a/.github/trigger_files/beam_PostCommit_Python_Arm.json b/.github/trigger_files/beam_PostCommit_Python_Arm.json index 1efc8e9e4405..62ae7886c573 100644 --- a/.github/trigger_files/beam_PostCommit_Python_Arm.json +++ b/.github/trigger_files/beam_PostCommit_Python_Arm.json @@ -1,4 +1,4 @@ { "comment": "Modify this file in a trivial way to cause this test suite to run", - "modification": 1 + "modification": 4 } diff --git a/.github/workflows/beam_PostCommit_Python_Arm.yml b/.github/workflows/beam_PostCommit_Python_Arm.yml index acefdcc44a94..363e8d73ce5f 100644 --- a/.github/workflows/beam_PostCommit_Python_Arm.yml +++ b/.github/workflows/beam_PostCommit_Python_Arm.yml @@ -105,12 +105,9 @@ jobs: with: gradle-command: :sdks:python:test-suites:dataflow:py${{steps.set_py_ver_clean.outputs.py_ver_clean}}:postCommitArmIT arguments: | - -PuseWheelDistribution \ -PpythonVersion=${{ matrix.python_version }} \ -PusePrebuiltSdkContainer \ env: - # Use multiarch images published by Publish Beam SDK Snapshots. - SDK_CONTAINER_IMAGE: gcr.io/apache-beam-testing/beam-sdk/beam_python${{ matrix.python_version }}_sdk:latest USER: github-actions - name: Archive Python Test Results uses: actions/upload-artifact@v7 diff --git a/sdks/python/test-suites/dataflow/common.gradle b/sdks/python/test-suites/dataflow/common.gradle index abe7867181ec..c56ee263d789 100644 --- a/sdks/python/test-suites/dataflow/common.gradle +++ b/sdks/python/test-suites/dataflow/common.gradle @@ -145,20 +145,22 @@ task postCommitIT { task postCommitArmIT { def pyversion = "${project.ext.pythonVersion.replace('.', '')}" - dependsOn 'initializeForDataflowJob' // When -PusePrebuiltSdkContainer is set, skip building/pushing a multiarch - // SDK image and use SDK_CONTAINER_IMAGE from the environment instead (e.g. - // gcr.io/apache-beam-testing/beam-sdk/beam_python3.x_sdk:latest from Snapshots). + // SDK image and use SDK_CONTAINER_IMAGE from the environment instead. def usePrebuiltSdkContainer = project.rootProject.hasProperty(['usePrebuiltSdkContainer']) - if (!usePrebuiltSdkContainer) { + if (usePrebuiltSdkContainer) { + dependsOn 'installGcpTest' + } else { + dependsOn 'initializeForDataflowJob' dependsOn ":sdks:python:container:py${pyversion}:docker" } doLast { def testOpts = basicPytestOpts + ["--numprocesses=8", "--dist=loadfile"] + def sdkLocation = usePrebuiltSdkContainer ? 'container' : project.ext.sdkLocation def argMap = [ "test_opts": testOpts, - "sdk_location": project.ext.sdkLocation, + "sdk_location": sdkLocation, "suite": "postCommitIT-df${pythonVersionSuffix}", "collect": "it_postcommit", "py_version": project.ext.pythonVersion, @@ -167,6 +169,10 @@ task postCommitArmIT { def cmdArgs = mapToArgString(argMap) exec { executable 'sh' + if (usePrebuiltSdkContainer) { + environment 'SDK_CONTAINER_IMAGE', + "gcr.io/apache-beam-testing/beam-sdk/beam_python${project.ext.pythonVersion}_sdk:${project.sdk_version}" + } args '-c', ". ${envdir}/bin/activate && ${runScriptsDir}/run_integration_test.sh $cmdArgs" } }