This repository was archived by the owner on Sep 30, 2024. It is now read-only.
cmd/repo-updater/repos/conf.GetUpdateInterval() can return negative durations (panic: non-positive interval for NewTicker) #3535
Labels
needs-team-triage
An issue without an owner. Issues should be labeled with a team's name. Malo's doing this.
Steps to reproduce:
Expected behavior:
The repositories are updated every 9,999,999,999 minutes.
Actual behavior:
repo-updater panics because
GetUpdateInterval
returns a non-positive duration:https://github.com/sourcegraph/sourcegraph/blob/89ac13c006da9145efb6d674157865d9643cef71/cmd/repo-updater/repos/conf.go#L9-L15
v < 0
. Conventionally, negative durations for intervals means to wait forever. This means that references toGetUpdateInterval
should check this and not actually run their tasks.time.Duration(v) * time.Minute
exceeds the maximum Duration. See proposal: time/v2: make Duration safer to use golang/go#20757The text was updated successfully, but these errors were encountered: