Skip to content

Commit 0c897c6

Browse files
committed
fix reviews
Signed-off-by: aaronzuo <anarionzuo@outlook.com>
1 parent 044e70f commit 0c897c6

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/pr_integration_tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ jobs:
127127
SERVER_PID=$!
128128
echo $SERVER_PID > /tmp/feast_server_pid
129129
for i in $(seq 1 60); do
130+
kill -0 "$SERVER_PID" || { echo "server died"; exit 1; }
130131
if curl -fsS http://127.0.0.1:6566/health >/dev/null; then
131132
break
132133
fi
@@ -143,7 +144,7 @@ jobs:
143144
-H "Content-Type: application/json" \
144145
-H "mcp-protocol-version: 2025-03-26" \
145146
--data '{}' \
146-
http://127.0.0.1:6566/mcp || true
147+
http://127.0.0.1:6566/mcp
147148
148149
SESSION_ID=$(grep -i "^mcp-session-id:" /tmp/mcp_headers | head -1 | awk '{print $2}' | tr -d '\r')
149150
if [ -z "${SESSION_ID}" ]; then

sdk/python/feast/feature_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ def _add_mcp_support_if_enabled(app, store: "feast.FeatureStore"):
710710
)
711711

712712
mcp_transport_not_supported_error = McpTransportNotSupportedError
713-
except Exception as e:
713+
except ImportError as e:
714714
logger.error(f"Error checking/adding MCP support: {e}")
715715
return
716716

sdk/python/feast/infra/mcp_servers/mcp_server.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def add_mcp_support_to_app(app, store: FeatureStore, config) -> Optional["FastAp
4545
)
4646

4747
transport: Literal["sse", "http"] = (
48-
getattr(config, "mcp_transport", "sse") or "sse"
48+
getattr(config, "mcp_transport", "sse")
4949
)
5050
if transport == "http":
5151
mount_http = getattr(mcp, "mount_http", None)
@@ -60,8 +60,10 @@ def add_mcp_support_to_app(app, store: FeatureStore, config) -> Optional["FastAp
6060
if mount_sse is not None:
6161
mount_sse()
6262
else:
63+
logging.warning("transport sse not supported, fallback to the deprecated mount().")
6364
mcp.mount()
6465
else:
66+
# Code should not reach here
6567
raise McpTransportNotSupportedError(
6668
f"Unsupported mcp_transport={transport!r}. Expected 'sse' or 'http'."
6769
)
@@ -79,5 +81,5 @@ def add_mcp_support_to_app(app, store: FeatureStore, config) -> Optional["FastAp
7981
except McpTransportNotSupportedError:
8082
raise
8183
except Exception as e:
82-
logger.error(f"Failed to initialize MCP integration: {e}")
84+
logger.error(f"Failed to initialize MCP integration: {e}", exc_info=True)
8385
return None

0 commit comments

Comments
 (0)