Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutation Failure: dangerfileFinished #469

Open
ashfurrow opened this issue Jan 28, 2020 · 1 comment
Open

Mutation Failure: dangerfileFinished #469

ashfurrow opened this issue Jan 28, 2020 · 1 comment

Comments

@ashfurrow
Copy link
Member

Artsy is running its own Peril installed on Heroku and we noticed that the dangerfileFinished mutation is returning a 400 response in our logs. It appears to be making the API call to itself, and this failure isn't causing problems for us. It appears similar to #307.

I've enabled debug logging for the relevant file:

2020-01-28T16:32:50.152097+00:00 app[web.1]: Tue, 28 Jan 2020 16:32:50 GMT runFromSameHost info: Danger run finished in 5.005s, sending results
2020-01-28T16:32:50.152136+00:00 app[web.1]: 
2020-01-28T16:32:50.152573+00:00 app[web.1]: Tue, 28 Jan 2020 16:32:50 GMT runFromSameHost info: Making GraphQL API request to host https://artsy-peril-api.herokuapp.com, query: {"query":"\n  mutation {\n    dangerfileFinished(\n      jwt: \"A_VALID_JWT\",\n      name: \"pull_request\",\n      dangerfiles: [\"artsy/peril-settings@org/allPRs.ts\", \"artsy/peril-settings@org/jira/pr.ts\", \"artsy/peril-settings@org/ossPRsForbidForks.ts\"],\n      time: 5.005\n      \n    ) {\n      success\n    }\n  }\n"}
2020-01-28T16:32:50.152575+00:00 app[web.1]: 
2020-01-28T16:32:50.156776+00:00 app[web.1]: Tue, 28 Jan 2020 16:32:50 GMT runFromSameHost Found no issues or messages from Danger. Removing any existing messages on GitHub.
2020-01-28T16:32:50.156779+00:00 app[web.1]: 
2020-01-28T16:32:50.184964+00:00 app[web.1]: Tue, 28 Jan 2020 16:32:50 GMT runFromSameHost info: Got GraphQL API result (400) back: {"size":0,"timeout":0}
2020-01-28T16:32:50.184968+00:00 app[web.1]: 
2020-01-28T16:32:50.185488+00:00 app[web.1]: Tue, 28 Jan 2020 16:32:50 GMT runFromSameHost error: Error making an API call to the GraphQL API
2020-01-28T16:32:50.185491+00:00 app[web.1]: 
2020-01-28T16:32:50.185993+00:00 app[web.1]: Tue, 28 Jan 2020 16:32:50 GMT runFromSameHost error: undefined
2020-01-28T16:32:50.185996+00:00 app[web.1]: 
2020-01-28T16:32:50.183453+00:00 heroku[router]: at=info method=POST path="/api/graphql" host=artsy-peril-api.herokuapp.com request_id=bfd056d8-f22d-4741-a3a7-1bc474d0e32b fwd="IP_ADDRESS dyno=web.1 connect=0ms service=4ms status=400 bytes=306 protocol=https

The data section of the decoded JWT is:

  "data": {
    "actions": [
      "scheduleTask",
      "dangerfileFinished"
    ]
  },

Any insight on where to look next would be appreciated 🙇

@orta
Copy link
Member

orta commented Jan 28, 2020

perhaps this raises and is silently caught somewhere?

https://github.com/danger/peril/blob/master/api/source/api/graphql/mutations/mutations.ts#L239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants