From 9e9b885a7b85483e59723d5e1e69235dcb577077 Mon Sep 17 00:00:00 2001 From: Matt Stark Date: Thu, 28 Aug 2025 17:38:25 -0700 Subject: [PATCH] Make `git cl presubmit` pass before running `git cl upload`. This check is making any script which runs `git cl presubmit` locally fail. In particular, `jj upload` runs `git cl presubmit`, and then uploads only if it succeeds (we cannot run `git cl upload`, because that can specifically only upload the currently checked out commit). According to the bug I linked, "I think that historically it was possible for developers to try to commit directly from their Chromium repo, without uploading, and this aims to stop that. It also warns users that their change has not been uploaded. Whether it still needs to be an error is not clear, but I'm not sure it's causing any problems so I'm inclined to leave it." To sum things up: * Since presubmits can be bypassed, this is not a security measure * These days I don't believe you can commit directly from your chromium repo * It's now starting to cause problems. Bug: 40253731 Change-Id: I0d83fa68d0e65dcdd8932c7d3053750dcc16d3fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6875404 Reviewed-by: Scott Lee Commit-Queue: Matt Stark --- presubmit_canned_checks.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index fcc5a06dfc..5da862a99b 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -1799,10 +1799,6 @@ def PanProjectChecks(input_api, # the tree. Skipping these saves a bit of time and avoids having # redundant output. This was initially designed for use by # third_party/blink/PRESUBMIT.py. - snapshot("checking was uploaded") - results.extend( - input_api.canned_checks.CheckChangeWasUploaded( - input_api, output_api)) snapshot("checking description") results.extend( input_api.canned_checks.CheckChangeHasDescription(