Skip to content
Prev Previous commit
Next Next commit
Configure health check service and update CI dependencies
Signed-off-by: mehmettokgoz <mehmet.tokgoz@hazelcast.com>
Signed-off-by: Danny C <d.chiao@gmail.com>
  • Loading branch information
mehmettokgoz authored and adchia committed Sep 5, 2023
commit a5000d8640c7b2c65cf69639957c76137c516cd0
21 changes: 15 additions & 6 deletions sdk/python/feast/infra/contrib/grpc_server.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import logging
from concurrent import futures
Comment thread
adchia marked this conversation as resolved.

import grpc
import pandas as pd
import logging
from grpc_health.v1 import health, health_pb2_grpc

from feast.data_source import PushMode
from feast.errors import PushSourceNotFoundException
from feast.feature_store import FeatureStore
from feast.protos.feast.serving.GrpcServer_pb2 import WriteToOnlineStoreResponse, PushResponse
from feast.protos.feast.serving.GrpcServer_pb2 import (
PushResponse,
WriteToOnlineStoreResponse,
)
from feast.protos.feast.serving.GrpcServer_pb2_grpc import (
GrpcFeatureServerServicer,
add_GrpcFeatureServerServicer_to_server,
)
from grpc_health.v1 import health
from grpc_health.v1 import health_pb2_grpc


def parse(features):
Expand Down Expand Up @@ -62,7 +65,9 @@ def Push(self, request, context):
return PushResponse(status=True)

def WriteToOnlineStore(self, request, context):
logging.warning("write_to_online_store is deprecated. Please consider using Push instead")
logging.warning(
"write_to_online_store is deprecated. Please consider using Push instead"
)
try:
df = parse(request.features)
self.fs.write_to_online_store(
Expand All @@ -81,6 +86,10 @@ def WriteToOnlineStore(self, request, context):
def get_grpc_server(address: str, fs: FeatureStore, max_workers: int):
server = grpc.server(futures.ThreadPoolExecutor(max_workers=max_workers))
add_GrpcFeatureServerServicer_to_server(GrpcFeatureServer(fs), server)
health_pb2_grpc.add_HealthServicer_to_server(health.HealthServicer(), server)
health_servicer = health.HealthServicer(
experimental_non_blocking=True,
experimental_thread_pool=futures.ThreadPoolExecutor(max_workers=max_workers),
)
health_pb2_grpc.add_HealthServicer_to_server(health_servicer, server)
server.add_insecure_port(address)
return server
2 changes: 1 addition & 1 deletion sdk/python/requirements/py3.10-ci-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ uvicorn[standard]==0.23.2
# via feast (setup.py)
uvloop==0.17.0
# via uvicorn
virtualenv==20.24.1
virtualenv==20.23.0
# via
# feast (setup.py)
# pre-commit
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/requirements/py3.8-ci-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ uvicorn[standard]==0.23.2
# via feast (setup.py)
uvloop==0.17.0
# via uvicorn
virtualenv==20.24.1
virtualenv==20.23.0
# via
# feast (setup.py)
# pre-commit
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/requirements/py3.9-ci-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ uvicorn[standard]==0.23.2
# via feast (setup.py)
uvloop==0.17.0
# via uvicorn
virtualenv==20.24.1
virtualenv==20.23.0
# via
# feast (setup.py)
# pre-commit
Expand Down
36 changes: 36 additions & 0 deletions sdk/python/requirements/py3.9-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ certifi==2023.7.22
# requests
charset-normalizer==3.2.0
# via requests
<<<<<<< HEAD
click==8.1.7
=======
click==8.1.6
>>>>>>> 2c800904 (Configure health check service and update CI dependencies)
# via
# bowler
# dask
Expand All @@ -37,13 +41,21 @@ cloudpickle==2.2.1
# via dask
colorama==0.4.6
# via feast (setup.py)
<<<<<<< HEAD
dask==2023.9.0
=======
dask==2023.8.0
>>>>>>> 2c800904 (Configure health check service and update CI dependencies)
# via feast (setup.py)
dill==0.3.7
# via feast (setup.py)
exceptiongroup==1.1.3
# via anyio
<<<<<<< HEAD
fastapi==0.103.1
=======
fastapi==0.101.0
>>>>>>> 2c800904 (Configure health check service and update CI dependencies)
# via feast (setup.py)
fastavro==1.8.2
# via
Expand All @@ -53,17 +65,29 @@ fissix==21.11.13
# via bowler
fsspec==2023.9.0
# via dask
<<<<<<< HEAD
grpcio==1.57.0
=======
grpcio==1.56.2
>>>>>>> 2c800904 (Configure health check service and update CI dependencies)
# via
# feast (setup.py)
# grpcio-health-checking
# grpcio-reflection
# grpcio-tools
<<<<<<< HEAD
grpcio-health-checking==1.57.0
# via feast (setup.py)
grpcio-reflection==1.57.0
# via feast (setup.py)
grpcio-tools==1.57.0
=======
grpcio-health-checking==1.56.2
# via feast (setup.py)
grpcio-reflection==1.56.2
# via feast (setup.py)
grpcio-tools==1.56.2
>>>>>>> 2c800904 (Configure health check service and update CI dependencies)
# via feast (setup.py)
gunicorn==21.2.0
# via feast (setup.py)
Expand Down Expand Up @@ -102,7 +126,11 @@ mypy==1.5.1
# via sqlalchemy
mypy-extensions==1.0.0
# via mypy
<<<<<<< HEAD
mypy-protobuf==3.1
=======
mypy-protobuf==3.5.0
>>>>>>> 2c800904 (Configure health check service and update CI dependencies)
# via feast (setup.py)
numpy==1.25.2
# via
Expand Down Expand Up @@ -157,7 +185,11 @@ referencing==0.30.2
# jsonschema-specifications
requests==2.31.0
# via feast (setup.py)
<<<<<<< HEAD
rpds-py==0.10.2
=======
rpds-py==0.9.2
>>>>>>> 2c800904 (Configure health check service and update CI dependencies)
# via
# jsonschema
# referencing
Expand Down Expand Up @@ -192,7 +224,11 @@ tqdm==4.66.1
# via feast (setup.py)
typeguard==2.13.3
# via feast (setup.py)
<<<<<<< HEAD
types-protobuf==4.24.0.1
=======
types-protobuf==4.23.0.3
>>>>>>> 2c800904 (Configure health check service and update CI dependencies)
# via mypy-protobuf
typing-extensions==4.7.1
# via
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
CI_REQUIRED = (
[
"build",
"virtualenv==20.23.0",
"cryptography>=35.0,<42",
"flake8",
"black>=22.6.0,<23",
Expand Down Expand Up @@ -382,8 +383,8 @@ def run(self):
use_scm_version=use_scm_version,
setup_requires=[
"setuptools_scm",
"grpcio>=1.56.2",
"grpcio-tools>=1.56.2",
"grpcio==1.56.2",
"grpcio-tools==1.56.2",
"mypy-protobuf==3.1",
"pybindgen==0.22.0",
],
Expand Down