This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch users/damccorm/repro-36175
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 46b56a0a63caf5667d5335b958d0ab7f9d11a0a5
Author: Danny McCormick <[email protected]>
AuthorDate: Tue Sep 16 15:20:38 2025 -0400

    Update beam_PreCommit_Python_Examples.yml
---
 .../workflows/beam_PreCommit_Python_Examples.yml   | 31 ++++++++++++++++++----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/beam_PreCommit_Python_Examples.yml 
b/.github/workflows/beam_PreCommit_Python_Examples.yml
index 68acb72e0d6..415836d97e2 100644
--- a/.github/workflows/beam_PreCommit_Python_Examples.yml
+++ b/.github/workflows/beam_PreCommit_Python_Examples.yml
@@ -57,8 +57,8 @@ env:
 
 jobs:
   beam_PreCommit_Python_Examples:
-    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ 
matrix.python_version }})
-    runs-on: [self-hosted, ubuntu-20.04, main]
+    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ 
matrix.python_version }}) (${{ join(matrix.os, ', ') }})
+    runs-on: ${{ matrix.os }}
     timeout-minutes: 180
     strategy:
       fail-fast: false
@@ -66,6 +66,22 @@ jobs:
         job_name: ['beam_PreCommit_Python_Examples']
         job_phrase: ['Run Python_Examples PreCommit']
         python_version: ['3.9','3.10','3.11','3.12']
+        # Run on both self-hosted and GitHub-hosted runners.
+        # Some tests (marked require_docker_in_docker) can't run on Beam's
+        # self-hosted runners due to Docker-in-Docker environment constraint.
+        # These tests will only execute on ubuntu-latest (GitHub-hosted).
+        # Context: https://github.com/apache/beam/pull/35585.
+        os: [[self-hosted, ubuntu-20.04, main], [ubuntu-latest]]
+        exclude:
+          # Temporary exclude Python 3.9, 3.10, 3.11 from ubuntu-latest. This
+          # results in pip dependency resolution exceeded maximum depth issue.
+          # Context: https://github.com/apache/beam/pull/35816.
+          - python_version: '3.9'
+            os: [ubuntu-latest]
+          - python_version: '3.10'
+            os: [ubuntu-latest]
+          - python_version: '3.11'
+            os: [ubuntu-latest]
     if: |
       github.event_name == 'push' ||
       github.event_name == 'pull_request_target' ||
@@ -79,7 +95,7 @@ jobs:
         with:
           comment_phrase: ${{ matrix.job_phrase }} ${{ matrix.python_version }}
           github_token: ${{ secrets.GITHUB_TOKEN }}
-          github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ 
matrix.python_version }})
+          github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ 
matrix.python_version }}) (${{ join(matrix.os, ', ') }})
       - name: Setup environment
         uses: ./.github/actions/setup-environment-action
         with:
@@ -96,13 +112,17 @@ jobs:
         with:
           gradle-command: 
:sdks:python:test-suites:tox:py${{steps.set_py_ver_clean.outputs.py_ver_clean}}:preCommitPy${{steps.set_py_ver_clean.outputs.py_ver_clean}}
           arguments: |
-            -Pposargs=apache_beam/examples/ \
+            -Pposargs="${{
+              contains(matrix.os, 'self-hosted') &&
+              'apache_beam/examples/ -m (not require_docker_in_docker)' ||
+                'apache_beam/examples/ -m require_docker_in_docker'
+            }}" \
             -PpythonVersion=${{ matrix.python_version }}
       - name: Archive Python Test Results
         uses: actions/upload-artifact@v4
         if: failure()
         with:
-          name: Python ${{ matrix.python_version }} Test Results
+          name: Python ${{ matrix.python_version }} Test Results (${{ 
join(matrix.os, ', ') }})
           path: '**/pytest*.xml'
       - name: Publish Python Test Results
         uses: EnricoMi/publish-unit-test-result-action@v2
@@ -112,3 +132,4 @@ jobs:
           comment_mode: ${{ github.event_name == 'issue_comment'  && 'always' 
|| 'off' }}
           files: '**/pytest*.xml'
           large_files: true
+          check_name: "Python ${{ matrix.python_version }} Test Results (${{ 
join(matrix.os, ', ') }})"

Reply via email to