New issue
Advanced search Search tips

Issue 912617 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 6
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
Build-Toolchain



Sign in to add a comment

Toolchain nightly job fails with rstrip attribute error

Project Member Reported by manojgupta@chromium.org, Dec 6

Issue description

All of the today's toolchain performance tetsing jobs failed with following error:

CMD: cros tryjob --pass-through=--chrome_rev=tot --yes --json --nochromesdk  --notests --latest-toolchain  -g '513590' -g '1272167' veyron_>
buildbucket_id: '8927901036380188176'
Traceback (most recent call last):
  File "./buildbot_test_toolchains.py", line 324, in <module>
    retval = Main(sys.argv)
  File "./buildbot_test_toolchains.py", line 320, in Main
    return fc.DoAll()
  File "./buildbot_test_toolchains.py", line 254, in DoAll
    build_toolchain=True)
  File "/usr/local/google/home/mobiletc-prebuild/toolchain_utils/cros_utils/buildbot_utils.py", line 167, in GetTrybotImage
    status, image = PeekTrybotImage(chromeos_root, buildbucket_id)
  File "/usr/local/google/home/mobiletc-prebuild/toolchain_utils/cros_utils/buildbot_utils.py", line 62, in PeekTrybotImage
    return (results['status'], results['artifacts_url'].rstrip('/'))
AttributeError: 'NoneType' object has no attribute 'rstrip'

 
The problem seems to be coming form json load which probably didn't return a correct value in artifacts_url.

 command = (
      'cros buildresult --report json --buildbucket-id %s' % buildbucket_id)
  rc, out, _ = RunCommandInPath(chromeos_root, command)

  # Current implementation of cros buildresult returns fail when a job is still
  # running.
  if rc != 0:
    return ('running', None)

  results = json.loads(out)[buildbucket_id]
  return (results['status'], results['artifacts_url'].rstrip('/'))

Running the command manually gives a null object in artifacts_url.

$ cros buildresult --report json --buildbucket-id 8927901036380188176 2>/dev/null
{"8927901036380188176": {"status": "fail", "cidb_id": 3197363, "buildbucket_id": "8927901036380188176", "toolchain_url": null, "artifacts_url": null, "stages": {"Report": "pass", "CleanUp": "pass", "Sync": "pass", "PatchChanges": "fail"}}}

The root cause is that the tryjob failed since some patches failed to apply cleanly.

https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8927901036380188176
Owner: cmt...@chromium.org
Assigning to cmtice to update the lld patch.
Status: Fixed (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/toolchain-utils/+/c1baa8ddb3ef0e674bf6634f4522fe338bee5fa8

commit c1baa8ddb3ef0e674bf6634f4522fe338bee5fa8
Author: Manoj Gupta <manojgupta@google.com>
Date: Sat Dec 08 19:23:22 2018

toolchain-utils: Handle the missing artifact_url error more gracefully.

Mark status as fail if artifact_url field is null.

This will make the builder errors easier to spot.

BUG= chromium:912617 
TEST=Tested a dummy job.

Change-Id: I5896ce00a7b9f9a9b27329e1f509560b8e27d56f
Reviewed-on: https://chromium-review.googlesource.com/1366375
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>

[modify] https://crrev.com/c1baa8ddb3ef0e674bf6634f4522fe338bee5fa8/cros_utils/buildbot_utils.py

Sign in to add a comment