Merge lp:~robru/queuebot/fix-rtm-dupes into lp:queuebot
Status: | Merged |
---|---|
Merged at revision: | 93 |
Proposed branch: | lp:~robru/queuebot/fix-rtm-dupes |
Merge into: | lp:queuebot |
Diff against target: |
103 lines (+25/-33) 1 file modified
plugins/landing.py (+25/-33) |
To merge this branch: | bzr merge lp:~robru/queuebot/fix-rtm-dupes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Bruce Park (community) | Approve | ||
Stéphane Graber | Pending | ||
Ubuntu Package Archive Administrators | Pending | ||
Review via email: mp+232335@code.launchpad.net |
Commit message
Stop flooding pings when spreadsheet column A isn't unique.
Description of the change
Apologies for the big diff, but I was able to track down the flooding problem. What was happening was that people were copy&pasting their utopic landings as RTM landings, so spreadsheet column A which we were indexing on was no longer unique. And since the utopic/RTM silos rarely had identical statuses, the bot would see one status, see the other status, see they were different, and ping that, always.
I solved that by creating a more unique token by hashing together columns A and H, which is to say I combine the destination release with the landing description to create a more unique key to index off of.
In the process of writing this, I realized that the plugin had a memory leak, because it never cleared old descriptions that it was scanning, so in theory those were just piling up forever. I solved it by creating a new dict each time rather than adding to the same old dict forever.
Additionally, I wrote a few simplifications that make the code easier to read, at least for me. Hopefully none of this is controversial for you.
Thanks!
I tested this in the staging channel and it looked really good, didn't flood at all. Please merge! ;-)