Skip to content

Commit c33131b

Browse files
committed
fix
Signed-off-by: aaronzuo <anarionzuo@outlook.com>
1 parent 1d0d820 commit c33131b

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

.github/workflows/unit_tests.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,14 @@ jobs:
108108
curl -fsS http://127.0.0.1:6566/health >/dev/null
109109
- name: Validate MCP endpoint
110110
run: |
111-
rm -f /tmp/mcp_headers /tmp/mcp_headers2
111+
rm -f /tmp/mcp_headers /tmp/mcp_headers2 /tmp/mcp_body2
112112
113113
curl -sS -D /tmp/mcp_headers -o /dev/null --max-time 10 \
114-
-H "Accept: text/event-stream, application/json" \
114+
-X POST \
115+
-H "Accept: application/json, text/event-stream" \
116+
-H "Content-Type: application/json" \
115117
-H "mcp-protocol-version: 2025-03-26" \
118+
--data '{}' \
116119
http://127.0.0.1:6566/mcp || true
117120
118121
SESSION_ID=$(grep -i "^mcp-session-id:" /tmp/mcp_headers | head -1 | awk '{print $2}' | tr -d '\r')
@@ -121,22 +124,18 @@ jobs:
121124
exit 1
122125
fi
123126
124-
for i in $(seq 1 10); do
125-
rm -f /tmp/mcp_headers2
126-
curl -sS -D /tmp/mcp_headers2 -o /dev/null --max-time 10 \
127-
-H "Accept: text/event-stream, application/json" \
128-
-H "mcp-protocol-version: 2025-03-26" \
129-
-H "mcp-session-id: ${SESSION_ID}" \
130-
http://127.0.0.1:6566/mcp || true
131-
if grep -Eq "^HTTP/.* 200" /tmp/mcp_headers2 && grep -Eiq "^content-type: text/event-stream" /tmp/mcp_headers2; then
132-
exit 0
133-
fi
134-
sleep 1
135-
done
127+
curl -sS -D /tmp/mcp_headers2 -o /tmp/mcp_body2 --max-time 10 \
128+
-X POST \
129+
-H "Accept: application/json, text/event-stream" \
130+
-H "Content-Type: application/json" \
131+
-H "mcp-protocol-version: 2025-03-26" \
132+
-H "mcp-session-id: ${SESSION_ID}" \
133+
--data '{}' \
134+
http://127.0.0.1:6566/mcp || true
136135
137-
cat /tmp/mcp_headers || true
138-
cat /tmp/mcp_headers2 || true
139-
exit 1
136+
grep -Eq "^HTTP/.* 400" /tmp/mcp_headers2
137+
grep -Eiq "^content-type: application/json" /tmp/mcp_headers2
138+
grep -Eiq "^mcp-session-id: ${SESSION_ID}" /tmp/mcp_headers2
140139
- name: Stop feature server
141140
if: always()
142141
run: |

sdk/python/feast/ui_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from importlib import resources as importlib_resources
44
from typing import Callable, Optional
55

6-
import uvicorn
76
from fastapi import FastAPI, Response, status
87
from fastapi.middleware.cors import CORSMiddleware
98
from fastapi.staticfiles import StaticFiles
@@ -145,6 +144,8 @@ def start_server(
145144
tls_key_path: str = "",
146145
tls_cert_path: str = "",
147146
):
147+
import uvicorn
148+
148149
app = get_app(
149150
store,
150151
project_id,

0 commit comments

Comments
 (0)