Skip to content

a8n: Syncing 24 GitHub pull requests fails due to GraphQL node limit reached

Created by: mrnugget

After creating a campaign that created 24 changesets on GitHub repo-updater's sync fails with this error message:

ERROR ChangesetSyncer, error: error in GraphQL response: This query requests up to 608,400 possible nodes which exceeds the maximum limit of 500,000.
ERROR PreSync, error: error in GraphQL response: This query requests up to 608,400 possible nodes which exceeds the maximum limit of 500,000.

We probably need to do this in batches of 10, 15 or 20.

The code is here:

https://github.com/sourcegraph/sourcegraph/blob/f2e2baf1fcb1b338622f710a273137b3a18eb8b8/enterprise/pkg/a8n/syncer.go#L120-L128

We could, instead of using b.Changesets..., take subsets of b.Changesets and LoadChangesets those.