Insights: add single frontend datapoint to backend insights so you don't have to wait a month to get "current" results
Created by: Joelkw
This is a stretch issue, and if necessary the user can non-optimally solve this now by running the search in sourcegraph themself.
Because we now have a backend, if you wanted to "use the frontend" to help with insights, all we really need is a single present-time point. This means it doesn't matter how many repos you include because we can use the normal search API to just run the search.
Visual concept of what I am imagining:
This was never not part of the "historical insights over all my repos" concept (there's no reason a user wouldn't want to see today but would want to see the first of the month) but it was cut for scope originally.
I will defer to others as to whether we could get this done in time, but it would be awesome and our users would love it (and we need to do this in 3.32 if we don't do it in 3.31). The use case of "actively tracking a migration" means a user cares about these present-time points as well as the history.
The considerations (reasons it might be trickier/not possible in the 2.5 days next week):
- it needs to match filters that might be on the insight (so we can't just use the data series query; we also must honor the filters)
- it needs to match the backend (what this means, specifically, is that it should modify from just an "indexed search" to "an indexed search with
archived:yes fork:yes
attached, since that's what the backend currently does. Of course, if the insight data series query has afork:no
in it, this should override that).