Sync and index all non global external services on Cloud
Created by: ryanslade
Currently we only sync and index repos owned by user external services in the background on Cloud.
This makes it difficult for site admins to add new special case external services, for example: https://github.com/sourcegraph/sourcegraph/issues/17424
Instead we should sync and index all external services except for our special "Cloud Global" services that we use as the default external services for GitHub and GitLab. We want to exclude these as they can own a very large number of repos.
We'll need to make the following changes:
-
Introduce a new cloud_globalcolumn onexternal_serviceswhich defaults to false -
Add a DB constraint that only one cloud global service can exist per kind. Currently this is checked in code when we save an external service. -
Deploy this change and manually set the flag for our global services. -
Deprecate the CloudGlobalsetting in our GitHub and GitLab external service configuration and use the value from the db instead -
For background syncing, only exclude external services with the cloud_globalflag set. -
Update ListDefaultReposto include repos indefault_reposand any repos owned by external services wherecloud_globalis false.