Bug 1316045
| Summary: | INTERNAL SERVER ERROR while reading job results in junit format | ||
|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Linqing Lu <lilu> |
| Component: | reports | Assignee: | matt jia <mjia> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 22 | CC: | dcallagh, dowang, mjia, rjoost |
| Target Milestone: | 22.3 | Keywords: | Patch |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-04-04 05:34:57 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Sorry about this, the new JUnit XML export is obviously not as well battle-tested as the regular results XML export...
Traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python2.6/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python2.6/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python2.6/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python2.6/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/lib/python2.6/site-packages/bkr/server/jobs.py", line 1068, in job_junit_xml
response = make_response(to_junit_xml(job))
File "/usr/lib/python2.6/site-packages/bkr/server/junitxml.py", line 63, in to_junit_xml
testsuite.extend(_testcases_for_task(task))
File "lxml.etree.pyx", line 682, in lxml.etree._Element.extend (src/lxml/lxml.etree.c:31838)
File "/usr/lib/python2.6/site-packages/bkr/server/junitxml.py", line 41, in _testcases_for_task
time='%.0f' % total_seconds(result.duration))
File "/usr/lib/python2.6/site-packages/bkr/server/model/scheduler.py", line 3704, in duration
return self.start_time - self.recipetask.start_time
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'
This will happen on recipes where some tasks never started, either because the recipe was cancelled or it was aborted by the external watchdog (as in this case). On Gerrit: http://gerrit.beaker-project.org/#/c/4728/ I guess this can go to beaker 22.3 if we have other stuffs that need to be released before beaker 23. (In reply to Dan Callaghan from comment #1) > Sorry about this, the new JUnit XML export is obviously not as well > battle-tested as the regular results XML export... Thanks for quick investment/fix! It's a nice feature since its output can be consumed directly by Jenkins junit plugin. Previously we had to use a 3rd-party converter to translate regular XML to xunit (and lost a lot of extra info like log links). Looking forward to having this fix asap. please feel free to reach me if more samples needed to verify this fix. (In reply to Linqing Lu from comment #4) > (In reply to Dan Callaghan from comment #1) > > Sorry about this, the new JUnit XML export is obviously not as well > > battle-tested as the regular results XML export... > > Thanks for quick investment/fix! > > It's a nice feature since its output can be consumed directly by Jenkins > junit plugin. > Previously we had to use a 3rd-party converter to translate regular XML to > xunit (and lost a lot of extra info like log links). > > Looking forward to having this fix asap. Thank you for your patient, we will get this fix out of the door asap. Beaker 22.3 has been released. Release Notes can be found here: https://beaker-project.org/docs/whats-new/release-22.html#beaker-22-3 |
Description of problem: We got constant error today when retrieving certain beaker job result in junit format: $ bkr job-results --format junit-xml J:1256877 HTTP error: 500 Server Error: INTERNAL SERVER ERROR for url: https://beaker.engineering.redhat.com/jobs/1256877.junit.xml However `bkr job-results J:1256877` works without problem. And some other jobs worked well in either way (e.g J:1244773). Version-Release number of selected component (if applicable): 22.1 How reproducible: always Steps to Reproduce: 1. run `bkr job-results --format junit-xml` against existing beaker job, e.g. J:1256877 2. 3. Actual results: HTTP error: 500 Server Error: INTERNAL SERVER ERROR for url: https://beaker.engineering.redhat.com/jobs/1256877.junit.xml Expected results: returns job results in junit format Additional info: This problem is failing major number of jobs on Platform Jenkins from analyzing/reporting correct testing results.