Skip to content
Snippets Groups Projects

search: fix panic when requesting language stats

Open Administrator requested to merge cw/fix-lang-stats into main

Created by: chwarwick

Conversion from log15 missed a case where the language stats were retrieved from cache causing the logger to be nil.

resolves https://github.com/sourcegraph/sourcegraph/issues/41511

Test plan

Ran lang stats query multiple times from the api console to ensure I hit the cache and confirmed it no long caused a panic.

query LangStatsInsightContent($query: String!) {
  search(query: $query) {
    results {
      limitHit
    }
    stats {
      languages {
        name
        totalLines
      }
    }
  }
}

Merge request reports

The source branch cw/fix-lang-stats does not exist. Please restore it or use a different source branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
Please register or sign in to reply
Loading