feat(integrations): Genericise repository syncing task#112519
feat(integrations): Genericise repository syncing task#112519
Conversation
987d043 to
c11d6af
Compare
4fd70b5 to
95097c5
Compare
Required to get #112519 working for all scms. integration_id and installation are the same, but different scms use them. I don't want to refactor how the scms work, so just providing both.
This switches over the repository syncing task to be able to run for most SCM providers.
95097c5 to
6749a24
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6749a24. Configure here.
| restored_ids = sentry_disabled_ids & provider_external_ids | ||
|
|
||
| metric_tags = { | ||
| "provider": integration.provider, |
There was a problem hiding this comment.
GHE sync crashes on ApiError due to missing method
High Severity
GitHubEnterpriseIntegration does not override is_rate_limited_error; it inherits the base IntegrationInstallation implementation which raises NotImplementedError. Before this PR, GHE integrations always exited early because the feature flag was GitHub-specific. Now that dedicated github_enterprise-repo-auto-sync flags are registered and checked, GHE can reach the except ApiError handler. When any ApiError occurs, installation.is_rate_limited_error(e) raises NotImplementedError, masking the original error and preventing the raise from re-raising the ApiError for proper task retry.
Reviewed by Cursor Bugbot for commit 6749a24. Configure here.
Required to get #112519 working for all scms. integration_id and installation are the same, but different scms use them. I don't want to refactor how the scms work, so just providing both.
This uses more generic functions in the syncing task. It turns out there's more work to do for each provider to make them generic, so not enabling everything yet.
Required to get #112519 working for all scms. integration_id and installation are the same, but different scms use them. I don't want to refactor how the scms work, so just providing both.
…12545) Required to get #112519 working for all scms. Expand the periodic repo sync from GitHub-only to provider-agnostic. The task now uses each provider's get_repositories() and external_id instead of GitHub-specific API calls, with per-provider feature flags to control rollout. Currently enabled for GitHub, GitHub Enterprise, and VSTS. GitLab and Bitbucket are blocked on a pre-existing issue where create_repositories eagerly creates webhooks for all repos before checking if they already exist. Perforce lacks external_id support. <!-- Describe your PR here. -->


This uses more generic functions in the syncing task. It turns out there's more work to do for each provider to make them generic, so not enabling everything yet.