-
Notifications
You must be signed in to change notification settings - Fork 560
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] Refactor replica record handling using enum #4031
base: master
Are you sure you want to change the base?
[Serve] Refactor replica record handling using enum #4031
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 the refactoring @andylizf ! It is awesome. Left some discussions ;)
sky/serve/replica_managers.py
Outdated
class ReplicaRecordAction(Enum): | ||
KEEP = auto() | ||
REMOVE_SCALE_DOWN = auto() | ||
REMOVE_PREEMPTION = auto() | ||
REMOVE_VERSION_MISMATCH = auto() |
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.
class ReplicaRecordAction(Enum): | |
KEEP = auto() | |
REMOVE_SCALE_DOWN = auto() | |
REMOVE_PREEMPTION = auto() | |
REMOVE_VERSION_MISMATCH = auto() | |
class ReplicaRecordRemoveReason(Enum): | |
SCALE_DOWN = 'scale_down' | |
PREEMPTION = xxx | |
VERSION_MISMATCH = xxx |
nit: how about we only keep the remove reason and return a None
in the get_replica_record_action
function to indicate keep it? Please also rename this function accordingly.
also, use a str for its value for more information.
I will do this after the #4032 merge, and see how properly handle the relationship between the new classes |
Co-authored-by: Tian Xia <[email protected]> fix nits f
c9651f8
to
6e6648f
Compare
This PR is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
is this still planned? |
Yes, sure. Let me reschedule it. |
We definitely need a clearer |
This PR introduces the following improvements:
ReplicaRecordAction
enum to clearly define possible actions for replica records.These changes make the replica management process more explicit and easier to extend in the future.