From cc03c34e35fd49f59e042e203643670e597baa98 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Wed, 23 Apr 2025 10:12:31 -0700 Subject: [PATCH] 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 Auto-Submit: Yiwei Zhang Reviewed-by: Gavin Mak --- recipes/recipe_modules/presubmit/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/recipe_modules/presubmit/api.py b/recipes/recipe_modules/presubmit/api.py index 340528c4d..f8869eb0c 100644 --- a/recipes/recipe_modules/presubmit/api.py +++ b/recipes/recipe_modules/presubmit/api.py @@ -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