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

damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 17718a97eaf Temporarily fix pip check failure on xgboost and grpcio 
(#32432)
17718a97eaf is described below

commit 17718a97eafe46796d0eaf0ac38f134a3adbe2bf
Author: Shunping Huang <shunp...@google.com>
AuthorDate: Thu Sep 12 09:34:01 2024 -0400

    Temporarily fix pip check failure on xgboost and grpcio (#32432)
    
    * Pin pip version to 24.1 so pip check wont't fail
    
    * Trigger precomit python ml tests to verify the fix.
    
    * Pin pip version in pyproject.toml
    
    * Try to enforce pip version in tox.
    
    * Disable xgboost tests by removing xgboost dependency.
    
    * Add tox env for macos
    
    * Revert some unnecessary changes
---
 .github/trigger_files/beam_PreCommit_Python_ML.json |  0
 .github/workflows/python_tests.yml                  |  8 ++++++--
 sdks/python/setup.py                                |  5 ++++-
 sdks/python/tox.ini                                 | 15 +++++++++++++++
 4 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/.github/trigger_files/beam_PreCommit_Python_ML.json 
b/.github/trigger_files/beam_PreCommit_Python_ML.json
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/.github/workflows/python_tests.yml 
b/.github/workflows/python_tests.yml
index 3ef9a5fe26b..e7461be2507 100644
--- a/.github/workflows/python_tests.yml
+++ b/.github/workflows/python_tests.yml
@@ -113,10 +113,14 @@ jobs:
           python-version: ${{ matrix.params.py_ver }}
       - name: Install tox
         run: pip install tox
-      - name: Run tests basic unix
-        if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
+      - name: Run tests basic linux
+        if: startsWith(matrix.os, 'ubuntu')
         working-directory: ./sdks/python
         run: tox -c tox.ini run -e ${{ matrix.params.tox_env }}
+      - name: Run tests basic macos
+        if: startsWith(matrix.os, 'macos')
+        working-directory: ./sdks/python
+        run: tox -c tox.ini run -e ${{ matrix.params.tox_env }}-macos
       - name: Run tests basic windows
         if: startsWith(matrix.os, 'windows')
         working-directory: ./sdks/python
diff --git a/sdks/python/setup.py b/sdks/python/setup.py
index 7bcff2bacfd..dd03c590ce3 100644
--- a/sdks/python/setup.py
+++ b/sdks/python/setup.py
@@ -498,7 +498,10 @@ if __name__ == '__main__':
               'tf2onnx',
               'torch',
               'transformers',
-              'xgboost<2.0',  # https://github.com/apache/beam/issues/31252
+              # Comment out xgboost as it is breaking presubmit python ml
+              # tests due to tag check introduced since pip 24.2
+              # https://github.com/apache/beam/issues/31285
+              # 'xgboost<2.0',  # https://github.com/apache/beam/issues/31252
           ],
           'aws': ['boto3>=1.9,<2'],
           'azure': [
diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini
index aa0200f7500..da4cde009ce 100644
--- a/sdks/python/tox.ini
+++ b/sdks/python/tox.ini
@@ -68,6 +68,21 @@ commands_post =
 commands = false {envname} is misconfigured
 
 [testenv:py{38,39,310,311,312}]
+commands_pre =
+  python --version
+  pip --version
+  pip check
+  bash {toxinidir}/scripts/run_tox_cleanup.sh
+commands =
+  python apache_beam/examples/complete/autocomplete_test.py
+  bash {toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"
+
+[testenv:py{38,39,310,311,312}-macos]
+commands_pre =
+  python --version
+  pip --version
+  # pip check
+  bash {toxinidir}/scripts/run_tox_cleanup.sh
 commands =
   python apache_beam/examples/complete/autocomplete_test.py
   bash {toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"

Reply via email to