fix(coverage): generating lcov was causing issues#1734
fix(coverage): generating lcov was causing issues#1734aignas merged 10 commits intobazel-contrib:mainfrom
Conversation
* examples/bzlmod - bazel coverage //tests:version_3_10_takes_3_9_subprocess_test was always failing due to .coveragerc generated file not being unique * generating the locv report resulted in messages going to stdout/stderr that resulted in test failures. To fix this, we run with --quiet. If VERBOSE_COVERAGE is defined we will output to stderr.
aignas
left a comment
There was a problem hiding this comment.
If I understand correctly, this will work only with bazel 7.0, could you add an item in the CHANGELOG.md in the fixed section so that we communicate this to users?
|
Could you also update https://github.com/bazelbuild/rules_python/blob/main/.bazelci/presubmit.yml#L62 and related so that we can reproduce the failures in the CI? |
* `bazel coverage ...` in the same fashion as `bazel test ...`
* update the python_bootstrap_template to default /dev/null for stdout/stderr
|
I updated the presubmit.yml to make the failing tests run. I'm having troubles reproducing the Ubuntu 20.04 issues locally so I can debug, iterate, and fix it. I created a separate PR to show the issue without any changes in this PR. #1740 ** UPDATE ** |
* reverted presubmit 6.4.0 bazel ubuntu test case * added changelog information * remove setting stdin to /dev/null
|
Let me know when this becomes ready to review again. |
|
@aignas , this should be ready for review. |
| params = [python_program, coverage_entrypoint, "lcov", "--rcfile=" + rcfile_name, "-o", output_filename, "--quiet"] | ||
| kparams = {"env": env, "cwd": workspace, "stdout": subprocess.DEVNULL, "stderr": subprocess.DEVNULL} | ||
| if IsVerboseCoverage(): | ||
| params.remove("--quiet") |
There was a problem hiding this comment.
I think adding a comment into why this behaviour is as is would be great.
|
Added the comments, hopefully they bring value ;) Rewrote the CHANGELOG.md blurb while I was at it. |
|
@aignas This should be ready for review again. |
This reverts commit 3585d81. The fix (bazel-contrib/rules_python#1734, bazel-contrib/rules_python@ebbcb6a) is included in rules_python now.
This reverts commit 3585d81. The fix (bazel-contrib/rules_python#1734, bazel-contrib/rules_python@ebbcb6a) is included in rules_python now.
Reproduction steps: