-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Serve] Support headers in Readiness Probe #3552
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the support for the authorization token in the readiness probe @cblmemo! It looks mostly good to me!
sky/serve/service_spec.py
Outdated
if self.readiness_headers is None: | ||
headers = '' | ||
else: | ||
headers = f' with headers {json.dumps(self.readiness_headers)}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Showing the authorization token directly in the log may not be very safe. We may want to redact the value of the headers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Changed to with custom headers
now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this @cblmemo! LGTM with the comment fixed.
sky/serve/replica_managers.py
Outdated
@@ -567,7 +570,8 @@ def __init__(self, service_name: str, | |||
self._update_mode = serve_utils.DEFAULT_UPDATE_MODE | |||
logger.info(f'Readiness probe path: {spec.readiness_path}\n' | |||
f'Initial delay seconds: {spec.initial_delay_seconds}\n' | |||
f'Post data: {spec.post_data}') | |||
f'Post data: {spec.post_data}\n' | |||
f'Readiness headers: {spec.readiness_headers}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems we are still printing out the headers? Should we use list(spec.readiness_headers.keys())
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed. Thanks!
Closes #3549 by adding headers configuration in readiness probe.
Tested (run the relevant ones):
bash format.sh
llm/vllm/service-with-auth.yaml
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
conda deactivate; bash -i tests/backward_compatibility_tests.sh