insights: during just in time migration make series look like it was created now
Created by: chwarwick
When migrating just in time the backfill start date is based on the series created at time . This is incorrect the backfill should start from the current time. This change preserves the created at date but sends the current time to the scoped backfiller so that it backfills the 12 most recent points.
closes https://github.com/sourcegraph/sourcegraph/issues/39866
Test plan
-
Set the
code_insights_deprecate_jit
feature flag tofalse
-
Create Just in time Track Changes insight and a Detect & track insight scoped to a repo then manually backdate the created at
-
Set the
code_insights_deprecate_jit
feature flag totrue
-
Restart the worker so the code to convert Just in time insights runs
-
Verify 12 data points with the most recent being start of current day UTC
-
Verify next recording date is 1 interval from now and next snapshot is start of next day