You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve input instance order for zone_based stoppable check #3028
Currently, getZoneBasedInstances() which zone_based check calls internally uses a TreeSet, which leads to lexicographical sorting of instances during the stoppable check. This behavior results in the output instance order being different from the input list, even when multiple instances are equally stoppable.
This issue proposes to make the ordering deterministic based on user input, by introducing a new boolean parameter preserveOrder to facilitate preserving order for zone based checks and relevant REST API changes.
When preserveOrder is set to true, the original order of the input list will be preserved.
Default behavior (preserveOrder = false) will maintain backward compatibility for OSS users who may rely on the current output order.
This change aims to improve predictability in testing and usage scenarios where instance order matters. We'll ensure this behavior is clearly documented to avoid incorrect assumptions.
changed the title [-]Preserve input instance order in getStoppableInstancesInSingleZone for zone_based stoppable check[/-][+]Preserve input instance order for zone_based stoppable check[/+]on Apr 30, 2025
Activity
[-]Preserve input instance order in getStoppableInstancesInSingleZone for zone_based stoppable check[/-][+]Preserve input instance order for zone_based stoppable check[/+]