Add note about update timestamp usage
@@ -185,6 +185,10 @@ func HasRolledBack(hr v1beta1.HelmRelease) bool {
chartFetched := GetCondition(hr.Status, v1beta1.HelmReleaseChartFetched)
if chartFetched != nil {
+ // NB: as two successful state updates can happen right after
+ // each other, on which we both want to act, we _must_ compare
+ // the update timestamps as the transition timestamp will only
+ // change on a status shift.
return !(chartFetched.Status == v1.ConditionTrue && rolledBack.LastUpdateTime.Before(&chartFetched.LastUpdateTime))
}
