Skip to content

Commit 02a57df

Browse files
committed
fix: update test expectations for replica downscale order change
Signed-off-by: kitae <[email protected]>
1 parent 6f50cbf commit 02a57df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/ray/serve/_private/deployment_scheduler.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -747,13 +747,13 @@ def key(node_and_num_running_replicas_of_all_deployments):
747747
)
748748

749749
for node_id, _ in sorted(
750-
node_to_running_replicas_of_all_deployments.items(), key=key, reverse=True
750+
node_to_running_replicas_of_all_deployments.items(), key=key
751751
):
752752
if node_id not in node_to_running_replicas_of_target_deployment:
753753
continue
754-
for running_replica in node_to_running_replicas_of_target_deployment[
755-
node_id
756-
]:
754+
for running_replica in reversed(
755+
list(node_to_running_replicas_of_target_deployment[node_id])
756+
):
757757
if len(replicas_to_stop) == max_num_to_stop:
758758
return replicas_to_stop
759759
else:

0 commit comments

Comments
 (0)