Bug 825856 - query --component foo1,foo2 doesn't work with latest RH bugzilla
query --component foo1,foo2 doesn't work with latest RH bugzilla
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: python-bugzilla (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-28 14:18 EDT by Cole Robinson
Modified: 2013-01-10 01:48 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-27 22:06:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Cole Robinson 2012-05-28 14:18:18 EDT
$bugzilla --debug query --product Fedora --component virt-manager --component python-virtinst,virt-manager

INFO:bugzilla:Connecting to https://bugzilla.redhat.com/xmlrpc.cgi
INFO:bugzilla:Autodetecting Bugzilla type
INFO:bugzilla:Using RHBugzilla4 for URL containing bugzilla.redhat.com
INFO:bugzilla:Using cookies in /home/crobinso/.bugzillacookies for authentication
DEBUG:bugzilla:bz.query: {'product': ['Fedora'], 'component': 'python-virtinst,virt-manager'}
DEBUG:bugzilla:request_url is https://bugzilla.redhat.com/xmlrpc.cgi

Server error: <Fault -32000: 'DBD::mysql::db selectall_arrayref failed: called with 1 bind variables when 3 are needed [for Statement "SELECT assigned_to,bug_file_loc,bug_id,bug_severity,bug_status,cclist_accessible,component_id,delta_ts,estimated_time,everconfirmed,lastdiffed,op_sys,priority,product_id,qa_contact,remaining_time,rep_platform,reporter_accessible,resolution,short_desc,status_whiteboard,target_milestone,version,reporter    AS reporter_id,DATE_FORMAT(creation_ts, \'%Y.%m.%d %H:%i\') AS creation_ts,DATE_FORMAT(deadline, \'%Y-%m-%d\') AS deadline,cf_fixed_in,cf_cust_facing,cf_internal_whiteboard,cf_devel_whiteboard,cf_qa_whiteboard,cf_release_notes,cf_pm_score,cf_build_id,cf_story_points,cf_clone_of,cf_environment,cf_last_closed,cf_type,cf_regression_status,cf_mount_type,cf_documentation_action,cf_crm,cf_verified_branch FROM bugs WHERE \n(bug_id IN  \n   (SELECT bug_id\n    FROM bugs b\n        JOIN bug_cf_extra_component e USING (bug_id)\n        JOIN components c ON (c.product_id = b.product_id AND e.value = c.name)\n    WHERE c.id = ?\n   )\n OR bugs.component_id = ?\n) AND product_id = ?  ORDER BY bug_id"] at Bugzilla/Object.pm line 293\n\tBugzilla::Object::__ANON__() called at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Timeout.pm line 31\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Timeout.pm line 31\n\tDBIx::Timeout::call_with_timeout(\'undef\', \'dbh\', \'Bugzilla::DB::Mysql=HASH(0x1f0b13f0)\', \'timeout\', 118, \'code\', \'CODE(0x1f1a7360)\') called at Bugzilla/Object.pm line 299\n\tBugzilla::Object::_do_list_select(\'Bugzilla::Bug\', \'\\x{a}(bug_id IN  \\x{a}   (SELECT bug_id\\x{a}    FROM bugs b\\x{a}        JOIN ...\', \'ARRAY(0x1f16c100)\', \'undef\') called at Bugzilla/Bug.pm line 328\n\tBugzilla::Bug::_do_list_select(\'Bugzilla::Bug\', \'\\x{a}(bug_id IN  \\x{a}   (SELECT bug_id\\x{a}    FROM bugs b\\x{a}        JOIN ...\', \'ARRAY(0x1f16c100)\', \'undef\') called at Bugzilla/Object.pm line 257\n\tBugzilla::Object::match(\'Bugzilla::Bug\', \'HASH(0x1eee1160)\') called at Bugzilla/Bug.pm line 581\n\tBugzilla::Bug::match(\'Bugzilla::Bug\', \'HASH(0x1eee1160)\') called at Bugzilla/WebService/Bug.pm line 504\n\tBugzilla::WebService::Bug::search(\'Bugzilla::WebService::Bug\', \'HASH(0x1ed8feb0)\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2816\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2801\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2767\n\tSOAP::Server::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0x1ec3aaf0)\', \'<?xml version=\\\'1.0\\\'?>\\x{a}<methodCall>\\x{a}<methodName>Bug.search</...\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 432\n\tSOAP::Transport::HTTP::Server::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0x1ec3aaf0)\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 597\n\tSOAP::Transport::HTTP::CGI::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0x1ec3aaf0)\') called at /var/www/html/bugzilla/xmlrpc.cgi line 48\n'>




Using the API directly, it appears bugzilla now wants an array passed to the query, so ['virt-manager', 'python-virtinst']
Comment 1 Don Zickus 2012-05-29 10:02:37 EDT
Hi Cole,

Not suprised the API changed to using an array.  I'll try to hack up a patch to compensate on the backend.  I already have a big translation layer for bugzilla4. :-)

Cheers,
Don
Comment 2 Cole Robinson 2012-05-29 10:57:14 EDT
This package really needs some unit tests, I'm afraid to submit patches since I don't know if I'm breaking other users/bugzillas. The fact that query generation exists entirely in the CLI tool makes things such a pain, since query format obviously is specific to destination bugzilla.

Is there a mailing list for python-bugzilla? I think the RH bugzilla upgrade is bringing all the users of this tool out into the open, it would be nice to keep the momentum going to improve things.
Comment 3 Cole Robinson 2012-05-30 11:56:46 EDT
FYI I've got a python-bugzilla branch with 95% unittest coverage of bin/bugzilla query generation. Now that I've got a baseline I'll start breaking out the code to be dependent on bugzilla version.
Comment 4 Don Zickus 2012-05-30 13:53:08 EDT
I stuck a version of python-bugzilla that fixes a lot of these issues.  Mainly a collection of fixes I received from people.

http://people.redhat.com/dzickus/python-bugzilla/

If you want to test it out.

Cheers,
Don
Comment 5 Cole Robinson 2012-05-30 17:26:45 EDT
Don, are you working off python-bugzilla.git ? If so can you publish a repo?
Comment 6 Don Zickus 2012-05-31 09:22:21 EDT
Hi Cole,

I have a repo here:

git://git.engineering.redhat.com/users/dzickus/python-bugzilla

using 'latest' branch.  It looks like Will pulled that branch so you can just fetch the latest from his upstream branch too.

Cheers,
Don
Comment 7 Cole Robinson 2012-12-27 22:06:46 EST
This was fixed in fedora a while ago

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