-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repo-updater: Explicity disallow external services from syncing on Cloud #17463
Conversation
Instead of ignoring all site level external services from syncing on Cloud we instead limit it to only exclude our "global" external services as these are the ones we expect to have very large numbers of repos.
Notifying subscribers in CODENOTIFY files for diff 0197ed6...bf439d2.
|
Codecov Report
@@ Coverage Diff @@
## main #17463 +/- ##
=======================================
Coverage 51.93% 51.94%
=======================================
Files 1715 1715
Lines 85198 85200 +2
Branches 7683 7683
=======================================
+ Hits 44251 44255 +4
+ Misses 37047 37043 -4
- Partials 3900 3902 +2
*This pull request uses carry forward flags. Click here to find out more.
|
@@ -162,10 +164,12 @@ func Main(enterpriseInit EnterpriseInit) { | |||
case *schema.GitHubConnection: | |||
if strings.HasPrefix(c.Url, "https://github.com") && c.Token != "" && c.CloudGlobal { | |||
server.GithubDotComSource, err = repos.NewGithubSource(e, cf) | |||
excludeFromSyncing = append(excludeFromSyncing, e.ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we could do this filtering in the database instead? Like adding a column to the external services table and filtering them on l149
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that'd be cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this when I originally added the "cloud global" idea. The problem is then that we need to manually update the database in order to make changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it only applies to GitHub and GitLab
Hmm, I also just realised that we probably also want to index all synced repos. |
Closing in favour of #17472 |
Instead of ignoring all site level external services from syncing on
Cloud we instead limit it to only exclude our "global" external services
as these are the ones we expect to have very large numbers of repos.
Might fix: #17424