Skip to content

gitserver: ListCloned filters out repos that do not belong on shard

Administrator requested to merge core/gitserver-list-shard into master

Created by: keegancsmith

When rebalancing repositories across shards we can have a repository appearing on a shard which doesn't belong there. ListCloned is used to report to Admins which repos need to clone. This leads to not reporting any repos as needing cloning when rebalancing. This commit updates ListCloned to filter out repos that do not belong on a shard.

Note: Follow-up work is required to make our Purge job shard aware as well as gracefully handle rebalancing.

Part of https://github.com/sourcegraph/sourcegraph/issues/2485 Fixes https://github.com/sourcegraph/sourcegraph/issues/7970

Merge request reports

Loading