Bug 822007 - Remove Red Hat written XMLRPC calls that mirror upstream calls
Remove Red Hat written XMLRPC calls that mirror upstream calls
Status: CLOSED CURRENTRELEASE
Product: Bugzilla
Classification: Community
Component: WebService (Show other bugs)
4.2
Unspecified Unspecified
low Severity high (vote)
: ---
: ---
Assigned To: Simon Green
tools-bugs
:
Depends On: 877989 878013 878016 924128 924154 924168 924177 924200 924222
Blocks: 877872 881454 919291
  Show dependency treegraph
 
Reported: 2012-05-16 00:42 EDT by Simon Green
Modified: 2014-12-15 23:22 EST (History)
14 users (show)

See Also:
Fixed In Version: 4.4-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-20 07:03:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Simon Green 2012-05-16 00:42:32 EDT
Description of problem:
A lot of RPC calls written by Red Hat (especially in bugzilla.* and RedHat.*) mirror officially upstream supported calls. For example, we have RedHat.createBug while upstream have Bug.create

Our calls aren't subject to the same security updates and maintenance as the upstream calls. Part of the Bugzilla 4.2.1 release has shown the number of changes that we needed to make to keep these RPC calls working.

It's time that they are officially removed. Bugzilla 4.2.1-3 will be the first version that removes these calls. Users will receive a 404 status code, along with a message of the call they should make, and a link to the bugzilla-announce-list announcement.

A future version (probably the first 4.4 release) will remove them entirely.

  -- simon
Comment 2 Simon Green 2012-08-16 01:18:41 EDT
I'm going to stall this until we release Bugzilla 4.4 at which time we will drop support for the calls that mirror upstream.
Comment 3 Jarod Wilson 2012-11-16 09:04:54 EST
Can you please list all the calls that are going to be removed explicitly? The kernel maintainers rely heavily upon python-bugzilla, and would like to be better prepared for the next major update, if any of these changes might affect python-bugzilla's functionality. We were pretty badly crippled by the last update due to changes python-bugzilla wasn't ready for.
Comment 5 Simon Green 2012-11-19 01:22:06 EST
Here is the complete list:

OLD RPC CALL                        REPLACED WITH
bugzilla.addAttachment              Bug.add_attachment
bugzilla.addComment                 Bug.add_comment
bugzilla.addComponent               Component.create
bugzilla.addIT                      no replacement
bugzilla.addUser                    User.create
bugzilla.changeAssignment           Bug.update
bugzilla.changeStatus               Bug.update
bugzilla.closeBug                   Bug.update
bugzilla.createBug                  Bug.create
bugzilla.deleteIT                   no replacement
bugzilla.disableAccount             User.update
bugzilla.editComponent              Component.update
bugzilla.getAllGroups               RedHat.getAllGroups
bugzilla.getBugActivity             Bug.history
bugzilla.getBug                     Bug.get
bugzilla.getBugCVS                  Bug.get
bugzilla.getBugFields               Bug.fields
bugzilla.getBugModified             Bug.search
bugzilla.getBugSimple               Bug.get
bugzilla.getCompInfo                Component.get
bugzilla.getProdCompDetails         Product.get
bugzilla.getProdInfo                Product.get
bugzilla.getProductDetails          Product.get
bugzilla.getReleaseComponents       Releases.getReleaseComponents
bugzilla.getRelease                 Releases.getRelease
bugzilla.getReleaseSchedule         Releases.getReleaseSchedule
bugzilla.idToName                   User.get
bugzilla.issueExists                no replacement
bugzilla.login                      no replacement
bugzilla.nameToId                   User.get
bugzilla.runQuery                   Bug.search
bugzilla.updateAttachMimeType       RedHat.updateAttachMimeType
bugzilla.updateCC                   Bug.update
bugzilla.updateDepends              Bug.update
bugzilla.updateFlagRequestees       Flag.update
bugzilla.updateFlags                Flag.update
bugzilla.updateKeywords             Bug.update
bugzilla.updateMilestone            Bug.update
bugzilla.updatePerms                User.update
bugzilla.updatePriority             Bug.update
bugzilla.updateReleaseComponents    Releases.updateReleaseComponents
bugzilla.updateRelease              Releases.updateRelease
bugzilla.updateReleaseSchedule      Releases.updateReleaseSchedule
bugzilla.updateSeverity             Bug.update
bugzilla.userInfo                   User.get
Flag.get                            Bug.get
RedHat.addAttachment                Bug.add_attachment
RedHat.addComment                   Bug.add_comment
RedHat.addComponent                 Component.create
RedHat.addUser                      User.create
RedHat.changeAssignment             Bug.update
RedHat.changeStatus                 Bug.update
RedHat.closeBug                     Bug.update
RedHat.createBug                    Bug.create
RedHat.disableAccount               User.update
RedHat.editComponent                Component.update
RedHat.getBugActivity               Bug.history
RedHat.getBug                       Bug.get
RedHat.getBugCVS                    Bug.get
RedHat.getBugFields                 Bug.fields
RedHat.getBugModified               Bug.search
RedHat.getBugSimple                 Bug.get
RedHat.getCompInfo                  Component.get
RedHat.getProdCompDetails           Product.get
RedHat.getProdInfo                  Product.get
RedHat.getProductDetails            Product.get
RedHat.idToName                     User.get
RedHat.login                        no replacement
RedHat.nameToId                     User.get
RedHat.runQuery                     Bug.search
RedHat.updateCC                     Bug.update
RedHat.updateDepends                Bug.update
RedHat.updateFlagRequestees         Flag.update
RedHat.updateFlags                  Flag.update
RedHat.updateKeywords               Bug.update
RedHat.updateMilestone              Bug.update
RedHat.updatePerms                  User.update
RedHat.updatePriority               Bug.update
RedHat.updateSeverity               Bug.update
RedHat.userInfo                     User.get

