presubmit: upload findings only if resultdb is enabled

Code findings will be uploaded to resultdb. If resultdb is not
enabled, exception will be thrown.

Bug: 404837554
Change-Id: I76ff82d6ecdd987fe08fdd703b67a1171d85eed0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6479007
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
changes/07/6479007/2
Yiwei Zhang 2 months ago committed by LUCI CQ
parent e5cd6f84f0
commit cc03c34e35

@ -214,7 +214,7 @@ class PresubmitApi(recipe_api.RecipeApi):
' while running presubmit checks.'
' Please [file a bug](https://issues.chromium.org'
'/issues/new?component=1456211)')
if step_json:
if step_json and self.m.resultdb.enabled:
self._upload_findings_from_result(step_json)
return raw_result

Loading…
Cancel
Save