Page MenuHomePhabricator

"Invalid revision ID -1" error for VisualEditorFeatureUse events, mostly from officewiki
Closed, ResolvedPublic


I was searching the errors logs for "DiscussionTools" today (to watch for errors from the maint. script in T315510) and I noticed these errors (completely unrelated to that):

image.png (546×2 px, 61 KB)

Very pronounced weekday-weekend pattern… yep, looks like about 99% of the errors are from officewiki ;) (and the other 1% from various other private and closed wikis).

This is probably some unimportant mistake in the configuration for special wikis and not worth worrying about. I couldn't figure out quickly where the -1 is coming from; I don't think it's from our code.

Event Timeline

Adding Data-Engineering in the hope that someone there might know the cause of this problem. It's making it more difficult to spot real errors in the logs.

I had a look at this today, as I was also looking into T334157.

First of all, note that "revision ID" in the error message doesn't refer to a revision of a MediaWiki page (as I first assumed), but to a revision of the schema. The error is generated here:

The error rate has dropped significantly after T332438.

image.png (533×2 px, 62 KB)

All of the errors in the last few days are in events for features that are logged server-side in WikiEditor ("source-has-js", "preview-nonlive").

The value of -1 is hardcoded here, with a comment that says it is "overridden by the EventLoggingSchemas extension attribute in WikimediaEvents/extension.json":

The override is here:

But WikimediaEvents is not actually enabled on officewiki and other private wikis, so it does not get overridden:

So the cause is that we were trying to log these events even though we were not supposed to. This also explains why T332438 lowered the error rate – the logging code was moved to WikimediaEvents, so it was no longer being loaded.

Change 906647 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/WikiEditor@master] Skip server-side event logging unless WikimediaEvents is installed

Change 906647 merged by jenkins-bot:

[mediawiki/extensions/WikiEditor@master] Skip server-side event logging unless WikimediaEvents is installed