ERROR `context canceled` when syncing large number of Bitbucket projectKeys
Created by: mike-r-mclaughlin
- Sourcegraph version: 3.42.0
Steps to reproduce:
- Create a new Bitbucket external code host configuration with 2500 project keys
{
"url": "http://bitbucketserver/",
"token": "REDACTED",
"username": "username",
"projectKeys": ["aa", "ab", "ab","ac", "ad","ae","af", "ag", "ah", "ai", "aj", "ak", "al", "am", "an", "ao", "ap", "aq" ...],
}
- Save and watch the repo-updater logs
Expected behavior:
No errors or warnings occur in the UI or in the logs
Actual behavior:
The UI shows a warning in the repository status (both in the cloud icon in the upper right and on the repository status page).
Errors:
│ {"SeverityText":"ERROR","Timestamp":1660039706810815095,"InstrumentationScope":"service.ObservedSource","Caller":"repos/observability.go:99","Function":"github.com/sourcegraph/sourcegraph/internal/repos.(*observedSource).ListRepos.func1","Body":"source.list-repos","Resource":{"service.name":"repo-updater","service. │
│ version":"3.42.0","service.instance.id":"repo-updater-767459777c-4wwn9"},"Attributes":{"error":"17 errors occurred:\n\t* bitbucketserver.projectKeys: query=\"aq\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ad\": context canceled\n\t* bitbucketserver.projectKeys: query=\"aj\": context canceled\n\t* │
│ bitbucketserver.projectKeys: query=\"am\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ae\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ah\": context canceled\n\t* bitbucketserver.projectKeys: query=\"an\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ap\": context cance │
│ led\n\t* bitbucketserver.projectKeys: query=\"ai\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ao\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ac\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ak\": context canceled\n\t* bitbucketserver.projectKeys: query=\"al\": cont │
│ ext canceled\n\t* bitbucketserver.projectKeys: query=\"ag\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ab\": context canceled\n\t* bitbucketserver.projectKeys: query=\"ab\": context canceled\n\t* bitbucketserver.projectKeys: query=\"aa\": context canceled"}}
Additional Details
- Internal Slack Discussion
- Reported by: https://github.com/sourcegraph/accounts/issues/3
/cc @jplahn @ryphil