Skip to content

remove almost all uses of deprecated GlobalRepos

Administrator requested to merge cc/reduce-global-repos-use into main

Created by: camdencheek

This commit removes almost all remaining uses of database.GlobalRepos, replacing them with a passed-in db. The goal of this is to inject the database dependency wherever possible to facilitate testing. I was looking at this code for unrelated reasons, and realized that most all uses of the GlobalRepos can easily be replaced with a database passed in from a parent scope.

The last remaining use is the backend.Repos struct, which is itself another global db handle that we should ideally replace, but it's a little more difficult because it also wraps a cache which must be shared between instantiations to be effective.

Progresses #26112 (closed)

Merge request reports

Loading