tflink/mock_fedorainfra — Issue #7: bodhi.query() returns different results from upstream server
Author: kparal
Created: 2012-02-08 12:11:24+00:00
State: open

This is what happens when I use the official Bodhi server inside AutoQA:

```
>>> import autoqa.bodhi_utils
>>> autoqa.bodhi_utils.bodhi.query(package='tudu', request='stable', release='F16', limit=1)
Bunch(num_items=1, tg_flash=None, title='1 update found', updates=[Bunch(approved=None, bugs=[Bunch(bz_id=678138, parent=False, security=False, title='New version available'), Bunch(bz_id=769648, parent=False, security=False, title="Latest version of TuDu doesn't allow redirecting files to certain directories on install")], builds=[Bunch(nvr='tudu-0.8.1-1.fc16', package=Bunch(committers=['sparks'], name='tudu', suggest_reboot=False))], close_bugs=True, comments=[Bunch(anonymous=False, author='bodhi', group=None, karma=0, text='This update has been submitted for testing by sparks. ', timestamp='2012-01-31 15:44:57'), Bunch(anonymous=False, author='bodhi', group=None, karma=0, text='This update is currently being pushed to the Fedora 16 testing updates repository.', timestamp='2012-01-31 16:46:42'), Bunch(anonymous=False, author='bodhi', group=None, karma=0, text='This update has been pushed to testing', timestamp='2012-01-31 22:05:03'), Bunch(anonymous=False, author='bcotton', group=None, karma=1, text='+1', timestamp='2012-01-31 22:06:31'), Bunch(anonymous=False, author='bodhi', group=None, karma=0, text='This update has reached 7 days in testing and can be pushed to stable now if the maintainer wishes', timestamp='2012-02-08 02:03:38'), Bunch(anonymous=False, author='bodhi', group=None, karma=0, text='This update has been submitted for stable by sparks. ', timestamp='2012-02-08 02:11:23'), Bunch(anonymous=False, author='autoqa', group=None, karma=0, text='AutoQA: depcheck test PASSED on i386. Result log:\nhttp://autoqa.fedoraproject.org/report/1yio (results are informative only)', timestamp='2012-02-08 02:13:26'), Bunch(anonymous=False, author='autoqa', group=None, karma=0, text='AutoQA: upgradepath test PASSED on noarch. Result log:\nhttp://autoqa.fedoraproject.org/report/1yj3 (results are informative only)', timestamp='2012-02-08 02:15:57'), Bunch(anonymous=False, author='autoqa', group=None, karma=0, text='AutoQA: depcheck test PASSED on x86_64. Result log:\nhttp://autoqa.fedoraproject.org/report/1yj8 (results are informative only)', timestamp='2012-02-08 02:24:14')], critpath=False, critpath_approved=True, date_modified=None, date_pushed='2012-01-31 21:19:13', date_submitted='2012-01-31 15:44:29', karma=1, nagged=None, notes='Updated to latest version (0.8.1)', release=Bunch(dist_tag='f16', id_prefix='FEDORA', locked=False, long_name='Fedora 16', name='F16'), request='stable', stable_karma=3, status='testing', submitter='sparks', title='tudu-0.8.1-1.fc16', type='enhancement', unstable_karma=-3, updateid='FEDORA-2012-1092')])
```

And this is what happens when I use Boji server inside AutoQA:

```
>>> import autoqa.bodhi_utils
>>> autoqa.bodhi_utils.bodhi.query(package='tudu', request='stable', release='F16', limit=1)
Bunch(num_items=4, tg_flash=None, title='4 updates found', updates=[Bunch(approved=None, bugs=[Bunch(bz_id=678138, parent=False, security=False, title='New version available'), Bunch(bz_id=769648, parent=False, security=False, title="Latest version of TuDu doesn't allow redirecting files to certain directories on install")], builds=[Bunch(nvr='tudu-0.8.1-1.el6', package=Bunch(committers=['sparks'], name='tudu', suggest_reboot=False))], close_bugs=True, comments=[], critpath=False, critpath_approved=False, date_modified=None, date_pushed='2012-01-31 17:36:55', date_submitted='2012-01-31 16:19:24', karma=0, nagged=None, notes='Upgraded to the latest version.', release=Bunch(dist_tag='dist-6E-epel', id_prefix='FEDORA-EPEL', locked=False, long_name='Fedora EPEL 6', name='EL-6'), request=None, stable_karma=3, status='testing', submitter='sparks', title='tudu-0.8.1-1.el6', type='enhancement', unstable_karma=-3, updateid='FEDORA-EPEL-2012-0293')])
```

It returned completely different package (el6 when requested `release='F16'`). This breaks upgradepath test. I tried to delete `/tmp/boji.db`, didn't help.

It seems that `release` option is not honored. Or maybe the problem is deeper.