catapult-project / catapult

Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
https://chromium.googlesource.com/catapult
BSD 3-Clause "New" or "Revised" License
1.93k stars 562 forks source link

update_bug_with_results failing with error in try_job.GetCulpritCL() #4369

Closed anniesullie closed 6 years ago

anniesullie commented 6 years ago

Today an alert came in that UpdateBugWithResults custom metric is not being ticked. I checked the logs for 'path:/update_bug_with_results' and found a lot of errors like this:

Caught Exception AttributeError: 'NoneType' object has no attribute 'get' (/base/data/home/apps/s~chromeperf/clean-simonhatch-b5e636db.408607342797851803/dashboard/update_bug_with_results.py:115)
Traceback (most recent call last):
  File "/base/data/home/apps/s~chromeperf/clean-simonhatch-b5e636db.408607342797851803/dashboard/update_bug_with_results.py", line 112, in get
    _CheckJob(job, issue_tracker)
  File "/base/data/home/apps/s~chromeperf/clean-simonhatch-b5e636db.408607342797851803/dashboard/update_bug_with_results.py", line 155, in _CheckJob
    _CheckBisectJob(job, issue_tracker)
  File "/base/data/home/apps/s~chromeperf/clean-simonhatch-b5e636db.408607342797851803/dashboard/update_bug_with_results.py", line 174, in _CheckBisectJob
    _PostSuccessfulResult(job, issue_tracker)
  File "/base/data/home/apps/s~chromeperf/clean-simonhatch-b5e636db.408607342797851803/dashboard/update_bug_with_results.py", line 259, in _PostSuccessfulResult
    merge_details = _GetMergeIssueDetails(issue_tracker, commit_cache_key)
  File "/base/data/home/apps/s~chromeperf/clean-simonhatch-b5e636db.408607342797851803/dashboard/update_bug_with_results.py", line 224, in _GetMergeIssueDetails
    culprits = set([j.GetCulpritCL() for j in jobs if j.GetCulpritCL()])
  File "/base/data/home/apps/s~chromeperf/clean-simonhatch-b5e636db.408607342797851803/dashboard/models/try_job.py", line 104, in GetCulpritCL
    return self.results_data.get('culprit_data', {}).get('cl')
AttributeError: 'NoneType' object has no attribute 'get'

I'm pretty sure this changed in https://chromium-review.googlesource.com/c/catapult/+/982270 - results_data['culprit_cl'] can explicitly be None. Sending out a fix now.

@simonhatch @dave-2

simonhatch commented 6 years ago

Is this fixed?

anniesullie commented 6 years ago

Yep, the metric is ticking again.