Bug 457770 - BZ is missing XMLRPC multicall feature
Summary: BZ is missing XMLRPC multicall feature
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 3.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-04 15:18 UTC by Martin Bacovsky
Modified: 2025-10-16 23:18 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-08-14 15:59:12 UTC
Embargoed:


Attachments (Terms of Use)
Example of multicall request (3.76 KB, application/xml)
2008-08-04 15:18 UTC, Martin Bacovsky
no flags Details
Patch to add system.multicall functionality to compat_xmlrpc layer (v1) (2.27 KB, patch)
2008-08-13 19:09 UTC, David Lawrence
nelhawar: review+
Details | Diff

Description Martin Bacovsky 2008-08-04 15:18:15 UTC
Created attachment 313365 [details]
Example of multicall request

Description of problem:
Bugzilla XMLRPC call "system.multicall" fails.

Version-Release number of selected component (if applicable):
3.1.4

How reproducible:
Allways

Steps to Reproduce:
Make XMLRPC call like one in attachment


Actual results:
Call fails with 'Can\'t call method "login_exempt" on an undefined value at /var/www/html/bugzilla/Bugzilla/WebService.pm line 50.\n'

Expected results:
Call returns proper results

Comment 1 David Lawrence 2008-08-13 19:09:47 UTC
Created attachment 314236 [details]
Patch to add system.multicall functionality to compat_xmlrpc layer (v1)

Thanks for the report. It was indeed left out unintentionally during the porting of RH customizations to the new version of Bugzilla.

Attached is a patch to add system.multicall as well as a simple system.ping to the compat_xmlrpc layer. I have tested this to work on bz-web2-test. Please take a look.

Dave

Comment 2 Jason Tibbitts 2008-08-13 20:01:31 UTC
Is bz-web2-test externally visible, or is there any way for us outside of Red Hat to test our scripts against these patches without bringing up our own bugzilla instances?

Comment 3 Mike Bonnet 2008-08-13 20:48:31 UTC
The output format seems to have changed in an unusual way.  The output used to be a list of hashes, each hash corresponding to the results of an individual call in the multicall.  Now, for each call, I get two hashes in the output list.  The first contains some metadata about the call that was made, like this:

{'full_method': 'bugzilla::getBug',
  'method': 'getBug',
  'package': 'bugzilla',
  'params': [303591, '<username>@redhat.com', '<password>'],
  'userid': 0},

followed by another hash that contains the results of the call.  So if I do a multicall encapsulating 2 calls, I'll get a output list with 4 entries in it.  Is this the expected behavior?

Comment 4 David Lawrence 2008-08-13 20:59:24 UTC
(In reply to comment #2)
> Is bz-web2-test externally visible, or is there any way for us outside of Red
> Hat to test our scripts against these patches without bringing up our own
> bugzilla instances?

bz-web2-test is internal development instance only. For large features we need more feedback/testing from the broader community, then we push updates packages to partner-bugzilla.redhat.com which is our external staging server. This fix will be tested by a couple internally on our development box and will go out asap so there is probably no need to push an update to partner-bugzilla.

Thanks
Dave

Comment 5 David Lawrence 2008-08-13 21:01:08 UTC
(In reply to comment #3)
> The output format seems to have changed in an unusual way.  The output used to
> be a list of hashes, each hash corresponding to the results of an individual
> call in the multicall.  Now, for each call, I get two hashes in the output
> list.  The first contains some metadata about the call that was made, like
> this:
> 
> {'full_method': 'bugzilla::getBug',
>   'method': 'getBug',
>   'package': 'bugzilla',
>   'params': [303591, '<username>@redhat.com', '<password>'],
>   'userid': 0},
> 
> followed by another hash that contains the results of the call.  So if I do a
> multicall encapsulating 2 calls, I'll get a output list with 4 entries in it. 
> Is this the expected behavior?

That is my fault. I had some debugging info enabled which is the reason for the extra data. I have turned off the additional info and you should get the same results as before now.

Dave

Comment 6 Mike Bonnet 2008-08-13 22:15:21 UTC
My test script, tested against bz-web2-test, works now.

Comment 7 Noura El hawary 2008-08-14 10:42:57 UTC
Comment on attachment 314236 [details]
Patch to add system.multicall functionality to compat_xmlrpc layer (v1)

Hey Dave, looks good to me. 
Tested it locally and on bz-web2 and seems to work fine.

Thanks,
Noura

Comment 8 David Lawrence 2008-08-14 15:59:12 UTC
Thanks Noura. Checked into CVS now. Should be in the next update (today).

Dave


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