A project listed in Bitbucket's projectKey list that the user/token is not authorized to see causes repository sync to stop
Created by: mike-r-mclaughlin
- Sourcegraph version: 3.42.0
- Reported by: https://github.com/sourcegraph/accounts/issues/3
- Details: Slack thread
- Code host affected: Bitbucket data center
Description
When a projectKey is included in the projectKeys
list that the user is not authorized to see, syncing repositories seems to stop. This is most noticeable when a repository is deleted from one of the other projects. Sourcegraph will continue to update it and fail until the unauthorized projectKey is removed from the projectKeys
list.
Steps to reproduce:
Prep Bitbucket Server
- Create multiple projects with repositories
- Change the permissions on one (we'll refer to this project as
FOO
) such that the user you'll be using in Sourcegraph does not have access to it
Sourcegraph
- Create a new Bitbucket Server code host connection
- Use
projectKeys
to define the list of projects to sync. - Include in the
projectKeys
all of the project keys includingFOO
Expected behavior:
Syncing should correctly alert the user that the projectKey FOO
is not authorized. But, syncing for all other project keys should continue.
Actual behavior:
Syncing is stopped once the unauthorized key is found. This means that deleted repos inside of the other projects will continue to be included in the update scheduler, for example.
/cc @jplahn @ryphil