codeintel: Fix nil pointer in summary resolver when repos are deleted (#51947)

This commit is contained in:
Eric Fritz 2023-05-16 10:50:58 -05:00 committed by GitHub
parent cc10877fa4
commit 66be8ff8e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -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 (