SDK_CONTAINER_IMAGE
diff --git a/.github/workflows/beam_PostCommit_Python_Arm.yml b/.github/workflows/beam_PostCommit_Python_Arm.yml index acefdcc..aa946dd 100644 --- a/.github/workflows/beam_PostCommit_Python_Arm.yml +++ b/.github/workflows/beam_PostCommit_Python_Arm.yml
@@ -56,7 +56,7 @@ runs-on: [self-hosted, ubuntu-24.04, main] # Python ARM PostCommit uses prebuilt Snapshots SDK images, so it no longer # spends hours on multiarch container builds. Keep headroom for the IT suite. - timeout-minutes: 180 + timeout-minutes: 360 strategy: fail-fast: false matrix: @@ -105,12 +105,9 @@ 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 abe7867..e998ffe 100644 --- a/sdks/python/test-suites/dataflow/common.gradle +++ b/sdks/python/test-suites/dataflow/common.gradle
@@ -145,20 +145,22 @@ 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 @@ 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" } }