-
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
Conversation
Signed-off-by: harshit <[email protected]>
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.
Code Review
This pull request introduces an external_scaler_enabled flag to control whether external scalers can modify the number of replicas for an application. The changes correctly plumb this new flag through the system, from the user-facing APIs down to the controller logic, and add validation to prevent conflicts with Serve's built-in autoscaling. The implementation is solid, but I've identified a couple of areas for improvement in the error handling of the new scaling API endpoint. Specifically, one issue involves returning a full traceback in an API error response, and another is incomplete handling of 'not found' errors for deployments, which could lead to unhelpful 503 server errors. I've provided suggestions to address these points for a more robust and user-friendly API.
Signed-off-by: harshit <[email protected]>
abrarsheikh
left a comment
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.
add a black box test that using serve config, then introduce enable_external_scaler switchback. First enable then disable then enable. Ensure that works. Make sure to not restart reset between switchback.
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
not sure if you saw this ^. Additionally it would be good to add a test for using external autoscaler in both imperative and declarative case. |
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
| # 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)}, |
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.
+1 ?
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
abrarsheikh
left a comment
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.
looks good. @zcin mind taking a look as well.
|
@harshit-anyscale please resolve comments that have been addressed, makes it easier to review future revisions. |
done, resolved them. |
Signed-off-by: harshit <[email protected]>
zcin
left a comment
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.
mostly lgtm
| deployment_args_list.append(deployment_args_proto.SerializeToString()) | ||
|
|
||
| application_args_proto = ApplicationArgs() | ||
| application_args_proto.external_scaler_enabled = app.external_scaler_enabled |
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.
@abrarsheikh fyi we should probably also move route_prefix here, route_prefix being deployment level is legacy
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.
@harshit-anyscale create a GH issue for this
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
Signed-off-by: harshit <[email protected]>
adding external scaler enabled flag in the application config, which will dictate, whether to allow the external scalers to update the num replicas for an application or not. this is being done as part of the [custom autoscaling story](https://docs.google.com/document/d/1KtMUDz1O3koihG6eh-QcUqudZjNAX3NsqqOMYh3BoWA/edit?tab=t.0#heading=h.2vf4s2d7ca46) --------- Signed-off-by: harshit <[email protected]> Signed-off-by: YK <[email protected]>
adding external scaler enabled flag in the application config, which will dictate, whether to allow the external scalers to update the num replicas for an application or not. this is being done as part of the [custom autoscaling story](https://docs.google.com/document/d/1KtMUDz1O3koihG6eh-QcUqudZjNAX3NsqqOMYh3BoWA/edit?tab=t.0#heading=h.2vf4s2d7ca46) --------- Signed-off-by: harshit <[email protected]>
adding external scaler enabled flag in the application config, which will dictate, whether to allow the external scalers to update the num replicas for an application or not.
this is being done as part of the custom autoscaling story