-
Notifications
You must be signed in to change notification settings - Fork 7k
add external scaler enabled flag #57727
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
Changes from 13 commits
9c98194
a685eb7
7c1ef8f
0f6b1b0
826b69c
60beb9f
dee83f1
e4d315d
9229b97
4d30ab8
0492aed
c92bb27
83fd9d1
cf556db
209a1fd
c87d182
f7e2f94
2fed452
ebeb0d2
fda546e
539d486
dbe3c0f
8a4b589
80e8cef
c6c1b4c
49eb96a
810fbcf
c0aa403
7838218
ad52517
f7ef18f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -203,7 +203,10 @@ def _create_json_response(self, data, status: int) -> Response: | |
| @validate_endpoint() | ||
| async def scale_deployment(self, req: Request) -> Response: | ||
| from ray.serve._private.common import DeploymentID | ||
| from ray.serve._private.exceptions import DeploymentIsBeingDeletedError | ||
| from ray.serve._private.exceptions import ( | ||
| DeploymentIsBeingDeletedError, | ||
| ExternalScalerNotEnabledError, | ||
| ) | ||
| from ray.serve.schema import ScaleDeploymentRequest | ||
|
|
||
| # Extract path parameters | ||
|
|
@@ -250,11 +253,11 @@ async def scale_deployment(self, req: Request) -> Response: | |
| 200, | ||
| ) | ||
| except Exception as e: | ||
| if isinstance(e.cause, DeploymentIsBeingDeletedError): | ||
| if isinstance( | ||
| e.cause, (ExternalScalerNotEnabledError, DeploymentIsBeingDeletedError) | ||
| ): | ||
| return self._create_json_response( | ||
| # From customer's viewpoint, the deployment is deleted instead of being deleted | ||
| # as they must have already executed the delete command | ||
| {"error": "Deployment is deleted"}, | ||
| {"error": str(e)}, | ||
|
||
| 412, | ||
| ) | ||
| if isinstance(e, ValueError) and "not found" in str(e): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.