facebook / sapling

A Scalable, User-Friendly Source Control System.

Home Page:https://sapling-scm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReviewStack timing out

alex-statsig opened this issue · comments

Some of the PRs at my company fail to load in reviewstack because the github API calls time out (in particular it seems like one of the GraphQL "TreeQuery" calls times out). In this case, it's 2nd in a stack modifying only 15 files (based on a PR modifying 1 file). It looks like the Tree its trying to load contains 1100 entries.

I'm able to repro the query timing out in graphql explorer, so it seems like what's being queried is just too much. If I remove object { oid } from TreeFragment it does finish, but might be just squeezing by.

I'm also encountering a timeout issue when loading diffs in review stack, although I can't confirm if it's the same.

I saw on GitHub Docs that OAuth apps, which ReviewStack is registered as, don't scale rate limiting with the size of organisation and number of repos, where as GitHub apps scale. Could that be part of the issue?

"The rate limit for GitHub Apps using an installation access token scales with the number of repositories and number of organization users. Conversely, OAuth apps have lower rate limits and do not scale."

https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/differences-between-github-apps-and-oauth-apps