Repository navigation
fix(success): query associated PRs in smaller serial chunks - #1319
Open
mihir-kandoi wants to merge 2 commits into
Open
mihir-kandoi wants to merge 2 commits into
mihir-kandoi wants to merge 2 commits into
Conversation
Large releases sent one GraphQL query per 100 commits, all at once. Each query took over GitHub's 10 second limit, so the API returned 502/504 and the success step failed before commenting on any PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a large release, the
successstep fails before it comments on any PR.The plugin builds one
getAssociatedPRsGraphQL query per 100 commits and sends all of them in parallel. A 100-commit query takes longer than GitHub's 10 second GraphQL limit, so the API returns 502/504. Depending on the response, the step fails withHttpError 504or withTypeError: Cannot destructure property 'repository' of '(intermediate value)' as it is undefined(lib/success.js:81).This happens on every large release of frappe/erpnext, for example v16.52.0 (708 commits) and v15.124.0 (331 commits). The release gets published, but no PR gets a comment.
Solution
I replayed the plugin's query against the 708 commits of erpnext v16.52.0:
Steps to reproduce
semantic-releasewith@semantic-release/github.successstep fails with a 502/504 or therepositoryTypeError, and no PR gets a comment.