Skip to content

Commit

Permalink
lower grpcio versions for build
Browse files Browse the repository at this point in the history
  • Loading branch information
zabarn committed Sep 12, 2024
1 parent 38478f6 commit c7221dc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ install-go-ci-dependencies:
python -m pip install "pybindgen==0.22.1" "protobuf>=4.24.0,<5"

compile-protos-go: install-go-proto-dependencies
pip install --ignore-installed "protobuf==4.25.4" "grpcio-tools<=1.56.2,<2" mypy-protobuf==3.1.0
pip install --ignore-installed "protobuf==4.25.4" "grpcio-tools<=1.56.0" mypy-protobuf==3.1.0
python setup.py build_go_protos

install-feast-ci-locally:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"grpcio-tools>=1.56.2,<2",
"grpcio>=1.56.2,<2",
"grpcio-tools<=1.56.0",
"grpcio<=1.56.0",
"mypy-protobuf==3.1",
"protobuf==4.25.4",
"pybindgen==0.22.0",
Expand Down
32 changes: 19 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@
]

GRPCIO_REQUIRED = [
"grpcio>=1.56.2,<2",
"grpcio-tools>=1.56.2,<2",
"grpcio-reflection>=1.56.2,<2",
"grpcio-health-checking>=1.56.2,<2",
"grpcio<=1.56.0",
"grpcio-tools<=1.56.0",
"grpcio-reflection<=1.56.0",
"grpcio-health-checking<=1.56.0",
]

DUCKDB_REQUIRED = ["ibis-framework[duckdb]>=9.0.0,<10"]
Expand All @@ -167,7 +167,7 @@
"virtualenv==20.23.0",
"cryptography>=35.0,<43",
"ruff>=0.3.3",
"grpcio-testing>=1.56.2,<2",
"grpcio-testing<=1.56.0",
# FastAPI does not correctly pull starlette dependency on httpx see thread(https://github.com/tiangolo/fastapi/issues/5656).
"httpx>=0.23.3",
"minio==7.1.0",
Expand Down Expand Up @@ -248,7 +248,8 @@

# Only set use_scm_version if git executable exists (setting this variable causes pip to use git under the hood)
if shutil.which("git"):
use_scm_version = {"root": ".", "relative_to": __file__, "tag_regex": TAG_REGEX}
use_scm_version = {"root": ".",
"relative_to": __file__, "tag_regex": TAG_REGEX}
else:
use_scm_version = None

Expand Down Expand Up @@ -280,7 +281,8 @@ def finalize_options(self):
def python_folder(self):
if self.inplace:
return os.path.join(
os.path.dirname(__file__) or os.getcwd(), "sdk/python/feast/protos"
os.path.dirname(__file__) or os.getcwd(
), "sdk/python/feast/protos"
)

return os.path.join(self.build_lib, "feast/protos")
Expand Down Expand Up @@ -352,17 +354,20 @@ def _ensure_go_and_proto_toolchain():
semver_string = re.search(r"go[\S]+", str(version)).group().lstrip("go")
parts = semver_string.split(".")
if not (int(parts[0]) >= 1 and int(parts[1]) >= 16):
raise RuntimeError(f"Go compiler too old; expected 1.16+ found {semver_string}")
raise RuntimeError(
f"Go compiler too old; expected 1.16+ found {semver_string}")

path_val = _generate_path_with_gopath()

try:
subprocess.check_call(["protoc-gen-go", "--version"], env={"PATH": path_val})
subprocess.check_call(
["protoc-gen-go", "--version"], env={"PATH": path_val})
subprocess.check_call(
["protoc-gen-go-grpc", "--version"], env={"PATH": path_val}
)
except Exception as e:
raise RuntimeError("Unable to find go/grpc extensions for protoc") from e
raise RuntimeError(
"Unable to find go/grpc extensions for protoc") from e


class BuildGoProtosCommand(Command):
Expand Down Expand Up @@ -448,7 +453,8 @@ def run(self):
python_requires=REQUIRES_PYTHON,
url=URL,
packages=find_packages(
where=PYTHON_CODE_PREFIX, exclude=("java", "infra", "sdk/python/tests", "ui")
where=PYTHON_CODE_PREFIX, exclude=(
"java", "infra", "sdk/python/tests", "ui")
),
package_dir={"": PYTHON_CODE_PREFIX},
install_requires=REQUIRED,
Expand Down Expand Up @@ -497,8 +503,8 @@ def run(self):
entry_points={"console_scripts": ["feast=feast.cli:cli"]},
use_scm_version=use_scm_version,
setup_requires=[
"grpcio-tools>=1.56.2,<2",
"grpcio>=1.56.2,<2",
"grpcio-tools<=1.56.0",
"grpcio<=1.56.0",
"mypy-protobuf==3.1",
"protobuf==4.25.4",
"pybindgen==0.22.0",
Expand Down

0 comments on commit c7221dc

Please sign in to comment.