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

Fix swallowed I/O exception in LcovPrinter #21987

Closed
wants to merge 1 commit into from

Conversation

sputt
Copy link
Contributor

@sputt sputt commented Apr 12, 2024

This fixes issue #21982

@sputt sputt requested a review from lberki as a code owner April 12, 2024 15:33
Copy link

google-cla bot commented Apr 12, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Apr 12, 2024
@fmeum fmeum requested review from c-mita and removed request for lberki April 12, 2024 15:35
Copy link
Member

@c-mita c-mita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@c-mita c-mita added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally coverage and removed awaiting-review PR is awaiting review from an assigned reviewer labels Apr 13, 2024
@sputt sputt force-pushed the coverage-output-fail branch from 24ffd1a to 2f5e353 Compare April 13, 2024 16:22
@sputt
Copy link
Contributor Author

sputt commented Apr 13, 2024

Squashed to correct email - no diff.

Functional Test

Coverage roll-up

bazel coverage //tools/test/CoverageOutputGenerator/... --combined_report=lcov --override_repository=bazel_tools~remote_coverage_tools_extension~remote_coverage_tools=/Users/sputt/remote_coverage_tools

To sanity check this is the correct override:

ERROR: /private/var/tmp/_bazel_sputt/b1abbf127d696f148ad833cd4ef695e8/external/bazel_tools/tools/test/BUILD:36:6: @@bazel_tools//tools/test:coverage_report_generator depends on @@bazel_tools~remote_coverage_tools_extension~remote_coverage_tools//:coverage_report_generator in repository @@bazel_tools~remote_coverage_tools_extension~remote_coverage_tools which failed to fetch. no such package '@@bazel_tools~remote_coverage_tools_extension~remote_coverage_tools//': The repository's path is "bazel_tools~remote_coverage_tools_extension~remote_coverage_tools" (absolute: "/Users/sputt/remote_coverage_tools/JUNK") but it does not exist or is not a directory.

Inspect the output report:

ls -l bazel-out/_coverage/_coverage_report.dat 
-r-xr-xr-x  1 sputt  wheel  52981 Apr 13 09:23 bazel-out/_coverage/_coverage_report.dat

All files are present:

cat bazel-out/_coverage/_coverage_report.dat | grep SF:
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/BranchCoverage.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/Constants.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/Coverage.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/GcovJsonParser.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/GcovParser.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/LcovMergerFlags.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/LcovParser.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/LcovPrinter.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/LineCoverage.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/Main.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/Parser.java
SF:tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator/SourceFileCoverage.java

@fmeum
Copy link
Collaborator

fmeum commented Apr 18, 2024

@bazel-io fork 7.2.0

bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Apr 18, 2024
The calling code expects the exception, not a return boolean.

Fixes bazelbuild#21982.

Closes bazelbuild#21987.

PiperOrigin-RevId: 626086576
Change-Id: I4abd7a253715c84c323e036dfbdb2fcb94a4825d
github-merge-queue bot pushed a commit that referenced this pull request Apr 18, 2024
The calling code expects the exception, not a return boolean.

Fixes #21982.

Closes #21987.

PiperOrigin-RevId: 626086576
Change-Id: I4abd7a253715c84c323e036dfbdb2fcb94a4825d

Commit
f8277cf

Co-authored-by: Spencer Putt <[email protected]>
@sgowroji sgowroji removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Apr 26, 2024
Kila2 pushed a commit to Kila2/bazel that referenced this pull request May 13, 2024
The calling code expects the exception, not a return boolean.

Fixes bazelbuild#21982.

Closes bazelbuild#21987.

PiperOrigin-RevId: 626086576
Change-Id: I4abd7a253715c84c323e036dfbdb2fcb94a4825d
c-mita added a commit to c-mita/bazel that referenced this pull request Dec 6, 2024
Built at commit 93e76f2.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (bazelbuild#22257).
 * IOExceptions are no longer ignored (bazelbuild#21987).
 * Baseline coverage files are not ignored (bazelbuild#24563).

RELNOTES: Baseline coverage files are no longer ignored.
c-mita added a commit to c-mita/bazel that referenced this pull request Dec 6, 2024
Built at commit 93e76f2.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (bazelbuild#22257).
 * IOExceptions are no longer ignored (bazelbuild#21987).
 * Baseline coverage files are not ignored (bazelbuild#24563).

RELNOTES: Baseline coverage files are no longer ignored.
c-mita added a commit to c-mita/bazel that referenced this pull request Dec 6, 2024
Built at commit 93e76f2.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (bazelbuild#22257).
 * IOExceptions are no longer ignored (bazelbuild#21987).
 * Baseline coverage files are not ignored (bazelbuild#24563).

RELNOTES: Baseline coverage files are no longer ignored.
c-mita added a commit to c-mita/bazel that referenced this pull request Dec 10, 2024
Built at commit 93e76f2.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (bazelbuild#22257).
 * IOExceptions are no longer ignored (bazelbuild#21987).
 * Baseline coverage files are not ignored (bazelbuild#24563).

RELNOTES: Baseline coverage files are no longer ignored.
c-mita added a commit to c-mita/bazel that referenced this pull request Dec 10, 2024
Built at commit 93e76f2.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (bazelbuild#22257).
 * IOExceptions are no longer ignored (bazelbuild#21987).
 * Baseline coverage files are not ignored (bazelbuild#24563).

RELNOTES: Baseline coverage files are no longer ignored.
c-mita added a commit to c-mita/bazel that referenced this pull request Dec 10, 2024
Built at commit 93e76f2.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (bazelbuild#22257).
 * IOExceptions are no longer ignored (bazelbuild#21987).
 * Baseline coverage files are not ignored (bazelbuild#24563).

RELNOTES: Baseline coverage files are no longer ignored.
c-mita added a commit to c-mita/bazel that referenced this pull request Dec 10, 2024
Built at commit b09335b.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (bazelbuild#22257).
 * IOExceptions are no longer ignored (bazelbuild#21987).
 * Baseline coverage files are not ignored (bazelbuild#24563).

RELNOTES: Baseline coverage files are no longer ignored.
c-mita added a commit to c-mita/bazel that referenced this pull request Dec 12, 2024
Built at commit 82c1ff7.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (bazelbuild#22257).
 * IOExceptions are no longer ignored (bazelbuild#21987).
 * Baseline coverage files are not ignored (bazelbuild#24563).

RELNOTES: Baseline coverage files are no longer ignored.
copybara-service bot pushed a commit that referenced this pull request Dec 12, 2024
Built at commit 82c1ff7.

Relevant changes:
 * Log level for many messages changed from INFO to FINE (#22257).
 * IOExceptions are no longer ignored (#21987).
 * Baseline coverage files are not ignored (#24563).

RELNOTES: Baseline coverage files are no longer ignored.

Closes #24593.

PiperOrigin-RevId: 705492845
Change-Id: I6f7b99ec0f040f93cc148c9c8448d4395729adac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants