-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Github Actions raises a 422 error #252
Comments
Upstream issue described here: TheKevJames/coveralls-python#252 Sicne that bug is still in progress it is likely this will need to be revisited in the future.
coveralls.io is throwing 422 and breaking CI, this may or may not help. Related: TheKevJames/coveralls-python#252
Hi @TheKevJames, thanks for your work with this tool. I was following up on the recent updates to this tool. I came across this workaround and I was trying to use this. I was trying to migrate a few repositories from travis to github actions and I faced the 422 error even after using the 👍 grimoirelab-perceval-opnfv build and its workflow file |
Just in case the additional information helps: In our projects, the 422 error only shows up on Python 3.9 with latest package levels. Not on Python 3.9 with our minimum package levels, and not on older Python versions. See for example this Actions run: https://github.com/pywbem/pywbem/actions/runs/484671222 |
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
@TheKevJames Do we have some examples of situations where I was involved in #227 which made it possible to do test matrix builds with coveralls correctly, so I might be able to remember something, but my memory of it is somewhat foggy. (I also think that |
That's because python 3.9 + latest package levels is the only configuration that actually uses the new coveralls-python 3.0.0. All the other use 2.1.2, which isn't broken by f4faa92 yet. |
@nickmerwin Would you perhaps be able to shed some light on what's the difference between |
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
My understanding of it is that if you are using the Github Actions natively provided GITHUB_TOKEN secret or ${{ github.token }}, you use the github service. Coveralls then works some internal magic, querying build and authentication info via GitHub APIs using that token. |
Seems that new coveralls release failed to autodetect github CI TheKevJames/coveralls-python#252 Signed-off-by: Martin Bašti <mbasti@redhat.com>
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Details: * coveralls-python 3.0.0 has an issue whereby the coveralls.io site responds with HTTP status 422. Mitigated this by pinning coveralls-python to <3.0.0. See also TheKevJames/coveralls-python#252. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Hi, thank you so much for this great package. |
See TheKevJames/coveralls-python#252: the coveralls API requires a service name, which used to be 'github', but a new release of https://pypi.org/p/coveralls switched the default to 'github-actions'. Nobody understands the exact difference between the two, but I have 19 repositories that now fail coveralls uploads using the 'github-actions' service name, and I hope that switching to 'github' will fix them.
@stephane-caron solution worked for me too. |
I solved it this way, removing the |
I also ran into this issue in the opposite way (I was using the |
Adds some more of the info users have reported in TheKevJames#252.
This has just started out of the blue for us. I thought it might have been linked to an upgrade to We had been using the I'd really prefer not to have to delete the data from coveralls. Is that really the only option here? |
Since a few days, coveralls fails to upload from GitHub Actions with the 422 error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs This happened now also with coveralls 2.1.2, I retried with coveralls 3.3.1 with and without This happens on all Python versions we support (2.7, 3.5-3.11). This started occurring only a few days ago. Before that, it ran fine. I could not identify any relevant package version changes between the last run that worked and now. Update: I ran coveralls in debug mode, and for Python 3.11 with latest package levels (coveralls version 3.3.1),and with
Note that I have reported another occurrence of this issue to coveralls.io: lemurheavy/coveralls-public#1710 |
Can re-enable once this is resolved: TheKevJames/coveralls-python#252
@elParaguayo Note that I removed and added one of our repos (https://github.com/zhmcclient/python-zhmcclient) from coveralls.io, and that did not fix the issue with this new occurrence of HTTP 422. |
@TheKevJames One question: Is the JSON shown when running coveralls in debug mode, directly the HTTP body that is sent to coveralls.io? Update: After looking at the code, I can answer this myself with : Yes. |
I think I have found the fix for this issue, and have launched PR #385 with the fix. For users finding this issue: Without using that PR, the same solution can be achieved in anyone's GitHub Actions workflow as follows, as long as a version of coveralls is used that supports the For sending the result of each parallel run:
For sending the finish request for parallel runs:
If this solution does not work for you, or if you find that you have to use the service name "github-actions", please comment on this issue. |
* Actions: Update coveralls flag name * fix 422 error See TheKevJames/coveralls-python#252
Had no problems with coveralls on Sep 28 and then subsequently, Nov 10, it stopped working with this 422 error. The first job report succeeds, but whenever a subsequent parallel job tries to post the coverage report, it fails with 422. Something seems to have changed between those dates. In any case, the suggestion by @andy-maier fixed the issue. # ... matrix job
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ COVERALLS_PARALLEL: "true"
+ COVERALLS_SERVICE_JOB_ID: ${{ github.run_id }}
run: |
pip install --upgrade coveralls
coveralls --service=github
+ finish:
+ runs-on: ubuntu-latest
+ needs: build
+ steps:
+ - name: finish coveralls
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ pip install --upgrade coveralls
+ coveralls --service=github --finish |
Default will be changing to |
This is a known issue -- there are some cases where Github actions needs to be run with the
github-actions
service name and some cases where it must use thegithub
service name. We have as of yet been unable to determine what causes the difference in usecase.Running
coveralls
on Github Actions will use thegithub-actions
service name by default. If you see a 422 error get raised, please try runningcoveralls --service=github
, instead:If anyone discovers the secret sauce behind when coveralls requires each name, please let me know -- I'd love to fix the auto-detection!
The text was updated successfully, but these errors were encountered: