Repository navigation
[email protected] returning GraphQL errors when running gh pr checks command #7716
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Description
Activity
@danxg87 Thanks for reporting. This looks to be a regression in the latest version due to #7618. Could you run the command again with
GH_DEBUG=apienvironment variable enabled and paste the logs here so we can better debug what is happening? Please make sure to edit out any private details from the logs before pasting them.@samcoe for sure, here's the goods:
➤ GH_DEBUG=api gh pr checks 844 [git remote -v] [git config --get-regexp ^remote\..*\.gh-resolved$] ⣾* Request at 2023-07-17 16:07:54.143804 -0400 EDT m=+0.055318585 * Request to https://github...com/api/graphql > POST /api/graphql HTTP/1.1 > Host: github...com > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview > Authorization: token ... > Content-Length: 308 > Content-Type: application/json; charset=utf-8 > Graphql-Features: merge_queue > Time-Zone: America/New_York > User-Agent: GitHub CLI 2.32.0 GraphQL query: query PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) { repository(owner: $owner, name: $repo) { pullRequest(number: $pr_number) {number,headRefName,id} } } GraphQL variables: {"owner":"company","pr_number":844,"repo":"my_repo"} ⣽< HTTP/2.0 200 OK < Access-Control-Allow-Origin: * < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset < Content-Security-Policy: default-src 'none' < Content-Type: application/json; charset=utf-8 < Date: Mon, 17 Jul 2023 20:07:54 GMT < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin < Server: GitHub.com < Strict-Transport-Security: max-age=31536000; includeSubdomains < X-Accepted-Oauth-Scopes: repo < X-Content-Type-Options: nosniff < X-Frame-Options: deny < X-Github-Enterprise-Version: 3.8.4 < X-Github-Media-Type: github.merge-info-preview; param=nebula-preview; format=json < X-Github-Request-Id: ... < X-Oauth-Client-Id: ... < X-Oauth-Scopes: gist, read:org, repo, workflow < X-Ratelimit-Limit: 5000 < X-Ratelimit-Remaining: 5000 < X-Ratelimit-Reset: 1689628074 < X-Ratelimit-Resource: graphql < X-Ratelimit-Used: 0 < X-Runtime-Rack: 0.078155 < X-Xss-Protection: 0 { "data": { "repository": { "pullRequest": { "number": 844, "headRefName": "kd/testing-issues", "id": "ABC123" } } } } * Request took 199.599708ms * Request at 2023-07-17 16:07:54.344223 -0400 EDT m=+0.255735335 * Request to https://github...com/api/graphql > POST /api/graphql HTTP/1.1 > Host: github...com > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview > Authorization: token ... > Content-Length: 618 > Content-Type: application/json; charset=utf-8 > Graphql-Features: merge_queue > Time-Zone: America/New_York > User-Agent: GitHub CLI 2.32.0 GraphQL query: query PullRequestStatusChecks($id: ID!, $endCursor: String) { node(id: $id) { ...on PullRequest { statusCheckRollup: commits(last: 1) {nodes {commit {statusCheckRollup {contexts(first:100,after:$endCursor) {nodes {__typename...on StatusContext {context,state,targetUrl,createdAt,description,isRequired(pullRequestId: $id)},...on CheckRun {name,checkSuite{workflowRun{event,workflow{name}}},status,conclusion,startedAt,completedAt,detailsUrl,isRequired(pullRequestId: $id)}},pageInfo{hasNextPage,endCursor}}}}}} } } } GraphQL variables: {"id":"ABC123"} < HTTP/2.0 200 OK < Access-Control-Allow-Origin: * < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset < Content-Security-Policy: default-src 'none' < Content-Type: application/json; charset=utf-8 < Date: Mon, 17 Jul 2023 20:07:54 GMT < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin < Server: GitHub.com < Strict-Transport-Security: max-age=31536000; includeSubdomains < X-Accepted-Oauth-Scopes: repo < X-Content-Type-Options: nosniff < X-Frame-Options: deny < X-Github-Enterprise-Version: 3.8.4 < X-Github-Media-Type: github.merge-info-preview; param=nebula-preview; format=json < X-Github-Request-Id: ... < X-Oauth-Client-Id: ... < X-Oauth-Scopes: gist, read:org, repo, workflow < X-Ratelimit-Limit: 5000 < X-Ratelimit-Remaining: 5000 < X-Ratelimit-Reset: 1689628074 < X-Ratelimit-Resource: graphql < X-Ratelimit-Used: 0 < X-Runtime-Rack: 0.065463 < X-Xss-Protection: 0 { "errors": [ { "path": [ "query PullRequestStatusChecks", "node", "... on PullRequest", "statusCheckRollup", "nodes", "commit", "statusCheckRollup", "contexts", "nodes", "... on CheckRun", "checkSuite", "workflowRun", "event" ], "extensions": { "code": "undefinedField", "typeName": "WorkflowRun", "fieldName": "event" }, "locations": [ { "line": 5, "column": 274 } ], "message": "Field 'event' doesn't exist on type 'WorkflowRun'" } ] } * Request took 102.166791ms GraphQL: Field 'event' doesn't exist on type 'WorkflowRun' (query PullRequestStatusChecks.node.... on PullRequest.statusCheckRollup.nodes.commit.statusCheckRollup.contexts.nodes.... on CheckRun.checkSuite.workflowRun.event)- addedpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functionsand removedneeds-triageneeds to be reviewedneeds to be reviewed
on Jul 18, 2023 Ah thanks so much! This is an organizational appliance; I don't have say in maintaining/updating it unfortunately :( For now I've pinned our gh version to the 2.31.0 release and our workflows are back to normal. I'll be sure to bring this issue up with that team so they're aware. Thanks again!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Describe the bug
This has been encountered only with the latest gh release
2.32.0:When we run
gh pr checksorgh pr checks $PR_NUMBERorgh pr checks $BRANCH_NAMEwe always receive the following message:Note: This has been replicated both locally on Linux+MacOS and on github action runners (where we first debugged this failure) for us.
Steps to reproduce the behavior
gh pr checks $PR_NUMBERwhere$PR_NUMBERis the number of the pull request in questionExpected vs actual behavior
Expect: the usual pr checks to show with any failed/passed/pending PR checks
Actually: receive the above gql failure message
Logs
NOTE: When manually downloading/running
2.31.0everything works just fine.