Revert "bot_update: make --output_json required in script invocation."

This reverts commit 331a276b54.

Reason for revert: Looks like this is causing bots to fail on the waterfall

Example:
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium%2FWin%2F60913%2F%2B%2Frecipes%2Fsteps%2Fbot_update%2F0%2Fstdout

Original change's description:
> bot_update: make --output_json required in script invocation.
> 
> It's already set by recipe, so this should have 0 difference in prod.
> 
> R=​iannucci@chromium.org
> 
> Bug:
> Change-Id: I1e1129b9748d6647e45eb26892c8e892019fe088
> Reviewed-on: https://chromium-review.googlesource.com/769164
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>

TBR=iannucci@chromium.org,tandrii@chromium.org

Change-Id: I65d7665e45dde539f6436ffe8932319e03f96f25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/777619
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
changes/19/777619/2
Robert Flack 8 years ago committed by Commit Bot
parent f151da9fac
commit fe36710a72

@ -1004,7 +1004,7 @@ def parse_args():
help=('Deprecated.')) help=('Deprecated.'))
parse.add_option('--clobber', action='store_true', parse.add_option('--clobber', action='store_true',
help='Delete checkout first, always') help='Delete checkout first, always')
parse.add_option('--output_json', required=True, parse.add_option('--output_json',
help='Output JSON information into a specified file') help='Output JSON information into a specified file')
parse.add_option('--no_shallow', action='store_true', parse.add_option('--no_shallow', action='store_true',
help='Bypass disk detection and never shallow clone. ' help='Bypass disk detection and never shallow clone. '
@ -1086,6 +1086,8 @@ def prepare(options, git_slns, active):
step_text = '[%dGB/%dGB used (%d%%)]' % (used_disk_space_gb, step_text = '[%dGB/%dGB used (%d%%)]' % (used_disk_space_gb,
total_disk_space_gb, total_disk_space_gb,
percent_used) percent_used)
if not options.output_json:
print '@@@STEP_TEXT@%s@@@' % step_text
shallow = (total_disk_space < SHALLOW_CLONE_THRESHOLD shallow = (total_disk_space < SHALLOW_CLONE_THRESHOLD
and not options.no_shallow) and not options.no_shallow)
@ -1147,16 +1149,17 @@ def checkout(options, git_slns, specs, revisions, step_text, shallow):
ensure_no_checkout(dir_names, options.cleanup_dir) ensure_no_checkout(dir_names, options.cleanup_dir)
gclient_output = ensure_checkout(**checkout_parameters) gclient_output = ensure_checkout(**checkout_parameters)
except PatchFailed as e: except PatchFailed as e:
# Tell recipes information such as root, got_revision, etc. if options.output_json:
emit_json(options.output_json, # Tell recipes information such as root, got_revision, etc.
did_run=True, emit_json(options.output_json,
root=first_sln, did_run=True,
patch_apply_return_code=e.code, root=first_sln,
patch_root=options.patch_root, patch_apply_return_code=e.code,
patch_failure=True, patch_root=options.patch_root,
failed_patch_body=e.output, patch_failure=True,
step_text='%s PATCH FAILED' % step_text, failed_patch_body=e.output,
fixed_revisions=revisions) step_text='%s PATCH FAILED' % step_text,
fixed_revisions=revisions)
raise raise
# Take care of got_revisions outputs. # Take care of got_revisions outputs.
@ -1179,17 +1182,18 @@ def checkout(options, git_slns, specs, revisions, step_text, shallow):
got_revisions = { 'got_revision': 'BOT_UPDATE_NO_REV_FOUND' } got_revisions = { 'got_revision': 'BOT_UPDATE_NO_REV_FOUND' }
#raise Exception('No got_revision(s) found in gclient output') #raise Exception('No got_revision(s) found in gclient output')
# Tell recipes information such as root, got_revision, etc. if options.output_json:
emit_json(options.output_json, # Tell recipes information such as root, got_revision, etc.
did_run=True, emit_json(options.output_json,
root=first_sln, did_run=True,
patch_root=options.patch_root, root=first_sln,
step_text=step_text, patch_root=options.patch_root,
fixed_revisions=revisions, step_text=step_text,
properties=got_revisions, fixed_revisions=revisions,
manifest=create_manifest_old(), properties=got_revisions,
source_manifest=create_manifest( manifest=create_manifest_old(),
gclient_output, options.patch_root, options.gerrit_ref)) source_manifest=create_manifest(
gclient_output, options.patch_root, options.gerrit_ref))
def print_debug_info(): def print_debug_info():

Loading…
Cancel
Save