Skip to content

Commit 8fef194

Browse files
authored
build: Explicit protobuf build version; consistent build/setup deps (feast-dev#4472)
build: explicit protobuf build version; consistent build/setup deps Right now if one downloads `feast-0.40.1-py2.py3-none-any.whl` from PyPi it contains: ``` $ grep 'Protobuf Python Version' feast/protos/feast/registry/RegistryServer_pb2.py ``` Which is outside ``` $ grep 'protobuf<' feast-0.40.1.dist-info/METADATA Requires-Dist: protobuf<5.0.0,>=4.24.0 ``` Leading to runtime errors (feast-dev#4437). This was mitigated by feast-dev#4438. This change tightens this up further by: * Deleting the Makefile command that was trying to do this unsuccessfully. * Aligns the setup/build requirements * Sets the version of protobuf to match the *minimum* of the range. There is no guarantee that protos generated by `4.X` will work with `4.(X-1)`. Signed-off-by: Chris Burroughs <[email protected]>
1 parent 484240c commit 8fef194

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

.github/workflows/build_wheels.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ jobs:
9797
# There's a `git restore` in here because `make install-go-ci-dependencies` is actually messing up go.mod & go.sum.
9898
run: |
9999
pip install -U pip setuptools wheel twine
100-
make install-protoc-dependencies
101100
make build-ui
102101
git status
103102
git restore go.mod go.sum

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,6 @@ test-trino-plugin-locally:
395395
kill-trino-locally:
396396
cd ${ROOT_DIR}; docker stop trino
397397

398-
install-protoc-dependencies:
399-
pip install --ignore-installed protobuf==4.24.0 "grpcio-tools>=1.56.2,<2" mypy-protobuf==3.1.0
400-
401398
# Docker
402399

403400
build-docker: build-feature-server-python-aws-docker build-feature-transformation-server-docker build-feature-server-java-docker

environment-setup.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ pip install cryptography -U
1313
conda install protobuf
1414
conda install pymssql
1515
pip install -e ".[dev]"
16-
make install-protoc-dependencies PYTHON=3.9
1716
make install-python-ci-dependencies PYTHON=3.9
1817
```
1918
4. start the docker daemon
2019
5. run unit tests:
2120
```bash
2221
make test-python-unit
23-
```
22+
```

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[build-system]
22
requires = [
3+
"grpcio-tools>=1.56.2,<2",
4+
"grpcio>=1.56.2,<2",
5+
"mypy-protobuf==3.1",
6+
"protobuf==4.24.0",
7+
"pybindgen==0.22.0",
38
"setuptools>=60",
4-
"wheel",
59
"setuptools_scm>=6.2",
6-
"grpcio",
7-
"grpcio-tools>=1.47.0",
8-
"mypy-protobuf==3.1",
9-
"protobuf>=4.24.0,<5.0.0",
1010
"sphinx!=4.0.0",
11+
"wheel",
1112
]
1213
build-backend = "setuptools.build_meta"
1314

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,12 @@ def run(self):
403403
entry_points={"console_scripts": ["feast=feast.cli:cli"]},
404404
use_scm_version=use_scm_version,
405405
setup_requires=[
406-
"setuptools_scm",
407-
"grpcio>=1.56.2,<2",
408406
"grpcio-tools>=1.56.2,<2",
409-
"mypy-protobuf>=3.1",
407+
"grpcio>=1.56.2,<2",
408+
"mypy-protobuf==3.1",
409+
"protobuf==4.24.0",
410410
"pybindgen==0.22.0",
411+
"setuptools_scm>=6.2",
411412
],
412413
cmdclass={
413414
"build_python_protos": BuildPythonProtosCommand,

0 commit comments

Comments
 (0)