Эх сурвалжийг харах

Only upload findings from presubmit recipe if on a tryserver

Chrome's first use of appending location data to a PRESUBMIT.py check
made Chrome's "all" PRESUBMIT.py builders fail:
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-presubmit

That's presumably because they're trying to upload findings in a
context without a gerrit CL. This should hopefully fix that.

Bug: 413427415
Change-Id: Ib2cab5d2668fa4562e6b2f365811983c93d0591e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6489610
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Ben Pastene 3 сар өмнө
parent
commit
e62c712cec

+ 2 - 1
recipes/recipe_modules/presubmit/api.py

@@ -190,7 +190,8 @@ class PresubmitApi(recipe_api.RecipeApi):
     # Set recipe result values and upload findings
     if (step_json := presubmit_step.json.output):
       raw_result.summary_markdown = _createSummaryMarkdown(step_json)
-      self._upload_findings_from_result(step_json)
+      if self.m.tryserver.is_tryserver:
+        self._upload_findings_from_result(step_json)
 
     if presubmit_step.exc_result.retcode == 0:
       raw_result.status = common_pb2.SUCCESS