Commit b3579d42 authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

Make tree-closed a warning for presubmit --all

presubmit --all should succeed regardless of the current state of the
tree. Otherwise a presubmit --all bot will be flaky due to circumstances
beyond its control.

This is a logical follow-on to crrev.com/c/3628368 which turned some
other errors into warnings for presubmit --all.

Bug: 1309977
Change-Id: I6d26708f8c47916cf015dec75e27833db7ca465b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3696070
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
parent eb16162e
......@@ -712,6 +712,10 @@ def CheckTreeIsOpen(input_api, output_api,
if not status['can_commit_freely']:
short_text = 'Tree state is: ' + status['general_state']
long_text = status['message'] + '\n' + json_url
if input_api.no_diffs:
return [
output_api.PresubmitPromptWarning(short_text, long_text=long_text)
]
return [output_api.PresubmitError(short_text, long_text=long_text)]
else:
# TODO(bradnelson): drop this once all users are gone.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment