coverallsapp / github-action

Coveralls Github Action
https://coveralls.io
MIT License
458 stars 76 forks source link

How to handle 422 errors (fork PRs coverage?) #150

Closed skrdgraph closed 1 year ago

skrdgraph commented 1 year ago

Referencing -> https://github.com/lemurheavy/coveralls-public/issues/1695

Hey Coveralls team,

We are having an issue on our OSS projects Badger & Dgraph with coveralls. The error message is as follows:

Run goveralls -coverprofile=cover.out
bad response status from coveralls: 422
{"message":"Couldn't find a repository matching this job.","error":true}
Error: Process completed with exit code 1.

We have noticed that this happens at random. We have mostly seen this happening on contributions from outside authors from their forks. Internal author contributions via branch/PR seems to work fine. Would it be possible to get a little help here?

Our workflows use GitHub Actions, and are available here & here

Some sample errors include (mostly from outside authors' PRs):

The failed jobs in those links all have the same error message as above. Looking forward to your help & guidance here.

What we have tried:

cc: @joshua-goldstein

mrexox commented 1 year ago

Hey! Thank you for the issue. This is very weird that the behavior is random. I guess that it happens here because there is a -service=github. And coveralls has an awkward bug which required repo token to be ${{ secrets.GITHUB_TOKEN }} in that case (only when explicitly specified service_name: 'github'.

We are going to fix this behavior, but as a workaround I'd recommend either not to use explicit -service parameter, or use it with -repotoken=${{ secrets.GITHUB_TOKEN }}. Please, write if it helps, if not - I will escalate the bug fix.

skrdgraph commented 1 year ago

Hey @mrexox thanks for the help. The real issue has been described here: https://github.com/dgraph-io/badger/pull/1894

It's documented here https://github.com/dgraph-io/badger/pull/1894#issue-1605540554

We are going to close this issue, as we are unblocked.