Skip to content

Remove GlobalRepos

Administrator requested to merge cc/remove-global-repos into main

Created by: camdencheek

This PR takes the steps needed to remove GlobalRepos, which is the last of our global stores 🥳

This PR comes in 5 commits:

  1. Convert all uses of backend.Repos into backend.NewRepos(). This is the meat of this PR. It requires making sure there is a db available to pass in, which is what #28120 enabled
  2. Now that the only use of the global Repos value is to get its cache, unwrap it to just leave the cache.
  3. In order to remove the last use of GlobalRepos, we need to be able to create an IndexableReposLister with a shared cache and a passed-in db handle. This splits the cache type from the lister type so we can pass it in separately.
  4. GlobalRepos is now unused, so remove it
  5. Now that GlobalRepos is gone, we don't need ensureStore.

Also, this gets rid of one more reference todbconn.Global that was used in ensureStore methods.

1 down, 33 to go.

Stacked on #28118

Merge request reports

Loading