Skip to content

Fix context canceled errors when triggering manual sync

Administrator requested to merge iv/fix-spurious-context-canceled-errors into main

Created by: varsanojidan

Fixes https://github.com/sourcegraph/sourcegraph/issues/40153

Context: https://github.com/sourcegraph/sourcegraph/issues/40153#issuecomment-1234726129

Basically, the change just makes it so the code that handles the manual sync request in repo-updater uses a generic source without observability attached to it in order to perform the validation of the external service. The observability attached caused a large dump of context canceled errors due to the ListRepos function exiting prematurely (after 1 result we consider it valid).

Test plan

Tested locally using Bitbucket, triggered manual sync (/sync-external-service) pre and post changes, and the context canceled error logs no longer appear.

Merge request reports

Loading