Page MenuHomePhabricator

revertbot.py infinitely loops over user contribs
Closed, ResolvedPublic

Description

revertbot.py use user contribs again and again.

Bug was reported by @Dvorapa in T168508, see F8504808

Event Timeline

This comment was removed by Dvorapa.

I've changed family and user in user-config.py and run revertbot without parameters and the same loop was triggered.
Strange thing is that on cswiki this bug never happenned to me.
Take a look at this screenshot:

Snímek z 2017-06-22 20-25-02.png (741×1 px, 112 KB)

Change 360948 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] Don't loop over user contribs

https://gerrit.wikimedia.org/r/360948

@Dvorapa, seems your bot made more than 500 edits on cswiki. Please check this patch given above.

My 2 cents.

  1. Are you by chance trying to revert DvorapaBot when you are logged as DvorapaBot? If so, maybe anytime you revert, one more item is added by get_contributions() to be reverted at the next round.
  1. IMO data = list(pywikibot.Site().usercontribs(user=self.user, namespaces=ns, total=max)) keeps on fetching the same pages as never_continue is always True, even when count == max.

@Xqt I would like to review the changes, but first my Linux distro developers suddenly discontinued their project and therefore I have to find a new distro and reinstall my PC. After that I have to learn how Gerrit works and then I can somehow review it (btw I saw the changes and there was nothing I could comment on or object to, every line of changes looks ok)

@Xqt I tried to review following the Gerrit/Tutorial, I hope I made it right.

Change 360948 merged by jenkins-bot:
[pywikibot/core@master] Don't loop over user contribs

https://gerrit.wikimedia.org/r/360948