In addition, we will also be removing the ability to update external trackers using the Bug.update call. You should use the ExternalBugs RPC instead.

Accessing any of the above calls will mention the name of the new call and provide a link this bug. It will also return a HTTP 410 (permanently gone) error.

  -- simon
Comment 13 Xin Gao 2013-03-22 05:45:02 EDT
verified on QE test env version 4.4.rc2-2.b01--->FAIL

test 1: Call all old methods,
Actual results: ---->pass
return error info "HTTPError: HTTP Error 410: This RPC call has been replaced by ..."

test 2: Test all methods existing in bugzilla 4.4, --->fail
Actual results:
actually, there are some problems now, detail info pls refer to following bug links,
bug 924222
bug 924154
bug 924168
bug 924177
bug 924200

this bug can not be passed until all above bugs are solved.
Comment 15 Xin Gao 2013-04-15 02:39:29 EDT
verified on QE test env version 4.4.rc2-2--->PASS


test 1: Call all old methods,
Actual results: ---->PASS
return error info "HTTPError: HTTP Error 410: This RPC call has been replaced by ..."

test 2: Test all methods existing in bugzilla 4.4, --->PASS
Actual results:
There is no serious bug or block issue.
Comment 17 Simon Green 2013-05-14 21:50:04 EDT
(In reply to comment #16)
> IMHO too much overhead and hammering Bugzilla for getting ownership data for
> a single component. Isn't there any other option how to do it?

Yes, use Component.get rather than Product.get

https://partner-bugzilla.redhat.com/docs/en/html/api/extensions/RedHat/lib/WebService/Component.html#Get_Components
Comment 18 Toshio Ernie Kuratomi 2013-05-21 12:33:08 EDT
(In reply to Simon Green from comment #17)
> (In reply to comment #16)
> > IMHO too much overhead and hammering Bugzilla for getting ownership data for
> > a single component. Isn't there any other option how to do it?
> 
> Yes, use Component.get rather than Product.get
> 
Note: For Fedora we have a need to retrieve the ownership, cclist, and description for all the packages in the Fedora product from bugzilla in order to sync changes to package ownership into bugzilla.  Product.get() returns ProxyErrors because the server was too slow so we had to resort to making multiple Component.get calls to retrieve a slice of the packageset at a time.

I would imagine that this hits the server harder than making a single Product.get() call as each connection will have its own overhead but it does work.  Let us know (#fedora-admin on freenode, infrastructure@lists.fedoraproject.org, or admin@fedoraproject.org mail alias) if you want to optimize Product.get() rather than having us continue to use multiple calls to Component.get()
Comment 19 Simon Green 2013-05-27 00:16:07 EDT
(In reply to Toshio Ernie Kuratomi from comment #18)
> (In reply to Simon Green from comment #17)
> > (In reply to comment #16)
> > > IMHO too much overhead and hammering Bugzilla for getting ownership data for
> > > a single component. Isn't there any other option how to do it?
> > 
> > Yes, use Component.get rather than Product.get
> > 
> Note: For Fedora we have a need to retrieve the ownership, cclist, and
> description for all the packages in the Fedora product from bugzilla in
> order to sync changes to package ownership into bugzilla.  Product.get()
> returns ProxyErrors because the server was too slow so we had to resort to
> making multiple Component.get calls to retrieve a slice of the packageset at
> a time.

Product.get doesn't return a list of users on the CC: list of a component. Feel free to file a bug to fix that.

FWIW, this works for me. It returns in just over one minute.

$call = $rpc->call( 'Product.get', {
        names => [ 'Fedora'],
        include_fields => ['components.name', 'components.description', 'components.default_assigned_to'],
        } );

  -- simon

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