Skip to content

insights: ensure that priority from time interval does not exceed HIGH

Warren Gifford requested to merge cw/priority-updates into main

Created by: chwarwick

priority.FromTimeInterval was return a higher priority than CRITICAL or HIGH when the interval in days was between 0 - 10. This sets the minimum priority to HIGH +1 so that any interval based priority does not exceed that of HIGH or Critical items.

Discovered because search jobs for the first data point (some times more depending on interval) for all repo insights where getting queued with higher priority than scoped insights.

resolves https://github.com/sourcegraph/sourcegraph/issues/38115

Test plan

unit tests pass

Merge request reports

Loading