-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
rules_go coverage tests broken with 0.27.0 #8670
Comments
cc @iirina who I think is the coverage expert. Any idea what might be wrong? |
I believe this is a consequence of 384e1cb, which broke the #6293 (comment) workaround. My current hack is |
Gentle ping |
P1, because it's a regression in Bazel 0.27 (also it breaks tests in rules_go). |
Sorry for the trouble, I came back from vacation today. 384e1cb renamed the attribute from |
@iirina Thanks for fixing this! This means Speaking of #6293, could you comment on what rules_go + Bazel + CI should do here? I understand that Bazel needs a tool to merge lcov files from multiple tests with coverage enabled, and that's |
Yeah, can we fix coverage to not try to invoke lcov if the rule doesn't have the lcov attribute? |
Yes, I'll address the other questions on #6293. |
This depends on the default value of the attribute. See cc @c-parsons |
…Builder. 384e1cb renamed an attribute from `$lcov_merger` to `:lcov_merger`, which is a breaking change and broke rules_go. This PR changes the test runner to check both attribute names for backwards compatibility. The next step is to introduce an incompatible flag to remove the former. Fixes #8670 Closes #8709. PiperOrigin-RevId: 254915099
…Builder. 384e1cb renamed an attribute from `$lcov_merger` to `:lcov_merger`, which is a breaking change and broke rules_go. This PR changes the test runner to check both attribute names for backwards compatibility. The next step is to introduce an incompatible flag to remove the former. Fixes bazelbuild#8670 Closes bazelbuild#8709. PiperOrigin-RevId: 254915099
…Builder. 384e1cb renamed an attribute from `$lcov_merger` to `:lcov_merger`, which is a breaking change and broke rules_go. This PR changes the test runner to check both attribute names for backwards compatibility. The next step is to introduce an incompatible flag to remove the former. Fixes #8670 Closes #8709. PiperOrigin-RevId: 254915099
…Builder. 384e1cb renamed an attribute from `$lcov_merger` to `:lcov_merger`, which is a breaking change and broke rules_go. This PR changes the test runner to check both attribute names for backwards compatibility. The next step is to introduce an incompatible flag to remove the former. Fixes bazelbuild#8670 Closes bazelbuild#8709. PiperOrigin-RevId: 254915099
Description of the problem / feature request:
Several rules_go tests that run
bazel coverage
are failing with Bazel 0.27.0. They pass with 0.26.1, and there haven't been any recent changes to rules_go coverage functionality.https://buildkite.com/bazel/rules-go-golang/builds/1197#7fba7969-7a88-4201-b0a4-8982d9ebf8d0 is set of test results for an unrelated change. It looks like this is also failing on the "Bazel@HEAD + Downstream" pipeline.
The failures include a lot of bash debugging lines (running with
-x
?). I think this is the relevant part.I'm not sure what file is missing, but something to do with
LCOV_MERGER
maybe?Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
macOS 10.14.5
Tests are failing on all platforms though.
What's the output of
bazel info release
?release 0.27.0
Have you found anything relevant by searching the web?
#7529 has the same error message, but I'm not sure if it's related.
bazel-contrib/rules_go#2100 is corresponding issue in rules_go.
Any other information, logs, or outputs that you want to share?
rules_go coverage support is not completely integrated with Bazel coverage. We use the information exposed to Starlark rules by
bazel coverage
in order to add coverage instrumentation to sources that need it. However, the coverage data file is written in Go's format (not lcov) so that Go tools can analyze it.Tests do write to the file named by
COVERAGE_OUTPUT_FILE
, and I've verified that such a file is written by manually running a test binary built with coverage. So I don't think that's the missing file.The text was updated successfully, but these errors were encountered: