Skip to content

Commit

Permalink
feat: add log when sync window configs are wrong
Browse files Browse the repository at this point in the history
Signed-off-by: daengdaengLee <gunho1020@gmail.com>
  • Loading branch information
daengdaengLee committed Sep 23, 2024
1 parent 699073b commit ad65cb8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/apis/application/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2428,10 +2428,12 @@ func (s *SyncWindows) inactiveAllows(currentTime time.Time) *SyncWindows {
if w.Kind == "allow" {
schedule, sErr := specParser.Parse(w.Schedule)
if sErr != nil {
log.Warnf("invalid sync window schedule '%v': %s", w.Schedule, sErr)
continue
}
duration, dErr := time.ParseDuration(w.Duration)
if dErr != nil {
log.Warnf("invalid sync window duration '%v': %s", w.Duration, dErr)
continue
}
// Offset the nextWindow time to consider the timeZone of the sync window
Expand Down

0 comments on commit ad65cb8

Please sign in to comment.