It is not called out clearly enough in docs that initial permission synching may take several hours
Created by: slimsag
In https://docs.sourcegraph.com/admin/repo/permissions#background-permissions-syncing there is a point that is very important but us not called out clearly enough at all (emphasis mine):
Benefits of backround syncing:
- More predictable load on the code host API due to maintaining a schedule of permission updates.
- Permissions are quickly synced for new repositories added to the Sourcegraph instance.
- Users who sign up on the Sourcegraph instance can immediately get search results from the repositories they have access to on the code host.
Considerations when enabling for the first time:
- While the initial sync for all repositories and users is happening, users can gradually see more and more search results from repositories they have access to.
- It takes time to complete the first sync. Depending on how many private repositories and users you have on the Sourcegraph instance, it can take from a few minutes to several hours. This is generally not a problem for fresh installations, since admins should only make the instance available after it's ready, but for existing installations, active users may not see the repositories they expect in search results because the initial permissions syncing hasn't finished yet.
- More requests to the code host API need to be done during the first sync, but their pace is controlled with rate limiting.
Please contact [email protected] if you have any concerns/questions about enabling this feature for your Sourcegraph instance.
If a customer such as https://app.hubspot.com/contacts/2762526/company/407948923/ was to turn on repository permission synching with several thousand users and 20-50k repositories, this could result in most users being unable to use Sourcegraph for several hours unbeknownst to the site admin.
This point is worth calling out very explicitly as a warning so that site admins know to schedule a specific window during which this will occur.