Skip to content

codeintel: Make some oobmigrations permanent jobs

Warren Gifford requested to merge ef/permanent-oobmigrations-dbstore into main

Created by: efritz

This PR makes progress towards #38053 (closed). This PR moves two out of band migrations into a permanent background worker routine, as they do not need to be deprecated and will remain useful. They are:

  1. An out of band migration that denormalizes the number of references to an upload on that commit record. Will now periodically update batches of records with a NULL num_references count, which is used for expiration logic. We will likely want to have a "flush and recalculate" mode this will be useful for in the future.
  2. An out of band migration that checks fills the committed_at column of completed uploads that do not have the value set. This is mainly to backfill records before we tracked this, but this might be useful for force-pushed commits (or if we ever drop it from the correlation step).

Test plan

New unit tests on service and store layers.

Merge request reports

Loading