Skip to content

Commit 54e77f6

Browse files
committed
Update upgrade details metadata Equals() with new fields
1 parent 2964a7f commit 54e77f6

File tree

1 file changed

+4
-1
lines changed
  • internal/pkg/agent/application/upgrade/details

1 file changed

+4
-1
lines changed

internal/pkg/agent/application/upgrade/details/details.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package details
66

77
import (
88
"math"
9+
"slices"
910
"sync"
1011
"time"
1112

@@ -244,7 +245,9 @@ func (m Metadata) Equals(otherM Metadata) bool {
244245
m.DownloadPercent == otherM.DownloadPercent &&
245246
m.DownloadRate == otherM.DownloadRate &&
246247
equalTimePointers(m.RetryUntil, otherM.RetryUntil) &&
247-
m.RetryErrorMsg == otherM.RetryErrorMsg
248+
m.RetryErrorMsg == otherM.RetryErrorMsg &&
249+
m.Reason == otherM.Reason &&
250+
slices.Equal(m.RollbacksAvailable, otherM.RollbacksAvailable)
248251
}
249252

250253
func equalTimePointers(t, otherT *time.Time) bool {

0 commit comments

Comments
 (0)