Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use RevisionVersion field instead of CreationTimestamp to decide whic…
…h MS is new/old The CreationTimestamp is not always the referential value for comparision. The time.Time.Before method does not always return true when it should. Leading to new and old MSs to be selected in an oposite way. Using the RevisionVersion for comparision is more precise and it solves the case where CreationTimestamp fields of both MSs has the same value. From observation the following machineset CreationTimestamps led to incorrect ordering of MSs: item[0]: ResourceVersion:"78", CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63684460660, loc:(*time.Location)(0x2cb5040)}} item[1]: ResourceVersion:"82", CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63684460661, loc:(*time.Location)(0x2cb5040)}} Even though item[1]'s ext field has higher value than item[0]'s ext field, item[1] was selected by time.Time.Before as old MS instead of new one.
- Loading branch information