Skip to content

Commit e5b9a3c

Browse files
authored
[common-go] continue on hashConfig errors (#20752)
* Log the event name when hashConfig fails * [common-go] backoff and retry watching files * Revert "[common-go] backoff and retry watching files" This reverts commit e43e0d8. * Continue watching, after hashConfig error This way, subsequent changes to the watched file may be honored
1 parent 253dac6 commit e5b9a3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: components/common-go/watch/file.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ func File(ctx context.Context, path string, onChange func()) error {
8585

8686
currentHash, err := hashConfig(path)
8787
if err != nil {
88-
log.WithError(err).Warn("Cannot check if config has changed")
89-
return
88+
log.WithError(err).WithField("event", event.Name).Warn("Cannot check if config has changed")
89+
continue
9090
}
9191

9292
// no change

0 commit comments

Comments
 (0)