From ec38704ad01be80e95f4597fac84b09b239a6dcb Mon Sep 17 00:00:00 2001 From: "royrothenberg@gmail.com" Date: Tue, 28 Nov 2023 15:20:02 -0800 Subject: [PATCH] reduce number of pr fetched in graphql query to avoid timeouts (#782) Summary: [isl] reduce number of pr fetched in graphql query to avoid timeouts Stack created with Sapling. -> https://github.com/facebook/sapling/issues/782 https://github.com/facebook/sapling/issues/781 Pull Request resolved: https://github.com/facebook/sapling/pull/782 Test Plan: Imported from GitHub, without a Test Plan: line. Reviewed By: quark-zju Differential Revision: D51630746 Pulled By: evangrayk fbshipit-source-id: a7c3189e02a4c6da772dd9001e6b20078b5d7747 --- addons/isl-server/src/github/githubCodeReviewProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/isl-server/src/github/githubCodeReviewProvider.ts b/addons/isl-server/src/github/githubCodeReviewProvider.ts index 62aec5361355c..b1f1a888627b6 100644 --- a/addons/isl-server/src/github/githubCodeReviewProvider.ts +++ b/addons/isl-server/src/github/githubCodeReviewProvider.ts @@ -64,7 +64,7 @@ export class GitHubCodeReviewProvider implements CodeReviewProvider { // This is not very easy with github's graphql API, which doesn't allow more than 5 "OR"s in a search query. // But if we used one-query-per-diff we would reach rate limiting too quickly. searchQuery: `repo:${this.codeReviewSystem.owner}/${this.codeReviewSystem.repo} is:pr author:@me`, - numToFetch: 100, + numToFetch: 50, }); if (allSummaries?.search.nodes == null) { this.diffSummaries.emit('data', new Map());