Adar Dembo has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/11457 )
Change subject: clang_tidy_gerrit.py: fix output when no changes found in first
path
......................................................................
clang_tidy_gerrit.py: fix output when no changes found in first path
For a while now some patches weren't getting any Tidy Bot comments. These
comments originate in a standalone Jenkins job that runs clang-tidy and
converts its output into comments that are posted back to gerrit. Here's
what I saw in the console output of one such failed job run:
Clang output
No relevant changes found.
No relevant changes found.
... <actual clang-tidy changes>
Traceback (most recent call last):
File "build-support/clang_tidy_gerrit.py", line 209, in <module>
parsed = parse_clang_output(clang_output)
File "build-support/clang_tidy_gerrit.py", line 103, in parse_clang_output
raise Exception("bad warning: " + w)
Exception: bad warning: No relevant changes found.
No relevant changes found.
The "No relevant changes found." line is what clang-tidy prints when it has
no recommendations. That won't happen when clang-tidy's input includes at
least one "dirty" file, but as of commit a9271b05d we run clang-tidy in
parallel on a per-file basis, which makes it quite likely that a given patch
will include at least one completely tidy file.
Turns out that when the very first line of output parsed by this script is
that "No relevant..." line, split_warnings() generates a warning with a
non-warning string, which causes parse_clang_output() to raise an exception
and for the job to fail silently.
Change-Id: I111dff7508f841489ba1625a4ca4b7af92f3d8d0
Reviewed-on: http://gerrit.cloudera.org:8080/11457
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <[email protected]>
Reviewed-by: Andrew Wong <[email protected]>
---
M build-support/clang_tidy_gerrit.py
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Kudu Jenkins: Verified
Alexey Serbin: Looks good to me, approved
Andrew Wong: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/11457
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I111dff7508f841489ba1625a4ca4b7af92f3d8d0
Gerrit-Change-Number: 11457
Gerrit-PatchSet: 3
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins