Skip to content

Commit 4343609

Browse files
felixwang9817achals
authored andcommitted
Remove Go feature server implementation of Python feature server
Signed-off-by: Felix Wang <wangfelix98@gmail.com> Signed-off-by: Achal Shah <achals@gmail.com>
1 parent 9f3b207 commit 4343609

2 files changed

Lines changed: 14 additions & 26 deletions

File tree

sdk/python/feast/feature_store.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def __init__(
132132
self._registry._initialize_registry()
133133
self._provider = get_provider(self.config, self.repo_path)
134134
self._go_server = None
135-
# print("New feature store")
136135

137136
@log_exceptions
138137
def version(self) -> str:
@@ -1782,13 +1781,7 @@ def __exit__(self, exc_type, exc_value, traceback):
17821781
@log_exceptions_and_usage
17831782
def serve(self, host: str, port: int, no_access_log: bool) -> None:
17841783
"""Start the feature consumption server locally on a given port."""
1785-
if enable_go_feature_server(self.config):
1786-
# Lazily start the go server on the first request
1787-
if self._go_server is None:
1788-
self._go_server = GoServer(str(self.repo_path.absolute()), self.config)
1789-
self._go_server.start_http_server(host, port)
1790-
else:
1791-
feature_server.start_server(self, host, port, no_access_log)
1784+
feature_server.start_server(self, host, port, no_access_log)
17921785

17931786
@log_exceptions_and_usage
17941787
def get_feature_server_endpoint(self) -> Optional[str]:

sdk/python/feast/go_server.py

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2022 The Feast Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
import atexit
215
import os
316
import platform
@@ -152,24 +165,6 @@ def start_grpc_server(self):
152165
# Sleep for 0.1 second before retrying
153166
time.sleep(0.1)
154167

155-
def start_http_server(self, host: str, port: int):
156-
if self.httpServerStarted:
157-
return
158-
for i in range(10):
159-
try:
160-
self.process.stdin.write(
161-
bytes(f"startHttp {host}:{port}\n", encoding="utf8")
162-
)
163-
self.process.stdin.flush()
164-
self.httpServerStarted = True
165-
break
166-
except subprocess.CalledProcessError as error:
167-
# If there is an exception
168-
# go subprocess probably closed so pipe is closed
169-
self.pipeClosed = True
170-
self.stop()
171-
raise errors.GoSubprocessConnectionFailed() from error
172-
173168
def stop(self):
174169

175170
# Only send sigkill if there's a problem telling go subprocess to stop

0 commit comments

Comments
 (0)