New issue
Advanced search Search tips

Issue 829557 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 829169



Sign in to add a comment

LUCI Scheduler builds break the ChromeOS swarming recipe.

Project Member Reported by dgarr...@chromium.org, Apr 5 2018

Issue description

We we use LUCI Scheduler to schedule swarming ChromeOS builds, the swarming recipe crashes.

https://luci-scheduler.appspot.com/jobs/chromeos

This is probably related to differences in how parameters_json is encoded.

Sample crash:
  https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8950052320994990192



Traceback (most recent call last):
  File "/b/swarming/w/ir/kitchen-checkout/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/run.py", line 287, in _new_run
    recipe_result = recipe_script.run(api, self.properties, self.environ)
  File "/b/swarming/w/ir/kitchen-checkout/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py", line 98, in run
    self.run_steps, properties, environ, self.PROPERTIES, api=api)
  File "/b/swarming/w/ir/kitchen-checkout/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py", line 626, in invoke_with_properties
    arg_names, **additional_args)
  File "/b/swarming/w/ir/kitchen-checkout/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py", line 589, in _invoke_with_properties
    return callable_obj(*props, **additional_args)
  File "/b/swarming/w/ir/kitchen-checkout/scripts/slave/recipes/cros/swarming.py", line 20, in RunSteps
    tryjob_args = json.loads(tryjob_args)
  File "/b/swarming/w/ir/cipd_bin_packages/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/b/swarming/w/ir/cipd_bin_packages/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/b/swarming/w/ir/cipd_bin_packages/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
 
Blocking: 829169
parameters_json as it exists in the above buildbucket_id.

"{\"builder_name\": \"Generic\", \"properties\": {\"cbb_branch\": \"master\", \"cbb_config\": \"amd64-generic-tot-chromium-pfq-informational\", \"cbb_display_label\": \"informational\", \"cbb_email\": \"\", \"cbb_extra_args\": \"\", \"cbb_master_build_id\": \"\"}}"
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/75c9d839c08eafa19612bd4c2a84c3ae5b15c6de

commit 75c9d839c08eafa19612bd4c2a84c3ae5b15c6de
Author: Don Garrett <dgarrett@google.com>
Date: Thu Apr 05 22:03:19 2018

cros/swarming: Handle empty string cbb_extra_args.

If cbb_extra_args was an empty string, it was passed to json.loads(),
which raises an error. Add a test, and fix the crash.

BUG= chromium:829557 

Change-Id: Ia449e5d9e5ac20c79a2ac175dd7d919adcb93f8d
Reviewed-on: https://chromium-review.googlesource.com/998821
Reviewed-by: Ningning Xia <nxia@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>

[add] https://crrev.com/75c9d839c08eafa19612bd4c2a84c3ae5b15c6de/scripts/slave/recipes/cros/swarming.expected/empty_string_args.json
[modify] https://crrev.com/75c9d839c08eafa19612bd4c2a84c3ae5b15c6de/scripts/slave/recipes/cros/swarming.py

Sign in to add a comment