-
Notifications
You must be signed in to change notification settings - Fork 7
coveralls.io HTTP 422 "Unprocessable Entity for url: https://coveralls.io/api/v1/jobs" #1710
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
Comments
I found the following in https://docs.coveralls.io/api-jobs-endpoint :
The descriptions of However, when looking at the source code of coveralls-python here, it sets So my questions are:
|
I experimented with the service_job_id, service_name, etc. parameters of the coveralls-io API using the https://github.com/pywbem/nocasedict Python project, by using coverall-python's ability to override these parameters from the environment, and here are the results:
In all cases with HTTP status 422, the HTTP message was "Unprocessable Entity for url: https://coveralls.io/api/v1/jobs" Due to the env var based approach for overriding the default parameter values coveralls-python generates , I could not test the case where |
@andy-maier thank you for the thorough rundown of your issue and your tests. tl;drWe think a recent change on our side may have caused this issue for users of coveralls-python and are looking for a fix, even though, at this point, the fix is not obvious to us. Really glad you found a workaround, and I'm sure that will help other users in the same situation until we can resolve this, so 🙏 . I will update this card as soon as we've made some meaningful progress and will also attempt to answer as many of your questions, above, as I can. DetailsPerhaps to clear some fog on the major disconnects here, I'll share this for now: We're aware that a quirk in our implementation of our Github Action probably forced the workaround in coveralls-python that resets (or unsets)
|
@andy-maier we have applied a fix for your issue and would like to know if it has resolved it. I understand you have applied a workaround on your end, so barring the status of the original issue, please let us know if your workaround has been affected at all. |
I just reran a previously erroring PR workflow and it passed. Hopefully @andy-maier and everyone else affected by this will find the same positive result upon retrying affected workflows! |
@dgw great! Thanks for the update. Hope so too. |
Same here, previously failing workflow is now passing again. Thank you for the fix! |
Excellent. Thanks @anamileva. |
I'm getting a very similar error when trying to push coverage report to Coveralls from my Travis build:
I haven't changed any CI/CD configuration settings. The exact same configuration has worked for me as early as April 25 2023. |
CI in repos mentioned here #1708 (comment) are now operational again - many thx! |
Thanks, @woodsp-ibm! Hi, @Glusk. I think this is a different issue. I have started a new issue for it here: Please come join me there. |
@afinetooth Hello James, I did not try without the circumvention (i.e. setting the COVERALLS_SERVICE_JOB_ID and COVERALLS_SERVICE_NUMBER env vars, and using Python coveralls 3.3.1) yet. In the past few days since I opened this issue, that circumvention worked fine. However, today the coveralls.io submissions started failing again with HTTP 422 "Unprocessable Entity" without any change on our end. Actions run: https://github.com/zhmcclient/python-zhmcclient/actions/runs/4890476122/jobs/8730913695?pr=1146 Update: The new 422 must have been a temporary condition. It runs fine again, with the circumvention: https://github.com/zhmcclient/python-zhmcclient/actions/runs/4892178353/jobs/8733627978 and also when reducing the circumvention to not set COVERALLS_SERVICE_JOB_ID: https://github.com/zhmcclient/python-zhmcclient/actions/runs/4892585029/jobs/8734515698 |
I guess when ignoring the temporary new 422 glitch mentioned above, the bottom line is that right now it works fine both with and without specifying COVERALLS_SERVICE_JOB_ID. (We still specify COVERALLS_SERVICE_NUMBER to have a more user friendly naming for the builds/jobs on coveralls.io, and that works, too). Should we pursue PR TheKevJames/coveralls-python#385 which provides the "service_job_id" parameter when submitting a parallel job to coveralls.io? |
Hi @andy-maier thanks for the update. I'm afraid I can't account for the temporary 422, but I'm glad to hear its working now, and in particular, I'm happy you found a good approach to control the naming of your builds and jobs that suits you; it's one of the advantages of learning about the params accepted by the /jobs endpoint that you can get some more control over that aspect of your integration. Re: TheKevJames/coveralls-python#385, while I don't feel comfortable weighing in on whether the project should accept the PR, since it's not a project we maintain, I do want to clarify some comments made by my colleague, @mrexox, there on the PR, so you know where we're coming from on those and can make further decisions about your ultimate changes:
@mrexox anything to add? |
I can confirm everything above! The only thing to add - when using |
I am still facing this issue. My GitHub CI looks like this. This works fine for Python 3.10 but fails in Python 3.9 and 3.11: - name: Run Coveralls
if: ${{ success() }}
run: |
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
@sahiljhawar Please see this successful configuration shared above by user @andy-maier. It may provide suggestions for additional tweaks of your current config. |
The HTTP 422 issue has already pretty wide coverage on stackoverflow, this issue tracker, and in the issue trackers of some of the clients, such as https://github.com/TheKevJames/coveralls-python.
Since a few days, it reappeared out of nowhere, on all of our repos on Github. They all use Github Actions. They all were able to deliver coverage results successfully to coveralls.io before.
After trying with a few of our repos, I went to a rather small Python project to reproduce it.
On Python 3.11 with coveralls 3.3.1, the Github Actions log shows this (From https://github.com/pywbem/nocasedict/actions/runs/4843078401/jobs/8630438981):
Note that this is a new message for "Unprocessable Entity", not the one described in https://docs.coveralls.io/common-issues-and-troubleshooting#issue-422-github-actions
When running coveralls in debug mode, it shows JSON output. Not sure whether this is directly what is sent to coveralls.io, but here it is:
The run for that is https://github.com/pywbem/nocasedict/actions/runs/4843120923/jobs/8630508203
Note that service_name is "github-actions", which is what coveralls-python uses by default when it detects to run on Github Actions.
I retried with the
--service=github
option (which is a workaround recommended in some places) but this did not change the result - the 422 result happened as before (see run https://github.com/pywbem/nocasedict/actions/runs/4843145025/jobs/8630548586). On another project where I tried that, I could verify that this causes"service_name": "github"
to be set in debug mode.Do you think it is possible to improve the error message that is returned with the 422 HTTP response so that the client programs have a chance to understand what the issue was?
Can you figure out from the coveralls debug output shown above what is possibly wrong with the input data sent to coveralls.io?
Any other ideas on why this issue suddenly reappeared?
BTW, we are not the only ones where this reappeared. There is at least one other report: TheKevJames/coveralls-python#252 (comment)
On another project (https://github.com/zhmcclient/python-zhmcclient), I tried another recommendation I found: To remove the repo from coveralls.io and to add it again. That did not fix it, either.
The text was updated successfully, but these errors were encountered: