Page MenuHomePhabricator

Community Wishlist bot is down
Closed, ResolvedPublic

Description

Last edit August 9, 2024

I think the reason is that I marked https://meta.wikimedia.org/wiki/Community_Wishlist/Wishes/Improve_typography_standards for translation, not realizing it was archived, and then undid it by deleting and undeleting the wish to make sure all translation artifacts were cleaned up. This shouldn't cause the bot to crash, though.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Definitely failing on that page. It looks like it's getting to that item in recentchanges, finding it to be a change of type "logtype": "pagetranslation", "logaction": "mark" and attempting to add it to the agg-Community_Wishlist_wishes group. Which is where it fails.

[2024-08-12 00:54:50] [I] Processing changes starting from 2024-08-09T17:18:07.000Z rc_id 32120010
[2024-08-12 00:54:50] [I] Page marked for translation: [[Community Wishlist/Wishes/Improve typography standards]]
/data/project/wishlist/prod/node_modules/mwn/build/error.js:44
    return Promise.reject(new MwnError(errorConfig));
                          ^
MwnError: internal_api_error_TypeError: [f8022283-1421-47e2-af96-ebfdd35491c8] Caught exception of type TypeError
    at Object.rejectWithError (/data/project/wishlist/prod/node_modules/mwn/build/error.js:44:27)
    at Response.dieWithError (/data/project/wishlist/prod/node_modules/mwn/build/core.js:324:24)
    at Response.handleErrors (/data/project/wishlist/prod/node_modules/mwn/build/core.js:297:37)
    at Response.process (/data/project/wishlist/prod/node_modules/mwn/build/core.js:189:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

I wonder if it's a matter of adding "rctoponly": 1 when we're fetching the RC batch? That would have the possibly bad effect of excluding pages that had been marked for translation, then edited again, then not marked again (but it'd pick them up after they get marked again).

e.g. this API request instead of this doesn't include the out-of-date mark for the above page.

Change #1061617 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/Translate@master] Extra validity check for aggregate group

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

The actual error here should've been code: 'invalidgroup', info: 'Group does not exist or is invalid' but that was being obscured by a bug in MediaWiki-extensions-Translate; the above patch addresses that.

To reproduce the original bug:

  1. Create a wish
  2. Mark it for translation
  3. Remove it from translation
  4. Run npm run update-indexes

I merged and deployed the MR, but still ran into the same issue. Eventually I was able to fix it, and now we've got a new issue:

[2024-08-12 18:30:13] [S] [mwn] Login successful: Community Tech bot@WishlistIntake@https://meta.wikimedia.org/w/api.php
[2024-08-12 18:30:13] [I] Updating cache from recent changes
[2024-08-12 18:30:13] [I] Processing changes starting from 2024-08-09T23:26:11.000Z rc_id 32122194
file:///data/project/wishlist/prod/src/cli/WishStoreUpdater.js:95
			return change.title.startsWith( config.wishPagePrefix );

I'm investigating.

EDIT: we should be all set after !248

musikanimal opened https://gitlab.wikimedia.org/repos/commtech/wishlist-intake/-/merge_requests/248

WishStoreUpdater: don't fail when adding to agg group or if empty change

samwilson merged https://gitlab.wikimedia.org/repos/commtech/wishlist-intake/-/merge_requests/248

WishStoreUpdater: don't fail when adding to agg group or if empty change

I think we can consider this resolved.