-
Notifications
You must be signed in to change notification settings - Fork 536
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
fix(coverage): generating lcov was causing issues #1734
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 (bazelbuild/rules_python#1734, bazelbuild/rules_python@ebbcb6a) is included in rules_python now.
This reverts commit 3585d81. The fix (bazelbuild/rules_python#1734, bazelbuild/rules_python@ebbcb6a) is included in rules_python now.
Reproduction steps: