-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bot keeps updating finished contest #25
Comments
I don't see any obvious flaw in the infobox template on the page, nor anything surprising in fiwiki.yml. The config for @zache-fi, do you have any ideas? |
I am now trying: UPDATE contests SET closed = 1 WHERE contest_id = '1757';
UPDATE contests SET ended = 1 WHERE contest_id = '1757'; Then restarting the job. It seems to have worked – the bot didn't edit the 2024-30 page after I did this. So I think the immediate problem/symptom is fixed. But why did it happen in the first place? That's the question. |
It is not in the configs. It could be possible that bot doesn't handle the redirect and it has created a bogus competition to the db. There were a temporary fix to prevent the bot editing the page Viikon_kilpailu_2024-30 by protecting the page. However result was that the ukbot crashed so I unprotected the page yesterday. Also, JakeNorthernlynx tried to close the Viikon_kilpailu_2024-30 unsuccesfully multiple times and there is repeated messages by bot in his talk page for closing the competition.
I think that the quick fix could be closing the competition by directly editing the db. |
Actually there was also competition page for the week 2024-31, but the page was changed to be redirect |
That could be the explanation, yeah. As far as I understand, every time the bot runs (?) it actually checks all contest pages that match the pattern, and adds new pages to the database at that point. So when I check |
Based on just reading the code and i didn't actually check this 1.) It will get open contests from db in get_contest_page_titles() and it will get the "Wikipedia:Viikon kilpailu/Viikon kilpailu 2024-31" Line 99 in 3f50945
2.) The list of contents is passed to discover_contest_pages() which will update page based on redirect to " "Wikipedia:Viikon kilpailu/Viikon kilpailu 2024-30" but it doesn't update the state variable so the state is still that the competition is open. Line 140 in 3f50945
state is in p[0] when it yields the result Line 142 in 3f50945
3.) It also uses the redirected page title when handling notifications and closing the competition. Because this it never closes the competition got in step 1. |
Per report in https://no.wikipedia.org/w/index.php?title=Brukerdiskusjon:Danmichaelo&oldid=prev&diff=24971035
The bot keeps updating the 2024-30 contest on fiwiki even though that contest was finished in August 2024.
Looking at the contests database with
SELECT * FROM contests WHERE site = 'fi.wikipedia.org'
, I see this:So the 2024-30 contest is set as finished, but the 2024-31 contest is not. The contest for week 30 was set to last for two weeks (week 30 and 31), but the bot should be able to handle that.
The text was updated successfully, but these errors were encountered: