You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "Abacn (via GitHub)" <gi...@apache.org> on 2026/04/30 18:30:16 UTC

[PR] Move Python PreCommit middle versions to PostCommit [beam]

Abacn opened a new pull request, #38347:
URL: https://github.com/apache/beam/pull/38347

   **Please** add a meaningful description for your change here
   
   This will decrease the number of workflows run in open PR by 3*5=15. These tests still run upon push event
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/actions/workflows/build_wheels.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/actions/workflows/python_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/actions/workflows/java_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/actions/workflows/go_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on PR #38347:
URL: https://github.com/apache/beam/pull/38347#issuecomment-4355191362

   > [!NOTE]
   > Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #38347:
URL: https://github.com/apache/beam/pull/38347#issuecomment-4355252165

   R: @aIbrahiim @damccorm 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #38347:
URL: https://github.com/apache/beam/pull/38347#discussion_r3173595618


##########
.github/workflows/beam_PostCommit_Python_Versions.yml:
##########
@@ -0,0 +1,149 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: PostCommit Python Versions
+on:
+  pull_request_target:
+    branches: [ "master", "release-*" ]
+    paths: ['release/trigger_all_tests.json', '.github/trigger_files/beam_PostCommit_Python_Versions.json']
+  push:
+    tags: ['v*']
+    branches: ['master', 'release-*']
+    paths: [ "model/**","sdks/python/**",".github/workflows/beam_PostCommit_Python_Versions.yml"]
+  schedule:
+    - cron: '0 3/6 * * *'
+  workflow_dispatch:
+
+#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+permissions:
+  actions: write
+  pull-requests: write
+  checks: write
+  contents: read
+  deployments: read
+  id-token: none
+  issues: write
+  discussions: read
+  packages: read
+  pages: read
+  repository-projects: read
+  security-events: read
+  statuses: read
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.event.pull_request.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}'
+  cancel-in-progress: true
+
+env:
+  DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+  GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
+  GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
+  # Aggressive stability settings for flaky CI environment
+  PYTHONHASHSEED: "0"
+  OMP_NUM_THREADS: "1"
+  OPENBLAS_NUM_THREADS: "1"
+  # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed.
+  GRPC_ENABLE_FORK_SUPPORT: "0"
+  # gRPC stability - more conservative for unstable networks
+  GRPC_ARG_KEEPALIVE_TIME_MS: "10000"
+  GRPC_ARG_KEEPALIVE_TIMEOUT_MS: "15000"
+  GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS: "1"
+  GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA: "0"
+  GRPC_ARG_MAX_RECONNECT_BACKOFF_MS: "30000"
+  # Beam-specific - very generous timeouts
+  BEAM_RETRY_MAX_ATTEMPTS: "5"
+  BEAM_RETRY_INITIAL_DELAY_MS: "5000"
+  BEAM_RETRY_MAX_DELAY_MS: "120000"
+  # Force stable execution
+  BEAM_TESTING_FORCE_SINGLE_BUNDLE: "true"
+  BEAM_TESTING_DETERMINISTIC_ORDER: "true"
+
+jobs:
+  beam_PostCommit_Python_Versions:
+    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
+    runs-on: [self-hosted, ubuntu-24.04, main]
+    timeout-minutes: 180
+    strategy:
+      fail-fast: false
+      matrix:
+        job_name: ['beam_PostCommit_Python_Versions']
+        job_phrase: ['Run Python Version PostCommit']
+        python_version: ['3.11','3.12','3.13'] # Run Python PreCommit tests on "middle" versions
+    if: |
+      github.event_name == 'push' ||
+      github.event_name == 'pull_request_target' ||
+      (github.event_name == 'schedule' && github.repository == 'apache/beam') ||
+      github.event_name == 'workflow_dispatch'
+    steps:
+      - uses: actions/checkout@v4
+      - name: Setup repository
+        uses: ./.github/actions/setup-action
+        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 }})
+      - name: Setup environment
+        uses: ./.github/actions/setup-environment-action
+        with:
+          java-version: default
+          python-version: ${{ matrix.python_version }}
+      - name: Set PY_VER_CLEAN
+        id: set_py_ver_clean
+        run: |
+          PY_VER=${{ matrix.python_version }}
+          PY_VER_CLEAN=${PY_VER//.}
+          echo "py_ver_clean=$PY_VER_CLEAN" >> $GITHUB_OUTPUT
+      - name: Run pythonPreCommit
+        env:
+          TOX_TESTENV_PASSENV: "DOCKER_*,TESTCONTAINERS_*,TC_*,BEAM_*,GRPC_*,OMP_*,OPENBLAS_*,PYTHONHASHSEED,PYTEST_*"
+          # Aggressive retry and timeout settings for flaky CI
+          PYTEST_ADDOPTS: "-v --tb=short --maxfail=5 --durations=30 --reruns=5 --reruns-delay=15 --timeout=600 --disable-warnings"
+          # Container stability - much more generous timeouts
+          TC_TIMEOUT: "300"
+          TC_MAX_TRIES: "15"
+          TC_SLEEP_TIME: "5"
+          # Additional gRPC stability for flaky environment
+          GRPC_ARG_KEEPALIVE_TIME_MS: "60000"
+          GRPC_ARG_KEEPALIVE_TIMEOUT_MS: "60000"
+          GRPC_ARG_MAX_CONNECTION_IDLE_MS: "60000"
+          GRPC_ARG_HTTP2_BDP_PROBE: "1"
+          GRPC_ARG_SO_REUSEPORT: "1"
+          # Force sequential execution to reduce load
+          PYTEST_XDIST_WORKER_COUNT: "1"
+          # Additional gRPC settings
+          GRPC_ARG_MAX_RECONNECT_BACKOFF_MS: "120000"
+          GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS: "2000"
+          BEAM_RUNNER_BUNDLE_TIMEOUT_MS: "600000"
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        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: |
+            -PpythonVersion=${{ matrix.python_version }} \
+            -Pposargs="--ignore=apache_beam/ml/" \

Review Comment:
   Here it copied PreCommit Python where this exclusion also exists.
   
   
   Python PreCommit ML remains untouched (exercise all supported py version) because I remember we do saw version specific issues for ML dependencies, and also PreCommit ML runs different tox target (due to different extension installed)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #38347:
URL: https://github.com/apache/beam/pull/38347#issuecomment-4355199823

   Testing: https://github.com/apache/beam/actions/runs/25182293605/job/73830368204


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on code in PR #38347:
URL: https://github.com/apache/beam/pull/38347#discussion_r3173487018


##########
.github/workflows/beam_PostCommit_Python_Versions.yml:
##########
@@ -0,0 +1,149 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: PostCommit Python Versions
+on:
+  pull_request_target:
+    branches: [ "master", "release-*" ]
+    paths: ['release/trigger_all_tests.json', '.github/trigger_files/beam_PostCommit_Python_Versions.json']
+  push:
+    tags: ['v*']
+    branches: ['master', 'release-*']
+    paths: [ "model/**","sdks/python/**",".github/workflows/beam_PostCommit_Python_Versions.yml"]
+  schedule:
+    - cron: '0 3/6 * * *'
+  workflow_dispatch:
+
+#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+permissions:
+  actions: write
+  pull-requests: write
+  checks: write
+  contents: read
+  deployments: read
+  id-token: none
+  issues: write
+  discussions: read
+  packages: read
+  pages: read
+  repository-projects: read
+  security-events: read
+  statuses: read
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.event.pull_request.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}'
+  cancel-in-progress: true
+
+env:
+  DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+  GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
+  GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
+  # Aggressive stability settings for flaky CI environment
+  PYTHONHASHSEED: "0"
+  OMP_NUM_THREADS: "1"
+  OPENBLAS_NUM_THREADS: "1"
+  # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed.
+  GRPC_ENABLE_FORK_SUPPORT: "0"
+  # gRPC stability - more conservative for unstable networks
+  GRPC_ARG_KEEPALIVE_TIME_MS: "10000"
+  GRPC_ARG_KEEPALIVE_TIMEOUT_MS: "15000"
+  GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS: "1"
+  GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA: "0"
+  GRPC_ARG_MAX_RECONNECT_BACKOFF_MS: "30000"
+  # Beam-specific - very generous timeouts
+  BEAM_RETRY_MAX_ATTEMPTS: "5"
+  BEAM_RETRY_INITIAL_DELAY_MS: "5000"
+  BEAM_RETRY_MAX_DELAY_MS: "120000"
+  # Force stable execution
+  BEAM_TESTING_FORCE_SINGLE_BUNDLE: "true"
+  BEAM_TESTING_DETERMINISTIC_ORDER: "true"
+
+jobs:
+  beam_PostCommit_Python_Versions:
+    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
+    runs-on: [self-hosted, ubuntu-24.04, main]
+    timeout-minutes: 180
+    strategy:
+      fail-fast: false
+      matrix:
+        job_name: ['beam_PostCommit_Python_Versions']
+        job_phrase: ['Run Python Version PostCommit']
+        python_version: ['3.11','3.12','3.13'] # Run Python PreCommit tests on "middle" versions
+    if: |
+      github.event_name == 'push' ||
+      github.event_name == 'pull_request_target' ||
+      (github.event_name == 'schedule' && github.repository == 'apache/beam') ||
+      github.event_name == 'workflow_dispatch'
+    steps:
+      - uses: actions/checkout@v4
+      - name: Setup repository
+        uses: ./.github/actions/setup-action
+        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 }})
+      - name: Setup environment
+        uses: ./.github/actions/setup-environment-action
+        with:
+          java-version: default
+          python-version: ${{ matrix.python_version }}
+      - name: Set PY_VER_CLEAN
+        id: set_py_ver_clean
+        run: |
+          PY_VER=${{ matrix.python_version }}
+          PY_VER_CLEAN=${PY_VER//.}
+          echo "py_ver_clean=$PY_VER_CLEAN" >> $GITHUB_OUTPUT
+      - name: Run pythonPreCommit
+        env:
+          TOX_TESTENV_PASSENV: "DOCKER_*,TESTCONTAINERS_*,TC_*,BEAM_*,GRPC_*,OMP_*,OPENBLAS_*,PYTHONHASHSEED,PYTEST_*"
+          # Aggressive retry and timeout settings for flaky CI
+          PYTEST_ADDOPTS: "-v --tb=short --maxfail=5 --durations=30 --reruns=5 --reruns-delay=15 --timeout=600 --disable-warnings"
+          # Container stability - much more generous timeouts
+          TC_TIMEOUT: "300"
+          TC_MAX_TRIES: "15"
+          TC_SLEEP_TIME: "5"
+          # Additional gRPC stability for flaky environment
+          GRPC_ARG_KEEPALIVE_TIME_MS: "60000"
+          GRPC_ARG_KEEPALIVE_TIMEOUT_MS: "60000"
+          GRPC_ARG_MAX_CONNECTION_IDLE_MS: "60000"
+          GRPC_ARG_HTTP2_BDP_PROBE: "1"
+          GRPC_ARG_SO_REUSEPORT: "1"
+          # Force sequential execution to reduce load
+          PYTEST_XDIST_WORKER_COUNT: "1"
+          # Additional gRPC settings
+          GRPC_ARG_MAX_RECONNECT_BACKOFF_MS: "120000"
+          GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS: "2000"
+          BEAM_RUNNER_BUNDLE_TIMEOUT_MS: "600000"
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        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: |
+            -PpythonVersion=${{ matrix.python_version }} \
+            -Pposargs="--ignore=apache_beam/ml/" \

Review Comment:
   Is there a reason to special case ML?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #38347:
URL: https://github.com/apache/beam/pull/38347#discussion_r3170091345


##########
.github/workflows/beam_PreCommit_Python.yml:
##########
@@ -150,13 +150,3 @@ jobs:
           comment_mode: ${{ github.event_name == 'issue_comment'  && 'always' || 'off' }}
           files: '**/pytest*.xml'
           large_files: true
-      - name: Cleanup

Review Comment:
   This part looks suspicious. While pods within a VM should be isolated, not sure it's related to recent elevated flakiness that random python tests failed for no reason



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38347:
URL: https://github.com/apache/beam/pull/38347#issuecomment-4355262286

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment `assign set of reviewers`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #38347:
URL: https://github.com/apache/beam/pull/38347#discussion_r3173595618


##########
.github/workflows/beam_PostCommit_Python_Versions.yml:
##########
@@ -0,0 +1,149 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: PostCommit Python Versions
+on:
+  pull_request_target:
+    branches: [ "master", "release-*" ]
+    paths: ['release/trigger_all_tests.json', '.github/trigger_files/beam_PostCommit_Python_Versions.json']
+  push:
+    tags: ['v*']
+    branches: ['master', 'release-*']
+    paths: [ "model/**","sdks/python/**",".github/workflows/beam_PostCommit_Python_Versions.yml"]
+  schedule:
+    - cron: '0 3/6 * * *'
+  workflow_dispatch:
+
+#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+permissions:
+  actions: write
+  pull-requests: write
+  checks: write
+  contents: read
+  deployments: read
+  id-token: none
+  issues: write
+  discussions: read
+  packages: read
+  pages: read
+  repository-projects: read
+  security-events: read
+  statuses: read
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.event.pull_request.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}'
+  cancel-in-progress: true
+
+env:
+  DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+  GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
+  GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
+  # Aggressive stability settings for flaky CI environment
+  PYTHONHASHSEED: "0"
+  OMP_NUM_THREADS: "1"
+  OPENBLAS_NUM_THREADS: "1"
+  # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed.
+  GRPC_ENABLE_FORK_SUPPORT: "0"
+  # gRPC stability - more conservative for unstable networks
+  GRPC_ARG_KEEPALIVE_TIME_MS: "10000"
+  GRPC_ARG_KEEPALIVE_TIMEOUT_MS: "15000"
+  GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS: "1"
+  GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA: "0"
+  GRPC_ARG_MAX_RECONNECT_BACKOFF_MS: "30000"
+  # Beam-specific - very generous timeouts
+  BEAM_RETRY_MAX_ATTEMPTS: "5"
+  BEAM_RETRY_INITIAL_DELAY_MS: "5000"
+  BEAM_RETRY_MAX_DELAY_MS: "120000"
+  # Force stable execution
+  BEAM_TESTING_FORCE_SINGLE_BUNDLE: "true"
+  BEAM_TESTING_DETERMINISTIC_ORDER: "true"
+
+jobs:
+  beam_PostCommit_Python_Versions:
+    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
+    runs-on: [self-hosted, ubuntu-24.04, main]
+    timeout-minutes: 180
+    strategy:
+      fail-fast: false
+      matrix:
+        job_name: ['beam_PostCommit_Python_Versions']
+        job_phrase: ['Run Python Version PostCommit']
+        python_version: ['3.11','3.12','3.13'] # Run Python PreCommit tests on "middle" versions
+    if: |
+      github.event_name == 'push' ||
+      github.event_name == 'pull_request_target' ||
+      (github.event_name == 'schedule' && github.repository == 'apache/beam') ||
+      github.event_name == 'workflow_dispatch'
+    steps:
+      - uses: actions/checkout@v4
+      - name: Setup repository
+        uses: ./.github/actions/setup-action
+        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 }})
+      - name: Setup environment
+        uses: ./.github/actions/setup-environment-action
+        with:
+          java-version: default
+          python-version: ${{ matrix.python_version }}
+      - name: Set PY_VER_CLEAN
+        id: set_py_ver_clean
+        run: |
+          PY_VER=${{ matrix.python_version }}
+          PY_VER_CLEAN=${PY_VER//.}
+          echo "py_ver_clean=$PY_VER_CLEAN" >> $GITHUB_OUTPUT
+      - name: Run pythonPreCommit
+        env:
+          TOX_TESTENV_PASSENV: "DOCKER_*,TESTCONTAINERS_*,TC_*,BEAM_*,GRPC_*,OMP_*,OPENBLAS_*,PYTHONHASHSEED,PYTEST_*"
+          # Aggressive retry and timeout settings for flaky CI
+          PYTEST_ADDOPTS: "-v --tb=short --maxfail=5 --durations=30 --reruns=5 --reruns-delay=15 --timeout=600 --disable-warnings"
+          # Container stability - much more generous timeouts
+          TC_TIMEOUT: "300"
+          TC_MAX_TRIES: "15"
+          TC_SLEEP_TIME: "5"
+          # Additional gRPC stability for flaky environment
+          GRPC_ARG_KEEPALIVE_TIME_MS: "60000"
+          GRPC_ARG_KEEPALIVE_TIMEOUT_MS: "60000"
+          GRPC_ARG_MAX_CONNECTION_IDLE_MS: "60000"
+          GRPC_ARG_HTTP2_BDP_PROBE: "1"
+          GRPC_ARG_SO_REUSEPORT: "1"
+          # Force sequential execution to reduce load
+          PYTEST_XDIST_WORKER_COUNT: "1"
+          # Additional gRPC settings
+          GRPC_ARG_MAX_RECONNECT_BACKOFF_MS: "120000"
+          GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS: "2000"
+          BEAM_RUNNER_BUNDLE_TIMEOUT_MS: "600000"
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        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: |
+            -PpythonVersion=${{ matrix.python_version }} \
+            -Pposargs="--ignore=apache_beam/ml/" \

Review Comment:
   Python PreCommit ML remains untouched because I remember we do saw version specific issues for ML dependencies, and also PreCommit ML runs different tox target (due to different extension installed)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Move Python PreCommit middle versions to PostCommit [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn merged PR #38347:
URL: https://github.com/apache/beam/pull/38347


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org