Skip to content
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

coverage_comment.subprocess.SubProcessError: No data to combine #472

Closed
rsard-ckt opened this issue Sep 3, 2024 · 3 comments
Closed

coverage_comment.subprocess.SubProcessError: No data to combine #472

rsard-ckt opened this issue Sep 3, 2024 · 3 comments

Comments

@rsard-ckt
Copy link

Started to face this error without any change in the codebase:

Notice: Generating comment for PR
Error: Critical error. This error possibly occurred because the permissions of the workflow are set incorrectly. You can see the correct setting of permissions here: https://github.com/py-cov-action/python-coverage-comment-action#basic-usage
Otherwise please look for open issues or open one in https://github.com/py-cov-action/python-coverage-comment-action/
Traceback (most recent call last):
  File "/workdir/coverage_comment/subprocess.py", line 22, in run
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('coverage', 'combine')' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/workdir/coverage_comment/main.py", line 44, in main
    exit_code = action(
                ^^^^^^^
  File "/workdir/coverage_comment/main.py", line 96, in action
    return process_pr(
           ^^^^^^^^^^^
  File "/workdir/coverage_comment/main.py", line 1[27](https://github.com/energy-solution/iris/actions/runs/10687312738/job/29625509800#step:5:28), in process_pr
    _, coverage = coverage_module.get_coverage_info(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workdir/coverage_comment/coverage.py", line 96, in get_coverage_info
    subprocess.run("coverage", "combine", path=coverage_path)
  File "/workdir/coverage_comment/subprocess.py", line 36, in run
    raise SubProcessError("\n".join([exc.stderr, exc.stdout])) from exc
coverage_comment.subprocess.SubProcessError: 
No data to combine

Even after updating the library version to py-cov-action/[email protected], the error remains.

@ewjoachim
Copy link
Member

Yep, that's a consequence of this change by github, tracked in #470 because GitHub loves to break compat in minor versions.

Our readme has been modified. The easiest way to solve this is to add include-hidden-files: true to upload-artifacts.

@rsard-ckt
Copy link
Author

Thanks, I'll give it a try.

@rsard-ckt
Copy link
Author

Worked, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants