stankiewicz opened a new pull request, #40333:
URL: https://github.com/apache/beam/pull/40333
Fixes #39667
## Description
This PR updates `dataflow_cloudml_benchmark_tests_py_versions` in
`sdks/python/test-suites/gradle.properties` from `3.10` to `3.11`.
### Background & Root Cause
The Dataflow TensorFlow Transform benchmark suite
(`:sdks:python:test-suites:dataflow:tftTests`) experienced a worker startup and
execution regression (sdk boot latency ballooned from ~1.5 minutes to ~6
minutes).
Investigation of worker startup logs revealed a pip dependency resolution
conflict triggered by `cloudml/requirements.txt`:
1. **Mutually Exclusive Protobuf Range on Python 3.10:**
* `tensorflow-metadata==1.21.0` (required by `tfx_bsl` and
`tensorflow-transform`) contains a Python `<3.11`-specific constraint:
`protobuf<=6.32;python_version<"3.11"`.
* Beam master recently bumped `google-cloud-bigtable` to `>=2.42.0`,
which strictly requires `protobuf>=6.33.5`.
* On Python 3.10, these ranges do not overlap.
2. **Pip Backtracking & On-Worker Compilation:**
* Pip rejects the pre-installed Beam master build and resolves the
conflict by temporarily downloading `apache-beam==2.75.0` and downgrading
`pyarrow` to `23.0.1`.
* Right after, Gradle's staged `--extra_package` (`apache-beam.tar.gz`)
forces a reinstall of master code, which compiles all Cython/C++ extensions
from source directly on the worker VM. This alone consumes over 4 minutes of
100% CPU on each worker before the harness can even start.
### Solution
In `tensorflow-metadata==1.21.0`'s `setup.py`, the protobuf constraint for
Python 3.11+ has no upper bound:
```python
'protobuf>=4.25.2;python_version>="3.11"'
------------------------
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)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]