a8n: Load and store Bitbucket Server PR activity as ChangesetEvents
Created by: tsenart
Part of #6085
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #6339 into master will increase coverage by
0.05%
. The diff coverage is28%
.@@ Coverage Diff @@ ## master #6339 +/- ## ========================================== + Coverage 39.19% 39.24% +0.05% ========================================== Files 1188 1187 -1 Lines 60858 60856 -2 Branches 5813 5808 -5 ========================================== + Hits 23853 23885 +32 + Misses 34815 34778 -37 - Partials 2190 2193 +3
Impacted Files Coverage Δ internal/extsvc/bitbucketserver/client.go 44.61% <0%> (-0.14%)
internal/a8n/types.go 21.12% <27.9%> (+7.61%)
cmd/repo-updater/repos/bitbucketserver.go 80.66% <33.33%> (-0.8%)
enterprise/pkg/a8n/store.go 84.15% <33.33%> (+1.89%)
shared/src/backend/fetch.ts 0% <0%> (-25%)
internal/search/backend/horizontal.go 88.7% <0%> (-1.62%)
browser/src/platform/context.ts 32.55% <0%> (-1.59%)
browser/src/libs/code_intelligence/inject.ts 0% <0%> (ø)
browser/src/libs/code_intelligence/extensions.tsx 82.43% <0%> (ø)
browser/src/shared/backend/requestGraphQL.ts ... and 4 more Created by: tsenart
Question: do you think we should throttle the ChangesetSyncer now that we make more requests to BBS? Or would adding a warning to the Changelog be enough?
Given that we intend to support a scale of only ~200 repos in campaigns for now, I think a CHANGELOG entry would be enough. That doesn't eliminate the need for smarter syncing in the future (when we need to support larger scales), though. Even when we have webhooks, the syncing logic must be much smarter than re-fetching everything every single time it runs.
I realise we have been talking about this problem for a while but haven't captured it in an issue, so here it goes: https://gitlab.sgdev.org/root/sourcegraph/-/issues/6388