Skip to content

feat(plugins/base): split base queries to reduce GitHub API timeouts#584

Merged
lowlighter merged 2 commits intomasterfrom
feat-base-reduce-timeouts
Oct 22, 2021
Merged

feat(plugins/base): split base queries to reduce GitHub API timeouts#584
lowlighter merged 2 commits intomasterfrom
feat-base-reduce-timeouts

Conversation

@lowlighter
Copy link
Owner

Some really active users may have issues with GitHub GraphQL API, often caused timeouts with the crytpic error message:

Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include XXXX:XXXX:XXXXXX:XXXXXX:XXXXXXXX when reporting this issue

While we cannot be sure which stats is causing this (could be because user have a lot of repo, huge repositories, lot of comments, etc.), this PR splits the base GraphQL query in smaller chunks.

Because the base plugin is required in order to use others plugins (except the ones that can be used with token: NOT_NEEDED), Metrics (including Insights) were totally unusable for these users.

If a specific stats cannot be retrieved, for now NaN will be displayed instead (display will be improved in a future PR)

sindresorhus

Because Insights actually use the same engine, it'll also improve its performance.

Note that this PR does not solve all issues for "huge users", who may still encounter issues with other plugins, but will still be able to use most of Metrics 🙂

Copy link
Contributor

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed the problem I was encountering
jayvdb/jayvdb@c252cce

@lowlighter lowlighter merged commit ead8bd2 into master Oct 22, 2021
@lowlighter lowlighter deleted the feat-base-reduce-timeouts branch October 22, 2021 04:05
felipecrs added a commit to felipecrs/felipecrs that referenced this pull request Oct 22, 2021
@lowlighter lowlighter mentioned this pull request Oct 24, 2021
4 tasks
@felipecrs
Copy link

@lowlighter I'm not sure if I should open a new issue or what, but I upgraded to the newest master version and it's still raising the same issue:

https://github.com/felipecrs/felipecrs/runs/3988910176?check_suite_focus=true#step:2:748

@lowlighter
Copy link
Owner Author

@felipecrs Only the base plugin has been currently patched for GitHub API timeouts issues, the other plugins are tracked in #598 🙂

In your case it seems to be related to both reactions and followup plugins from the errors logs

@felipecrs
Copy link

Got it. Thanks a bunch!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants