-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Serve] Fail early for user app failure and expose failure reasons (#…
…3411) * expose detailed replica failure and rename service failure to crash loop * fix path in test * add target qps * shorter wait time * fix smoke * fix smoke test * add `;` back * Revert crash loop * update failed_status * typo * format * Add initial delay failure * Add initial delay failure * format * do not scale when user app fails * format * Add tests for failure statuses * syntax error * make service termination more robust * fix smoke test * Fix permission issue if not tpu is not needed * fix test * fail early for initial delay timeout * format * format * remove unecessary logger * fix * explicit annotation of scale down * fix logs * format * fix test with non spot * Address comments * add comments * longer time * Update sky/serve/autoscalers.py Co-authored-by: Tian Xia <cblmemo@gmail.com> * Update sky/serve/autoscalers.py Co-authored-by: Tian Xia <cblmemo@gmail.com> * Update sky/serve/replica_managers.py Co-authored-by: Tian Xia <cblmemo@gmail.com> --------- Co-authored-by: Tian Xia <cblmemo@gmail.com>
- Loading branch information
1 parent
48b8ca9
commit 48a5c63
Showing
9 changed files
with
232 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
service: | ||
readiness_probe: | ||
path: /health | ||
initial_delay_seconds: 10 | ||
replicas: 2 | ||
|
||
resources: | ||
cpus: 2 | ||
ports: 8081 | ||
|
||
run: | | ||
sleep 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import argparse | ||
import http.server | ||
import socketserver | ||
|
||
|
||
class MyHttpRequestHandler(http.server.SimpleHTTPRequestHandler): | ||
|
||
def do_GET(self): | ||
# Return 200 for all paths | ||
# Therefore, readiness_probe will return 200 at path '/health' | ||
self.send_response(200) | ||
self.send_header('Content-type', 'text/html') | ||
self.end_headers() | ||
html = """ | ||
<html> | ||
<head> | ||
<title>SkyPilot Test Page</title> | ||
</head> | ||
<body> | ||
<h1>Hi, SkyPilot here!</h1> | ||
</body> | ||
</html> | ||
""" | ||
self.wfile.write(bytes(html, 'utf8')) | ||
return | ||
|
||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser(description='SkyServe HTTP Test Server') | ||
parser.add_argument('--port', type=int, required=False, default=8081) | ||
args = parser.parse_args() | ||
|
||
Handler = MyHttpRequestHandler | ||
with socketserver.TCPServer(('', args.port), Handler) as httpd: | ||
print('serving at port', args.port) | ||
for i in range(20): | ||
# Ends after handle 20 requests | ||
httpd.handle_request() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
service: | ||
readiness_probe: | ||
path: /health | ||
initial_delay_seconds: 10 | ||
replicas: 1 | ||
|
||
resources: | ||
cpus: 2 | ||
ports: 8081 | ||
|
||
workdir: tests/skyserve/failures | ||
|
||
run: python3 probing.py |
Oops, something went wrong.