Turn off failure comments from G3 bot

Too noisy.

Change-Id: I454573b92730854697147415333d1874d3c02bfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267617
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
This commit is contained in:
Ravi Mistry 2020-01-30 09:33:31 -05:00 committed by Skia Commit-Bot
parent 64874eaa30
commit a5ec04d8fa

View File

@ -16,7 +16,6 @@ import time
INFRA_BOTS_DIR = os.path.abspath(os.path.realpath(os.path.join(
os.path.dirname(os.path.abspath(__file__)), os.pardir)))
sys.path.insert(0, INFRA_BOTS_DIR)
import git_utils
import utils
@ -109,15 +108,6 @@ def _trigger_task(options):
return task
def _add_cl_comment(issue, comment):
# Depot tools needs a checkout to use "git cl" even though we are just adding
# a comment to a change unrelated to the checkout.
# TODO(rmistry): Try using the Gerrit API?
with git_utils.NewGitCheckout(repository=utils.SKIA_REPO):
add_comment_cmd = ['git', 'cl', 'comments', '-i', str(issue), '-a', comment]
subprocess.check_call(add_comment_cmd)
def _read_from_storage(gs_file, use_expo_retries=True):
"""Returns the contents of the specified file from storage."""
num_retries = GS_RETRIES if use_expo_retries else 1
@ -178,14 +168,6 @@ def trigger_and_wait(options):
elif ret['status'] == 'merge_conflict':
raise G3CompileException(MERGE_CONFLICT_ERROR_MSG)
elif ret['status'] == 'failure':
# Add a comment to the CL before throwing an exception. See skbug/9631
# for context.
msg = ('FYI: The %s experimental CQ bot failed for patchset #%s.\n'
'The bot is known to be flaky and the failure might or might '
'not be related to this change.\n'
'Please take a quick look at http://cl/%s to verify.') % (
options.builder_name, task['patchset'], ret['cl'])
_add_cl_comment(task['issue'], msg)
raise G3CompileException(
'\n\nRun failed G3 TAP: cl/%s' % ret['cl'] + PATCHING_INFORMATION)
elif ret['status'] == 'success':