-
Notifications
You must be signed in to change notification settings - Fork 7
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
Coveralls fails to upload with HTTP 422 "Unprocessable Entity" on retried builds #1435
Comments
We have the same issue in many of our PRs. We use coveralls in Travis. Couple of days ago it stopped working in some cases. And the retries do not help. |
I had the same issue, make sure that travis has |
Yes, status code should be 409. |
un-related but still helpful for me. If you fork a repo that has circleci and it uses coveralls, you need to setup coveralls yourself and add to the repo project environment settings the COVERALLS_REPO_TOKEN and the token for your forked repo. I think this is the case if "Pass secrets to builds from forked pull requests" is set to Disabled. |
I was facing the same issue on Github actions, adding
|
* fix unit tests * use github actions * Update ci.yml * Update ci.yml * update ci.yml * remove stray - * don't freshclam * no need to start clamd on ubuntu * add sockets for testing to clamd.conf * please sudo + some isort * install daemon? * start clamd + some isort * coverage * debug clamd * configure defaults * configure defaults * freshclam? * use different logfile for freshclam * typo * test virus signature changes, debug geckodriver * debug geckodriver * fix test * install xvfb * install xvfb * remove robot test dummy * remove robot test boilerplate * omit createcoverage script to deal with coverage errors * pip location * github token for coveralls; rm .travis.yml * play with coverage command line; update changelog, python versions * try lemurheavy/coveralls-public#1435 (comment) * update readme badges * test Python 3.6-3.8, coverage from master (once it's calculated) * make tests more robust
Same issue - and this solution is not helping. I mirgrated 20+ repositories from Travis CI to GitHub Actions, and of those ca. 17 just worked, and 3 do not work at all and error with above (422) error message, although all repositories have a uniform layout. gh actions with errors |
Thanks @solancer , this helped. But I was really close to not even trying this. Because a moment before Coveralls outputted this in a previously failed run:
...so I was sure that it already knows that it is running on GitHub (Actions). |
Try setting the env before the run |
@solancer I am not sure what you mean with Could you create a Pull Request to any of the three mentioned repositories? That would be super awesome! |
@jugmac00 can you please try running some builds in debug mode for those failing repos, per instructions here. Please share the new build logs and we'll see if we can gain some more insight as to what is failing and why. |
@jugmac00 I've raised a PR with a fix, seems to work fine now |
@afinetooth As requested, I ran coveralls with the debug command, see https://github.com/morepath/morepath_rest_dump_load/pull/14/checks?check_run_id=1767517263 The relevant output is:
The corresponding @solancer Thanks so much for your effort. Unfortunately, you also seem to have activated the debug mode, which means, it is not tried to send data to coveralls, and thus the build succeeds, but without reporting :-/ |
@jugmac00 yes, the issue is that no source files are being sent. Per the JSON in the debug output, the
This means you'll need to configure your project to pass your coverage report to your python-based coveralls integration, so it can convert the report into JSON and POST it to the coveralls API. As an example, here are instructions for coveralls-python: |
@afinetooth Thanks for you suggestion. I have read the documentation but found no clue what I should change. See, I have 20 repositories with the almost exact same configuration, 17 work, 3 fail. I just copied the 100% exact same configuration (both gh action and tox config) from https://github.com/morepath/morepath_sqlalchemy and created a PR for morepath/morepath_rest_dump_load#15 - the first one works, the latter one fails. I cannot imagine this is a configuration issue. |
Hi @jugmac00 I still think the underlying issue here is that the project is not sending any source files to the coveralls API (according to that debug output).
"Configuration" was probably not the clearest description of what needs to be done. What the empty coveralls-python uses a default location where it looks for your coverage report. If it's not finding it, it means your project might be failing to generate one, or that it's saving it someplace besides the standard location. This documentation gives the config flag to tell coveralls-python where your coverage report is:
You'll want to find out:
Once you do, you can (hopefully) use the flag above to pass the right location. Here are two things to try in the meantime to help get you there:
|
#165) * fix coveralls, see lemurheavy/coveralls-public#1435 (comment) * fix typo
See [0] for reference. [0]: lemurheavy/coveralls-public#1435
See [0] for reference. [0]: lemurheavy/coveralls-public#1435
See [0] for reference. [0]: lemurheavy/coveralls-public#1435
So, any update here? I've got this error on PR, but on master not. |
@pbelskiy can I pls ask you to create a new issue with your specific issue, coveralls repo URL, and build URL(s) that are affected? I assume you're getting a 422 error, but I'm thrown off by the history here and the number of users / different possible scenarios. Feel free to refer to this issue or any relevant comment here. Thanks. |
Ran into this myself today (in context of asyncee/django-easy-select2#96); I have also seen coveralls crash when there is no |
The error is this: coveralls.exception.CoverallsException: Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs And I'm getting the solution from [here](lemurheavy/coveralls-public#1435)
Hello. First of all, thank you for your service free of charge!
Now, to the problem:
Coveralls fails on sending the data with HTTP 422 Unprocessable Entity:
This happens always with one specific scenario:
First of all, some better error message or status code would be nice. HTTP 409 "Conflict" is usually returned when trying to create something that already exists (if that is actually the cause).
And second: how to fix this issue? Previously, it worked even when the tests were failing and then retried.
Thanks.
The text was updated successfully, but these errors were encountered: