Disable retired components in bugzilla #59
Comments
Any progress on this? The Fedora 'component' list in bugzilla is still filled with long retired components |
None other than the subject came up again recently: https://lists.fedoraproject.org/pipermail/infrastructure/2015-March/015830.html |
This was marked fixed by #184 ... but I still can't tell what the expected workflow here is? Is pkgdb going to do this automatically, or is it now just easier to query to API for a list and someone still needs to manually request the components to be disabled? If the latter, that's fine, I just can't tell the current state. Also in #184 the cover letter says: 'This should fix #59 for now as there is currently no way to call bugzilla's API to do it automatically.' The 'do it' here is a bit unclear, but if you mean 'disable a component' it definitely is supported via bugzilla's XMLRPC interface as I mentioned in the initial comment here. I verified it is still working. However it requires 'editcomponent' bugzilla access so it won't work for tests as your regular user. Here's some example code that toggles the visibilty of product=Fedora component=kvm on partner-bugzilla. The _proxy.Product.get workaround isn't strictly required, it just saves some query time. import bugzilla
bzapi = bugzilla.Bugzilla("partner-bugzilla.redhat.com")
print "Getting fedora components..."
fedoraprod = bzapi._proxy.Product.get({
"names": ["Fedora"],
"include_fields": ["name", "id", "components.name",
"components.is_active"],
})
kvmcomponent = [c for c in fedoraprod["products"][0]["components"] if
c["name"] == "kvm"][0]
results = bzapi.editcomponent({
"product": "Fedora",
"component": "kvm",
"is_active": not kvmcomponent["is_active"],
})
print "editcomponent returned: %s" % results When run with appropriate privs, it looks like: $ python test.py |
It is the later case yes. If we get a script to do it automatically, we could run it as a cron in the Fedora infrastructure, but pkgdb itself won't do it. Cool if it can be done by the API, from the discussion on the list I had understood the opposite. |
Why though? I see utility/pkgdb-sync-bugzilla already handles editing existing components CC list etc, seems the natural place to extend things to disable retired components as well. Maybe that's what you meant by 'pkgdb itself won't do it' since it's a separate script, but it's still in this git repo... |
Yes, I'm fine with shipping the cron script in pkgdb2's sources, when I said But doing it via a cron job and shipping in withing pkgdb2 utility folder, big 👍 for me :) |
gotchya, thanks. can we reopen this bug then to track the utility/pkgdb-sync-bugzilla change? |
Would you like to work on it? |
I plan on coming up with a script to do this manually with the new pkgdb APIs, hopefully by end of the week. When that's done I'll comment here |
Cool, thanks! |
Still working on this? May I help with something? |
Sorry this is a spare time thing that I was hoping to get to before I moved across the state... that didn't happen and now I'm swamped with other stuff :/ So I don't expect to get back to this for at least a few weeks |
Okay I just took a look at this, sorry it took so long. I pushed a commit to my pkgdb2 fork that should adjust the pkgdb-sync-bugzilla to update component active state depending on if the package is retired: crobinso@8a3c5d9 Note that actual commit is untested since I don't have an environment to run the script, but I tested the broad strokes in a manual script. A few things I realized:
|
Regarding this, I kinda think we should already disable reporting bugs. The Maybe we can ask @tyll what he thinks of this. |
I guess it will be more confusing for users if there is no obvious way to report a bug in an orphaned package. Also packages might be unorphaned. Ideally I would prefer a solution that would add a explanatory message to every bug report that is opened for an orphaned package and disable bug reporting only if all active Fedora branches are retired. But this might be something that FESCo might decide, since it is a major change. |
This is basically a duplicate of a pkgdb RFE I filed last year:
https://fedorahosted.org/packagedb/ticket/240
It would be nice if packagedb would disable bugzilla components when they have been retired in all current fedora releases. This is possible with the bugzilla XMLRPC API.
Basically, in pkgdb-sync-bugzilla.in, where you call server.editcomponents, you need to do
data["is_active"] = bool(component_is_retired_and_blocked_in_all_branches())
(That function doesn't exist so would need to be implemented. And that suggestion was relevant for pkgdb1 but I don't seen any instance of editcomponents in pkgdb2)
The component is then hidden in the BZ web UI component list, but bugs aren't closed, searches can still be done, etc.
An example of why this is useful: we last had a 'kvm' package in fedora 4 years ago, it was retired in favor or merging with the 'qemu' package. but the 'kvm' component exists in bugzilla, and collects misfiled bug reports all the time. yet there's no way in packagedb for me to even add myself to the bug CC list, so it's a huge pain. Not to mention dropping all the actual retired components from bugzilla will hopefully speed up filing new reports, changing component of existing bug, etc.
(originally filed for pkgdb2 at https://fedorahosted.org/pkgdb2/ticket/1 but i'd prefer to track it here)
The text was updated successfully, but these errors were encountered: