saintstack commented on a change in pull request #2862:
URL: https://github.com/apache/hbase/pull/2862#discussion_r554224607
##########
File path: dev-support/checkcompatibility.py
##########
@@ -241,6 +241,20 @@ def compare_results(tool_results, known_issues,
compare_warnings):
return bool(unexpected_issues)
+def compare_tool_results_count(tool_results, check, issue_type, known_count):
+ """ Check problem counts are no more than the known count.
+ (This function exists just so can add in logging; previous was inlined
+ one-liner but this made it hard debugging)
+ """
+ # logging.info("known_count=%s, check key=%s, tool_results=%s,
issue_type=%s",
+ # str(known_count), str(check), str(tool_results), str(issue_type))
+ try:
+ return tool_results[check][issue_type] > known_count
+ except KeyError as ke:
+ logging.info("KeyError %s", str(ke))
Review comment:
Let me remove this bit... This was a debug method trying to see what was
on other side of exception.... Let me make it fail.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]