-
Notifications
You must be signed in to change notification settings - Fork 32
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
subprocess.CalledProcessError: Command '('coverage', 'json', '-o', '-')' returned non-zero exit status 2. #303
Comments
Indeed, this is probably not a permission issue (this message is there because it used to be the case that most issues were permission issues, but it might not be the case anymore) I'm not sure the truncating is by GitHub and not by someone else in the stack, but it's hard to say. I guess one possible way to help debugging would be to output stderr before stdout when there's an issue. |
I've made a PR that adds logs. You may need to activate debug mode. Please let me know whether this gives you enough info to solve the issue on your side or if there still is a bug. Note that I have no idea who ends up truncating the output. |
https://github.com/descope/python-sdk/actions/runs/7086877486/job/19345603602
still no idea 🤷♀️ |
Ok, so empty stderr, the command stops just like that. (or the stderr is entirely truncated, but... How ? Why ? Who ?) Could it be a sigkill, like an OOM or something ? I should have displayed the exit code... |
Made a second attempt. Should be merged in a few minutes. Let's see if the exit code gives us a bit of info on how the process exited. Hoping for a 137 or something. Or maybe a small number but maybe Coverage uses meaningful exit codes (we'll check if it's relevant) |
So feel free to rerun the CI and check the debug message. |
Hi, happy new year :) |
Hi there! I believe I have ran into the same issue.
Please let me know what other information I could provide you.
|
Can you share your configuration from the workflow files (just the relevant parts) ? |
- name: Django Tests
run: coverage run src/manage.py test src/
- name: Coverage comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt and the other workflow (to post comment) is just copy and paste from documentation. |
Have you tried with:
? |
Yes, I have. It fails with |
can you share the coverage configuration (from .coveragerc or pyproject.toml or setup.cfg) |
Sure, version is [tool.coverage.run]
branch = true
omit = ['*/migrations/*', 'manage.py', 'wsgi.py']
relative_files = true
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = true |
Ok, I'll try to reproduce on a small example and see if it fails the same way |
For posterity, I hit this same error, I was just trying to run coverage against a single file in the root of the repo.. I moved it to a src folder, added a blank init.py file and added |
Wait, a |
I have solved my issue reported in #303 (comment). |
Well, I wan't very helpful on my side so it's good that you found your issue :) |
For anyone facing this, I had the same problem. My issue was the coverage package mismatch - coverage pkg I used to generate the |
You had the same error message ? I think we should improve the error message if we can detect this case. |
Yeah, |
https://github.com/descope/python-sdk/actions/runs/7086877486/job/19288591568
I do not think this is a permission error, as permissions are there and it's been working well for a while
looks like the input is truncated by this might be github logs issue and not really
The text was updated successfully, but these errors were encountered: