Skip to content

Commit 6e4ee06

Browse files
authored
[Build] Re-enable server tests (#926)
Use a reduced version of FastAPI, and increase the amount of time we allow for the server process to start. If this continues to be a problem, we should implement a liveliness endpoint, and have that polled by the test (with suitable backoff and retry count).
1 parent b32f2f7 commit 6e4ee06

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.github/workflows/workflow-pr-gate.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,23 @@ jobs:
117117
python-version: ${{ matrix.python-version }}
118118
model: ${{ matrix.model }}
119119

120-
120+
server-tests:
121+
needs: end-stage-1
122+
strategy:
123+
fail-fast: false # Don't cancel all on first failure
124+
matrix:
125+
# Need to figure out what happened to 3.12
126+
python-version: ["3.9", "3.10", "3.11", "3.12"]
127+
uses: ./.github/workflows/action_server_tests.yml
128+
with:
129+
os: ubuntu-latest
130+
python-version: ${{ matrix.python-version }}
121131

122132
end-stage-2:
123133
needs:
124134
- basic-tests-linux-python-other
125135
- basic-tests-gpu-python-latest
136+
- server-tests
126137
name: End Stage 2
127138
runs-on: ubuntu-latest
128139
steps:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"azureai": ["openai>=1.0"],
3737
"openai": ["openai>=1.0"],
3838
"schemas": ["jsonschema"],
39-
"server": ["fastapi", "uvicorn"],
39+
"server": ["fastapi-slim", "uvicorn"],
4040
}
4141

4242
# Create the union of all our requirements

tests/server/test_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# has to start up and get ready to
1616
# respond to requests. Just waiting is
1717
# not ideal, but is the simplest option
18-
PROCESS_DELAY_SECS = 40
18+
PROCESS_DELAY_SECS = 90
1919

2020

2121
def server_process(*, mock_string: Union[str, List[str]] = ""):

0 commit comments

Comments
 (0)