Skip to content
Snippets Groups Projects

repo-updater: Fix nil connection panic

Created by: ryanslade

syncScheduler relied on the dbconn.Global but it was not guaranteed to be initialised by the time it was first run leading to a panic.

Instead, we use the database handle passed in with the repo updater specific store.

Merge request reports

Approval is optional

Merged by avatar (Sep 23, 2025 3:37am UTC)

Merge details

  • Changes merged into main with 300e51c5.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: ryanslade

    @asdine I tagged you since it relates to the basestore work.

    There's a potential issue here where ensureStore will set store even if dbconn.Global is nil when the once block runs.

  • Created by: codecov[bot]

    Codecov Report

    Merging #17199 (300e51c) into main (fa28c07) will increase coverage by 0.00%. The diff coverage is n/a.

    @@           Coverage Diff           @@
    ##             main   #17199   +/-   ##
    =======================================
      Coverage   51.99%   51.99%           
    =======================================
      Files        1703     1703           
      Lines       84804    84804           
      Branches     7609     7609           
    =======================================
    + Hits        44095    44097    +2     
    + Misses      36807    36806    -1     
    + Partials     3902     3901    -1     
    Flag Coverage Δ *Carryforward flag
    go 51.04% <ø> (+<0.01%) :arrow_up:
    integration 30.51% <ø> (ø) Carriedforward from fa28c07
    storybook 30.03% <ø> (ø) Carriedforward from fa28c07
    typescript 54.30% <ø> (ø) Carriedforward from fa28c07
    unit 34.80% <ø> (ø) Carriedforward from fa28c07

    *This pull request uses carry forward flags. Click here to find out more.

    Impacted Files Coverage Δ
    .../internal/codeintel/resolvers/graphql/locations.go 85.56% <0.00%> (+2.06%) :arrow_up:
  • Created by: ryanslade

    Merging without review to avoid panic. Happy to take a different approach if needed.

  • Created by: asdine

    LGTM

Please register or sign in to reply
Loading