Add error handling for not found changesets from GitHub
Created by: eseliger
This fixes the implementation of the ChangesetSource
interface, which states a LoadChangeset
implementation should throw a ChangesetNotFoundError
. It also introduces a new operation to the reconciler, which tracks a changeset is initially imported and not just synced, in which case it won't go to the errored state, but remain unsynced and in a terminal error state, so no retries are attempted.
This fixes https://github.com/sourcegraph/sourcegraph/issues/14923
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #14771 into main will increase coverage by
0.01%
. The diff coverage is60.86%
.@@ Coverage Diff @@ ## main #14771 +/- ## ========================================== + Coverage 52.15% 52.16% +0.01% ========================================== Files 1556 1556 Lines 79450 79479 +29 Branches 7089 6990 -99 ========================================== + Hits 41434 41459 +25 - Misses 34266 34272 +6 + Partials 3750 3748 -2
Flag Coverage Δ #go 52.34% <60.86%> (+0.01%)
#integration 30.42% <ø> (-0.01%)
#storybook 22.19% <ø> (ø)
#typescript 51.72% <ø> (-0.01%)
#unit 33.93% <ø> (ø)
Impacted Files Coverage Δ internal/extsvc/github/client.go 67.60% <33.33%> (-0.49%)
internal/extsvc/github/pulls.go 55.42% <55.55%> (-0.31%)
enterprise/internal/campaigns/reconciler.go 60.97% <57.14%> (+0.01%)
cmd/repo-updater/repos/github.go 63.97% <100.00%> (+0.49%)
cmd/repo-updater/repos/gitlab.go 81.08% <100.00%> (+0.14%)
cmd/repo-updater/repos/sources.go 67.81% <100.00%> (ø)
internal/extsvc/gitlab/client.go 32.07% <100.00%> (ø)
...nterprise/cmd/frontend/auth/httpheader/provider.go 0.00% <0.00%> (-20.00%)
...t/web/src/search/input/interactive/FilterInput.tsx 88.96% <0.00%> (-0.65%)
... and 3 more Created by: sourcegraph-bot
Notifying subscribers in CODENOTIFY files for diff a9cbad1d8608bc950a0e30371c1c53b8834f7780...5620e6d2123079842de21c25aff718bd585a3518.
Notify File(s) @LawnGnome enterprise/internal/campaigns/reconciler.go
enterprise/internal/campaigns/reconciler_test.goCreated by: mrnugget
@eseliger I'm going to go ahead and merge this, since you added the last missing piece to fix the immediate problem (endless retrying of importing not-found changesets). But I also want to try, in another branch, to maybe make the UI a bit nicer when something hasn't been found.