Open
Bug 1128878
Opened 10 years ago
Updated 4 years ago
Automatically check the status of assigned mentored bugs, and unassign them after a period of inactivity
Categories
(Community Building :: Contribute, task)
Tracking
(Not tracked)
NEW
People
(Reporter: jdm, Unassigned)
References
Details
(Whiteboard: [lang=py][lang=js])
Attachments
(1 file)
16.23 KB,
text/plain
|
Details |
It's common to find mentored bugs that have been assigned to a contributor weeks or months ago, with no subsequent followup from the assignee. This is currently handled on an ad-hoc basis; I propose writing a tool that will perform the following steps:
* find the set of mentored bugs with an assignee where the last modified date is >3 weeks
* Set the assignee back to default (nobody@mozilla.org)
* Request needinfo? from the previous assignee
* Leave a comment like "I have reset the assignee as part of an automated cleanup since there has been no visible activity in this bug for some time. If this is incorrect, please leave a comment to let me know and I'll correct the error."
I recommend writing it in Python or node.js, since we have useful libraries for interacting with those languages in the form of bz.js and bzrest (both on github).
Reporter | ||
Updated•10 years ago
|
Whiteboard: [lang=py][lang=js]
Comment 1•10 years ago
|
||
Further we maybe could discuss what to do with bugs that have comments in it like "Could you please assign this bug to me?" or "Can I work on this?" but nobody has ever assigned the bug to them? (this is due to not having editbug permission)
Reporter | ||
Comment 2•10 years ago
|
||
Until now, the recommended practice has been to avoid assigning bugs to newcomers until they submit a patch. I believe the goal of this was to avoid the stale bugs with assignees problem that we're trying to fix here, so if this tool is adopted we might be able to move to a model of eagerly assigning bugs to people who express interest.
We would like to work on this. Can you point us to the API's that you use to query the codebase and bugzilla?
Reporter | ||
Comment 4•10 years ago
|
||
https://github.com/canuckistani/bz.js and https://github.com/bhearsum/bzrest respectively.
Reporter | ||
Comment 5•10 years ago
|
||
Note, those libraries interface with the REST API described here: https://wiki.mozilla.org/Bugzilla:REST_API
Reporter | ||
Comment 6•10 years ago
|
||
I will also point out https://landfill.bugzilla.org/bugzilla-tip/ as a great place for testing.
Great, thanks for the links! Our team is actively working on this. One question: where will the script live, and how/when would it be called? We're less experienced with javascript, but this will be a good opportunity for us to learn.
Reporter | ||
Comment 8•10 years ago
|
||
Ideally the tool would be launched like `nodejs main.js` or `python main.py` - that is, from the terminal rather than a web browser or any other GUI.
Reporter | ||
Comment 9•10 years ago
|
||
Oh, and as for where it will live, I suggest creating a github repository for the time being.
Comment 10•10 years ago
|
||
We will, thank you for the direction.
Comment 11•10 years ago
|
||
Should this be filed against bugzilla?
Reporter | ||
Comment 12•10 years ago
|
||
I think it will be easier to demonstrate value through an external tool. It also requires less Perl.
Comment 13•10 years ago
|
||
We are working on a solution, currently hosted at https://github.com/aaroncarsonart/AbandonedMentoredBugTracker . We are currently trying to figure out how to use the bugzilla landfill and to test our code that modifies the bugs on that site. Any guidance would be appreciated.
Reporter | ||
Comment 14•10 years ago
|
||
If you use the endpoint of https://landfill.bugzilla.org/bugzilla-tip/rest/ you should be able to use everything listed at https://wiki.mozilla.org/Bugzilla:REST_API#Examples_of_native_REST_API_use .
Reporter | ||
Comment 15•10 years ago
|
||
Scratch that! You should use bugzilla-dev.allizom.org, which is the staging server so the data there doesn't matter. You can do whatever you want there.
Comment 16•10 years ago
|
||
Hi! Our current status with this project is that the open source class has finished. We learned a lot, but we feel some of the requirements are a little above us at our grasp of javascript and trying to figure out bz.js and the bugzilla REST API. So far our script queries bugs successfully, and we figured out how to pass it login credentials. We have read though lots of documentation and while it seems to explain everything well we're struggling with the lack of a succinct example. It seems like a lot to learn all at once, and we are having troubles specifically with commenting on a bug via the script (properly instantiating and sending a bug with the Javascript API).
As our team has reached the end of our major time commitment, we feel it may be best if we hand this off/declare our intent to stop working on this. Maybe someone with a greater grasp of the tools at hand can implement this better. I am open to looking into new possibilities if I can get more guidance, but most likely I will run out of time to look into this when the next term starts.
Thank you for your help and guidance, we learned a lot working on this nonetheless.
Reporter | ||
Comment 17•10 years ago
|
||
Thanks for pushing all of your work to the repository :)
Comment 18•10 years ago
|
||
Hi I would love to pick this up. How do you envision this tool working? Would the person who builds the tool host it or is there some Bugzilla server that could just run it through cron? Sorry if that seems like a silly question I don't have much experience with contributing to open source yet.
Reporter | ||
Comment 19•10 years ago
|
||
I envision someone running it locally, either manually or automatically, until we figure out that it's providing indispensable value and figure out what its future is :) You would be welcome to work on it!
Comment 20•10 years ago
|
||
Great, thanks!
Comment 21•10 years ago
|
||
Hi I've made some progress on the tool. Who can I talk to about getting edit bug privileges on the allizom server that you mentioned. The JSON returned by landfill instance is different enough than the JSON from this Bugzilla that I want to test on something close to a production environment.
Flags: needinfo?(josh)
Comment 23•10 years ago
|
||
I have a python script that should work https://github.com/noliverio/Inactive-mentored-bug-tracker. It would be great if someone could give me a code review for it and advise on the next steps. Thanks!
Reporter | ||
Comment 24•10 years ago
|
||
Great work, Nick! I'll file some issues in the github repository for things I've noticed. What kind of testing have you performed on it?
Comment 25•10 years ago
|
||
> self.search_params = """f1=days_elapsed&list_id=10008579&o1=equals&
> query_format=advanced&bug_status=ASSIGNED&v1=%s""" % self.length_of_inactivity_period
this isn't the correct query -- you need to check for when the assignee field has changed, not when the bug's status was changed to assigned.
i don't think it's possible to create the required query with bugzilla's search, but it would be easy for us to add a bespoke webservice method to provide the list to you. filed as bug 1151718.
Comment 26•10 years ago
|
||
(In reply to Byron Jones ‹:glob› from comment #25)
> > self.search_params = """f1=days_elapsed&list_id=10008579&o1=equals&
> > query_format=advanced&bug_status=ASSIGNED&v1=%s""" % self.length_of_inactivity_period
>
> this isn't the correct query -- you need to check for when the assignee
> field has changed, not when the bug's status was changed to assigned.
>
> i don't think it's possible to create the required query with bugzilla's
> search, but it would be easy for us to add a bespoke webservice method to
> provide the list to you. filed as bug 1151718.
I have updated the script on Github. With the existing api I was able to search for all bugs that are not assigned to nobody@mozilla.com. I do not believe that the custom webservice is necessary.
Comment 27•10 years ago
|
||
I have made the recommended changes, and tested it with the tests included in the repo. I am wondering what the next step is. Thanks.
Updated•10 years ago
|
Flags: needinfo?(josh)
Reporter | ||
Comment 28•10 years ago
|
||
Ack, sorry for letting this sit here. I've been thinking about the best way to introduce this tool and minimize the risk of any previously-undetected bugs from wreaking havoc on the live database. I propose we add a dry-run mode that just prints out the bugs that would be modified and exits - this will allow us to verify the results before committing them. Does that sound good?
Flags: needinfo?(josh)
Comment 29•10 years ago
|
||
That sounds like a good course of action. I have updated the script to include a dry run mode that will print the bug's id, it's mentor, it's assignee, and the date it was last changed for each bug that it would otherwise modify.
Reporter | ||
Comment 30•10 years ago
|
||
Fantastic! I'll run it tomorrow and look through the output.
Flags: needinfo?(josh)
Comment 31•10 years ago
|
||
(In reply to Josh Matthews [:jdm] from comment #30)
> Fantastic! I'll run it tomorrow and look through the output.
Just a heads up, if you want to read through the output with the current state of the database dry run will print out more or less a short novella's worth of information.
Comment 32•10 years ago
|
||
as a point of comparison here's the list of stale bugs which i find by querying the database directly (there's 154).
Reporter | ||
Comment 33•9 years ago
|
||
The output from the tool looks good to me; I've asked on dev.planning (https://www.mozilla.org/en-US/about/forums/#dev-planning) for any objections to kicking this off.
Flags: needinfo?(josh)
Reporter | ||
Comment 35•7 years ago
|
||
I never followed up on my request to start running the script; in theory it's all ready.
Mentor: josh
Flags: needinfo?(josh)
Comment 37•7 years ago
|
||
I'll pick this up and see what I can do. Josh left clear directions in the description.
Assignee: nobody → ehumphries
Flags: needinfo?(josh)
Comment 38•5 years ago
|
||
This can be handled by a new rule in Auto Nag.
Assignee: ech → nobody
You need to log in
before you can comment on or make changes to this bug.
Description
•