Bug 1181629 - Unhelpful exception when iterating non-existent TestRun
Summary: Unhelpful exception when iterating non-existent TestRun
Keywords:
Status: CLOSED DUPLICATE of bug 1204028
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nitrate
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Šplíchal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-13 14:01 UTC by Alois Mahdal
Modified: 2016-06-01 01:47 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-09 17:57:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alois Mahdal 2015-01-13 14:01:03 UTC
Description of problem
======================


Attempt to iterate over TestRun with non-existent Test run id results
in KeyError in a quite non-intuitive stack trace.

>     $ python -c 'import nitrate; iter(nitrate.TestRun(123132123)).next()'
>     Traceback (most recent call last):
>       File "<string>", line 1, in <module>
>       File "/usr/lib/python2.7/site-packages/nitrate/mutable.py", line 502, in __iter__
>         for caserun in self.caseruns:
>       File "/usr/lib/python2.7/site-packages/nitrate/base.py", line 64, in getter
>         self._fetch()
>       File "/usr/lib/python2.7/site-packages/nitrate/mutable.py", line 619, in _fetch
>         self._build = Build(inject["build_id"])
>     KeyError: 'build_id'
>     $


Version-Release number of selected component
============================================

python-nitrate-1.0-0.fc20.noarch


How reproducible
================

Always


Steps to Reproduce
==================

 1. set up *~/.nitrate*
 2. make up an invalid test run ID, i.e. one that would cause HTTP 404
    in web UI
 3. `python -c 'import nitrate; next(nitrate.TestRun(123))'` (replace
    "123" with the invalid ID


Actual results
==============

A non-intuitive traceback topped with *KeyError*, detailed above.


Expected results
================

More helpful traceback, ending with *NitrateError* or more specific
exception.

Comment 1 Fedora End Of Life 2015-05-29 13:36:21 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Alois Mahdal 2015-06-04 17:45:08 UTC
No change since OP--moving to rawhide to dodge EOL.

Comment 3 Jan Kurik 2015-07-15 14:35:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 4 Petr Šplíchal 2016-02-09 17:57:06 UTC
Seems to be the same issue as in bug 1204028. Already modified.

*** This bug has been marked as a duplicate of bug 1204028 ***


Note You need to log in before you can comment on or make changes to this bug.