-
Bruce Dawson authored
Recent gerrit issues made it obvious that "git cl presubmit" relies on gerrit much more than most people would expect (the expectation is zero for many people). This makes presubmits flaky or much slower under poor network conditions, and it means that the presubmit step may drastically underestimate how long it takes to run because of a cl.FetchDescription() that may occur outside of the timed portion of the presubmits. This change wraps more network-touching steps in try/except blocks, to make them robust. It also gets them to check for the existence of a PRESUBMIT_SKIP_NETWORK environment variable. And, it prints the elapsed time to get the CL description if this is inordinately long. Bug: 1350227 Change-Id: I7954fd50e928fd24975a4f61a316cb280542ebbd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3813095Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
eb8426e2