Page MenuHomePhabricator

New empty definitions and translations are ignored on import by processMessageGroupChanges.php
Closed, ResolvedPublicBUG REPORT

Description

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/654580 removed a qqq message, which was the empty string (while at the same time adding translations for that message, so it doesn't seem like a merge conflict type of thing). That broke CI for subsequent patches.

Outcome

Definitions, translation and message documentation with no content are treated in the same way as those with content to avoid build/CI failures that require those presence. Such messages are highlighted on import to translation admins.

Event Timeline

Change 654617 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Re-add qqq string to unbreak CI

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

I don't remember any examples offhand, but this has definitely happened before (cc @Jdforrester-WMF )

Change 654617 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Re-add qqq string to unbreak CI

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

@Raymond I don't see how this could be a race condition in state synchronization. The qqq message was added the same time the en message was added. The state export clearly happened after that because it includes a number of translations.

And again. If the bot breaks CI every time it runs, that's going to be a bit annoying.

The TWN page doesn't exist so I'd guess this is a bug where TWN fails to create a page for an empty message, and then writes back the non-existence status to the file.

Change 654808 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/GrowthExperiments@master] Fix i18n CI break

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

Tgr renamed this task from l10n-bot removes qqq entries to l10n-bot removes (empty?) qqq entries.Jan 7 2021, 10:23 AM
Tgr updated the task description. (Show Details)

Looks like https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/647126 is adding empty message documentation. I would say this fools the CI but fails later on translatewiki. Bug or feature on translatewiki side?

Maybe the CI should complain about empty message documentation too?

Maybe the CI should complain about empty message documentation too?

According to T258381#6409434 it can be configured to do so. Nevertheless, this seems like a bug to me. Silently deleting qqq messages, even if they are incorrect by some measure, is just not useful.

Change 654808 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Fix i18n CI break

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

Nikerabbit added a subscriber: Nikerabbit.

Silently deleting qqq messages, even if they are incorrect by some measure, is just not useful.

I'll test if this is the case.

@Nikerabbit Does empyting message doc on translatewiki make any sense at all? Should this forbidden by an abusefilter, shouldn't it?

@Nikerabbit Does empyting message doc on translatewiki make any sense at all? Should this forbidden by an abusefilter, shouldn't it?

The message in question was added in https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/GrowthExperiments/+/e7451c5f1cd2c338b60ec5931e817a51f6794517 and was not emptied in translatewiki.net.

We can add an Abuse filter check for emptying message documentation, but that would be a separate task.

Ohhhh. I did wonder why we left those docstrings empty, but the possibility of TWN vandalism did not occur to me. I suppose it was the same for @Catrope when he added one more of those tasktype-name messages and just followed the existing pattern.

So the blanking itself didn't break anything because the page still existed and got exported, but when we added another empty message, that didn't create a page (which makes sense, MediaWiki does not let you save a blank new page) and then the non-existence got written back.

I don't think there's any use case for adding an empty new message, but this still seems a confusing way to fail and as such a bug IMO. Also, I imagine the same would happen if the en message would be the one that would be empty? That does seem like a legitimate thing to do.

Wrt. TWN qqq blanking, yes please add an abusefilter. As mentioned above, the banana plugin has a check against empty docstrings (although the GrowthExperiments repo doesn't use it) so blanking could well cause a CI break in other repos.

I can confirm that an empty message documentation value is not imported to translatewiki.net. I think this applies to all languages.

It does not show up in Special:ManageMessageGroups nor is it present in messagechanges.cdb, so I suspect this issue lies somewhere in the ExternalMessageSourceStateComparator class.

Nikerabbit renamed this task from l10n-bot removes (empty?) qqq entries to (New?) empty translations are ignored on import by processMessageGroupChanges.php.Jan 26 2021, 11:17 AM

The condition to skip empty content has been there since 2012. I guess it made sense back then, where these were more likely errors or placeholders, as opposed to nowadays where there may be intentional.

Change 658581 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Allow importing empty content from external sources

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

Nikerabbit renamed this task from (New?) empty translations are ignored on import by processMessageGroupChanges.php to New empty definitions and translations are ignored on import by processMessageGroupChanges.php.Jan 26 2021, 12:44 PM
Nikerabbit changed the subtype of this task from "Task" to "Bug Report".Jan 26 2021, 12:53 PM
Nikerabbit updated the task description. (Show Details)

Change 658581 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Allow importing empty content from external sources

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

Was this patch deployed to translatewiki already?

Not yet. It's expected to be deployed today.