Sporadic 502s fetching PR data


#1

Hi there,

It seems that the sporadic 405s when fetching batches of pull requests have been replaced with sporadic 502s.

I suspect you’re already aware of this but wanted to provide some sample requests to help with the investigation.

The error is always of the form Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include 'EA06:8FDC:2D9BD3C:56E05DD:599AFE05' when reporting this issue..

EA06:8FDC:2D9BD3C:56E05DD:599AFE05
928E:8FDC:2D98EB0:56DA262:599AFDD6
E9EA:8FDC:2D9543E:56D24B4:599AFD95
E9D8:8FDC:2D90FC1:56C93A5:599AFD4C
9252:8FDE:247B0CD:5F7498A:599AFD08
9248:8FDA:19AF72E:3589EFE:599AFCD1
E9B2:8FDE:247372E:5F63139:599AFC98

The platform has been unstable today but this is a regular occurrence (although maybe more pronounced today).

Thanks
Nick


#2

Hi @nomeyer,

Are you still having this problem? Is it with the same query, or a series of different queries?


#3

Hi @bswinnerton, it tends to be for similar queries but not identical from what I remember (I was getting pages of PRs with different nested pages – comments, reviews, etc.).

I could try to reproduce this but I was hoping these ids I reported would allow you to find the details you need?


#4

Just reproduced it, it still occurs. Here are a few sample queries for which it occurred.

C654:1F32:2C29A34:5D516C9:59AEC83E

repository(owner: "nodejs" name: "node") {
  name
  pullRequests(last: 30 ) {
    edges {
      node {
        number
        author {
          avatarUrl
          login
          url
        }
        baseRefName
        body
        closed
        createdAt
        headRefName
        locked
        mergeCommit {
          author {
            avatarUrl
            date
            email
            name
            user {
              avatarUrl
              login
              name
              url
            }
          }
          authoredByCommitter
          committedDate
          committer {
            avatarUrl
            date
            email
            name
            user {
              avatarUrl
              login
              name
              url
            }
          }
          messageBody
          messageBodyHTML
          messageHeadline
          messageHeadlineHTML
          oid
          status {
            contexts {
              context
              createdAt
              creator {
                avatarUrl
                login
                url
              }
              description
              state
              targetUrl
            }
            state
          }
          url
        }
        mergeable
        mergedAt
        potentialMergeCommit {
          status {
            contexts {
              context
              createdAt
              creator {
                avatarUrl
                login
                url
              }
              description
              state
              targetUrl
            }
            state
          }
        }
        state
        suggestedReviewers {
          isAuthor
          isCommenter
          reviewer {
            avatarUrl
            login
            name
            url
          }
        }
        title
        url
        commits(last: 100 ) {
          edges {
            node {
              commit {
                author {
                  avatarUrl
                  date
                  email
                  name
                  user {
                    avatarUrl
                    login
                    name
                    url
                  }
                }
                authoredByCommitter
                commitUrl
                committedDate
                committer {
                  avatarUrl
                  date
                  email
                  name
                  user {
                    avatarUrl
                    login
                    name
                    url
                  }
                }
                message
                messageBody
                messageBodyHTML
                messageHeadline
                messageHeadlineHTML
                oid
                status {
                  contexts {
                    context
                    createdAt
                    creator {
                      avatarUrl
                      login
                      url
                    }
                    description
                    state
                    targetUrl
                  }
                  state
                }
                url
              }
              url
            }
          }
          pageInfo { startCursor hasPreviousPage }
          totalCount
        }
      }
    }
    pageInfo { startCursor hasPreviousPage }
    totalCount
  }
}

C682:1F34:4C38DB5:92F7D3D:59AEC875

repository(owner: "nodejs" name: "node") {
  name
  pullRequests(last: 30 before: "Y3Vyc29yOnYyOpHOCEmXkg==") {
    edges {
      node {
        number
        author {
          avatarUrl
          login
          url
        }
        baseRefName
        body
        closed
        createdAt
        headRefName
        locked
        mergeCommit {
          author {
            avatarUrl
            date
            email
            name
            user {
              avatarUrl
              login
              name
              url
            }
          }
          authoredByCommitter
          committedDate
          committer {
            avatarUrl
            date
            email
            name
            user {
              avatarUrl
              login
              name
              url
            }
          }
          messageBody
          messageBodyHTML
          messageHeadline
          messageHeadlineHTML
          oid
          status {
            contexts {
              context
              createdAt
              creator {
                avatarUrl
                login
                url
              }
              description
              state
              targetUrl
            }
            state
          }
          url
        }
        mergeable
        mergedAt
        potentialMergeCommit {
          status {
            contexts {
              context
              createdAt
              creator {
                avatarUrl
                login
                url
              }
              description
              state
              targetUrl
            }
            state
          }
        }
        state
        suggestedReviewers {
          isAuthor
          isCommenter
          reviewer {
            avatarUrl
            login
            name
            url
          }
        }
        title
        url
        
        
        commits(last: 100 ) {
          edges {
            node {
              commit {
                author {
                  avatarUrl
                  date
                  email
                  name
                  user {
                    avatarUrl
                    login
                    name
                    url
                  }
                }
                authoredByCommitter
                commitUrl
                committedDate
                committer {
                  avatarUrl
                  date
                  email
                  name
                  user {
                    avatarUrl
                    login
                    name
                    url
                  }
                }
                message
                messageBody
                messageBodyHTML
                messageHeadline
                messageHeadlineHTML
                oid
                status {
                  contexts {
                    context
                    createdAt
                    creator {
                      avatarUrl
                      login
                      url
                    }
                    description
                    state
                    targetUrl
                  }
                  state
                }
                url
              }
              url
            }
          }
          pageInfo { startCursor hasPreviousPage }
          totalCount
        }
        
        
        
      }
    }
    pageInfo { startCursor hasPreviousPage }
    totalCount
  }
}

