diff --git a/enterprise/internal/codeintel/autoindexing/internal/store/coverage.go b/enterprise/internal/codeintel/autoindexing/internal/store/coverage.go index 5c8c21b42cb..b83af58222e 100644 --- a/enterprise/internal/codeintel/autoindexing/internal/store/coverage.go +++ b/enterprise/internal/codeintel/autoindexing/internal/store/coverage.go @@ -72,11 +72,15 @@ func (s *store) RepositoryIDsWithConfiguration(ctx context.Context, offset, limi const repositoriesWithConfigurationQuery = ` SELECT - repository_id, - available_indexers, + r.id, + cai.available_indexers, COUNT(*) OVER() AS count -FROM cached_available_indexers -WHERE available_indexers != '{}'::jsonb +FROM cached_available_indexers cai +JOIN repo r ON r.id = cai.repository_id +WHERE + available_indexers != '{}'::jsonb AND + r.deleted_at IS NULL AND + r.blocked IS NULL ORDER BY num_events DESC LIMIT %s OFFSET %s diff --git a/enterprise/internal/codeintel/uploads/internal/store/summary.go b/enterprise/internal/codeintel/uploads/internal/store/summary.go index f2c8c82a8ff..6baa36b4027 100644 --- a/enterprise/internal/codeintel/uploads/internal/store/summary.go +++ b/enterprise/internal/codeintel/uploads/internal/store/summary.go @@ -300,7 +300,7 @@ WITH -- perform below. candidates_from_uploads AS ( SELECT u.repository_id - FROM lsif_uploads u + FROM lsif_uploads_with_repository_name u WHERE u.state = 'failed' AND NOT EXISTS (