Skip to content

Commit 13dff5b

Browse files
rabiamitm02
authored andcommitted
[Bugfix][Failing Test] Fix test_vllm_port.py (vllm-project#18618)
Signed-off-by: rabi <[email protected]> Signed-off-by: amit <[email protected]>
1 parent c8b47a6 commit 13dff5b

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.buildkite/test-pipeline.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ steps:
199199
- tests/test_sequence
200200
- tests/test_config
201201
- tests/test_logger
202+
- tests/test_vllm_port
202203
commands:
203-
- pytest -v -s engine test_sequence.py test_config.py test_logger.py
204+
- pytest -v -s engine test_sequence.py test_config.py test_logger.py test_vllm_port.py
204205
# OOM in the CI unless we run this separately
205206
- pytest -v -s tokenization
206207

vllm/envs.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,13 @@ def get_vllm_port() -> Optional[int]:
159159
return int(port)
160160
except ValueError as err:
161161
from urllib.parse import urlparse
162-
try:
163-
parsed = urlparse(port)
164-
if parsed.scheme:
165-
raise ValueError(
166-
f"VLLM_PORT '{port}' appears to be a URI. "
167-
"This may be caused by a Kubernetes service discovery issue"
168-
"check the warning in: https://docs.vllm.ai/en/stable/usage/env_vars.html"
169-
)
170-
except Exception:
171-
pass
172-
162+
parsed = urlparse(port)
163+
if parsed.scheme:
164+
raise ValueError(
165+
f"VLLM_PORT '{port}' appears to be a URI. "
166+
"This may be caused by a Kubernetes service discovery issue,"
167+
"check the warning in: https://docs.vllm.ai/en/stable/serving/env_vars.html"
168+
) from None
173169
raise ValueError(
174170
f"VLLM_PORT '{port}' must be a valid integer") from err
175171

0 commit comments

Comments
 (0)