DD84:1F32:2C2EF97:5D5D3BC:59AEC8AB

repository(owner: "nodejs" name: "node") {
  name
  pullRequests(last: 30 before: "Y3Vyc29yOnYyOpHOCEIcKQ==") {
    edges {
      node {
        number
        author {
          avatarUrl
          login
          url
        }
        baseRefName
        body
        closed
        createdAt
        headRefName
        locked
        mergeCommit {
          author {
            avatarUrl
            date
            email
            name
            user {
              avatarUrl
              login
              name
              url
            }
          }
          authoredByCommitter
          committedDate
          committer {
            avatarUrl
            date
            email
            name
            user {
              avatarUrl
              login
              name
              url
            }
          }
          messageBody
          messageBodyHTML
          messageHeadline
          messageHeadlineHTML
          oid
          status {
            contexts {
              context
              createdAt
              creator {
                avatarUrl
                login
                url
              }
              description
              state
              targetUrl
            }
            state
          }
          url
        }
        mergeable
        mergedAt
        potentialMergeCommit {
          status {
            contexts {
              context
              createdAt
              creator {
                avatarUrl
                login
                url
              }
              description
              state
              targetUrl
            }
            state
          }
        }
        state
        suggestedReviewers {
          isAuthor
          isCommenter
          reviewer {
            avatarUrl
            login
            name
            url
          }
        }
        title
        url
        
        
        commits(last: 100 ) {
          edges {
            node {
              commit {
                author {
                  avatarUrl
                  date
                  email
                  name
                  user {
                    avatarUrl
                    login
                    name
                    url
                  }
                }
                authoredByCommitter
                commitUrl
                committedDate
                committer {
                  avatarUrl
                  date
                  email
                  name
                  user {
                    avatarUrl
                    login
                    name
                    url
                  }
                }
                message
                messageBody
                messageBodyHTML
                messageHeadline
                messageHeadlineHTML
                oid
                status {
                  contexts {
                    context
                    createdAt
                    creator {
                      avatarUrl
                      login
                      url
                    }
                    description
                    state
                    targetUrl
                  }
                  state
                }
                url
              }
              url
            }
          }
          pageInfo { startCursor hasPreviousPage }
          totalCount
        }
      }
    }
    pageInfo { startCursor hasPreviousPage }
    totalCount
  }
}

You can see that they’re identical queries except for the pull request page cursor. It seems to be what I’m observing currently but I wouldn’t take it as a guarantee that it only occurs for this type of query.


#5

Thanks for adding those, @nomeyer.

I’ve added an internal issue to investigate this on our end.


#6

Hi @bswinnerton, any update on this? This is still happening and is really annoying – it causes our pipelines to fail when it happens too many times in a row.


Randomly unable to fetch commit author fields (`author`, `authoredDate`, `authoredByCommitter`) – API returns 502s
#7

I’m having the same issue: “Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include F324:0791:B8B448:1CB91CC:5B001B22 when reporting this issue.”


#8

@PierreRochard in your case, the request is timing out. This is something we’re working on solving, but in the mean time, could you request less PRs?

@nomeyer if you have a request ID from the error message, I can let you know what’s going on. If it’s also a timeout, requesting less data at a time will work as a temporary solution while we work on fixing the root cause.


#9

Thanks @d12. I don’t have any new ones at hand, will make sure to send them over next time we encounter issues. Are you able to take a look at the request ids I’ve already shared? Or they’re too old and no longer relevant?


#10

Hey @nomeyer,

I wasn’t able to pull up any information on your queries from last September. Those are quite hefty queries though, so it’s safe to assume they were timing out.

It looks like those queries work now, which is great. If you come across another error, let me know and I can dig into it for you!


#11

Hi,

I’m getting intermittent 502s on PR queries as well, and they seem to be load related. I get them during AU morning / US afternoon (around 3:11pm PST) but then the queries work fine later.

Unfortunately I don’t have any request ids for you - i’ve hacked https://github.com/hecateapp/graphql-client/commit/1f1b0c6132f9bc092fb981e19ffb5402b70468cb into a fork of graphql-client but the query has been working since I deployed it.

Query that is failing is

query($login: String!) {
    repositoryOwner(login: $login) {
      repositories(
        first: 60,
        orderBy: {field: PUSHED_AT, direction: DESC}
      ) {
        nodes {
          name,
          pullRequests(
            first: 50, 
            states:[MERGED],
            orderBy: {field: UPDATED_AT, direction: DESC}
          ) {
            nodes {
              title,
              number,
              merged,
              mergedAt,
              url,
              repository {
                nameWithOwner,
                name
              },
              author {
                login,
                avatarUrl
              }
            }
          }
        }
      }
    }
  }