repo-updater: Fix syncRepo logic
Created by: ryanslade
syncRepo syncs a single repo that has been sourced from a single code host. It is usually triggered by lazy syncing. Since it is only sourced from a single code host its Sources map only contained mapping for that one source. Our diff algorithm thus triggered the removal of the repo from all other sources in the external_service_repos table.
Instead, we now assume that the current stored mapping is correct for all OTHER sources.
Closes: https://github.com/sourcegraph/sourcegraph/issues/15820
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #16176 (1bd7f4b) into main (954acf2) will increase coverage by
0.00%
. The diff coverage is100.00%
.@@ Coverage Diff @@ ## main #16176 +/- ## ======================================= Coverage 52.76% 52.77% ======================================= Files 1646 1646 Lines 82292 82296 +4 Branches 7285 7285 ======================================= + Hits 43423 43432 +9 + Misses 35016 35013 -3 + Partials 3853 3851 -2
Flag Coverage Δ *Carryforward flag go 52.55% <100.00%> (+0.01%)
integration 28.43% <ø> (ø)
Carriedforward from 4763420 storybook 28.03% <ø> (ø)
Carriedforward from 4763420 typescript 53.30% <ø> (ø)
Carriedforward from 4763420 unit 35.88% <ø> (ø)
Carriedforward from 4763420 *This pull request uses carry forward flags. Click here to find out more.
Impacted Files Coverage Δ cmd/repo-updater/repos/syncer.go 77.16% <100.00%> (+0.77%)
cmd/repo-updater/repos/types.go 69.37% <0.00%> (+0.62%)
.../internal/codeintel/resolvers/graphql/locations.go 85.56% <0.00%> (+2.06%)
Please register or sign in to reply