New issue
Advanced search Search tips

Issue 768574 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

run_suite | TypeError: 'int' object is not iterable

Project Member Reported by akes...@chromium.org, Sep 25 2017

Issue description

This is hitting run_suite in the staging lab. Probably it is just inelegant error handling, don't think it is actual *causing* an outage, but deserves to be fixed.

-> assigned to author of this line of code.

[chromeos-autotest.hot.corp.google.com] out: Failed to retrieve job results.
[chromeos-autotest.hot.corp.google.com] out: Traceback (most recent call last):
[chromeos-autotest.hot.corp.google.com] out:   File "/usr/local/autotest/site_utils/run_suite.py", line 2066, in <module>
[chromeos-autotest.hot.corp.google.com] out:     sys.exit(main())
[chromeos-autotest.hot.corp.google.com] out:   File "/usr/local/autotest/site_utils/run_suite.py", line 2049, in main
[chromeos-autotest.hot.corp.google.com] out:     result = _run_task(options)
[chromeos-autotest.hot.corp.google.com] out:   File "/usr/local/autotest/site_utils/run_suite.py", line 1986, in _run_task
[chromeos-autotest.hot.corp.google.com] out:     return _run_suite(options)
[chromeos-autotest.hot.corp.google.com] out:   File "/usr/local/autotest/site_utils/run_suite.py", line 1761, in _run_suite
[chromeos-autotest.hot.corp.google.com] out:     return _handle_job_wait(afe, job_id, options, job_timer, is_real_time)
[chromeos-autotest.hot.corp.google.com] out:   File "/usr/local/autotest/site_utils/run_suite.py", line 1867, in _handle_job_wait
[chromeos-autotest.hot.corp.google.com] out:     collector.output_results()
[chromeos-autotest.hot.corp.google.com] out:   File "/usr/local/autotest/site_utils/run_suite.py", line 1471, in output_results
[chromeos-autotest.hot.corp.google.com] out:     max_name_length = max(0, *(len(t.name) for t in test_results))
[chromeos-autotest.hot.corp.google.com] out: TypeError: 'int' object is not iterable



 
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/c7575d3b6151e878dc6e9d87ac696ccd2f75b96a

commit c7575d3b6151e878dc6e9d87ac696ccd2f75b96a
Author: Brian Norris <briannorris@chromium.org>
Date: Wed Sep 27 01:24:10 2017

autotest: fix issues with empty test results reporting

The previous fix for this issue (CL:624395, commit c1ddeef2adfc
"autotest: handle empty test results properly in output_results") still
didn't handle 0-length results right. Let's just do this the obvious
way, since I don't claim to be a Python expert.

BUG= chromium:768574 
TEST=unit tests

Change-Id: Ic87a063f3f3d47a600833a68c951493a1fa41e0a
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/683340
Reviewed-by: Allen Li <ayatane@chromium.org>

[modify] https://crrev.com/c7575d3b6151e878dc6e9d87ac696ccd2f75b96a/site_utils/run_suite.py

Status: Fixed (was: Started)
Should be fixed. And my new unit test catches the error, if someone would review it:

https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/685651

I'm not much of a Python unit test programmer, but it works for me...
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/58ae516c59084c1905a69ca510955edbaeee36cb

commit 58ae516c59084c1905a69ca510955edbaeee36cb
Author: Brian Norris <briannorris@chromium.org>
Date: Wed Sep 27 23:29:27 2017

autotest: Add unit test for completely missing test results

It's possible to not get any test results from the lab. Let's mock that.

Also, ensure to 'log' the results as an actual run would do, since we've
hit some bugs in that logic when running into the above condition.

BUG= chromium:768574 
TEST=self (with and without CL:683340)

Change-Id: Iadcad2ea486a71ee567fae6f13fd38d3b3c5312c
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/685651
Reviewed-by: Allen Li <ayatane@chromium.org>

[modify] https://crrev.com/58ae516c59084c1905a69ca510955edbaeee36cb/site_utils/run_suite_unittest.py

Comment 6 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 7 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment