Page MenuHomePhabricator

MessageIndex is not updated after running autoimport
Closed, ResolvedPublicBUG REPORT


Steps to Reproduce:

  1. Add configuration for a new project to
  2. Update the server - twn-update-config
  3. Run autoimport
  4. Once its done, go to Translate a message on

Actual Results:

While translating the message, none of the translation aids appear. Reviewing the browser's network request reveals the following response from the translation aid API,

  "error": {
    "code": "nomessagefortitle",
    "info": "Title does not correspond to a translatable message",
    "*": "See for API usage. Subscribe to the mediawiki-api-announce mailing list at <> for notice of API deprecations and breaking changes."

Expected Results:

The translation aid API should work properly.

Additional details:

My snipped chat with @Nikerabbit

Niklas Laxström, [21.05.19 19:27]
I wonder if this is related to the fact that the jobqueue has been running for a while and maybe it had cached the message groups

Niklas Laxström, [21.05.19 19:28]
It might be useful to add an explicit local cache clear for message groups for that job

Abijeet Patro, [21.05.19 19:30]
autoimport doesn't currently trigger a recache?

Niklas Laxström, [21.05.19 19:31]
I believe it does, but the jobqueue process has a in process cache that doesn't get invalidated by that

Niklas Laxström, [21.05.19 19:33]
Alternative to dropping local caches would be to do it conditionally based on something like isValid() check on the global cache. But I don't know if such thing exists.

Niklas Laxström, [21.05.19 19:34]
if we are pedantic, I should say datacenter-local cache instead of global :)

Abijeet Patro, [21.05.19 19:37]
After running createMessageIndex.php, translationaid API works fine.

Niklas Laxström, [21.05.19 19:38]
Yep, so we are quite sure that outdated messageindex was the reason

Event Timeline

abi_ created this task.May 22 2019, 12:06 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 22 2019, 12:06 PM
abi_ added a comment.May 22 2019, 2:52 PM

Had to run the createMessageIndex.php script again after autoimport to update the message index after adding Ajapaik web app and mw-scss extension to

The code properly inserts MessageIndexRebuildJob. I started thinking what could cause this.

On we have this snippet:

To apply the changes to, do the following:

sudo /usr/sbin/service mw-jobrunner restart # This is important if new namespace is added!

I think that the same in fact applies to new message groups. The JobQueue will continue to use old LocalSettings.php which does not have the new group, until restarted.

Possible solutions:

  1. Make it so that configuration updates also require full deployment which does the restart
  2. Make twn-update-config script restart jobrunners

Since ful-deployments are so slow (can take 10 minute sometimes), I'm leaning on 2 for now.

Change 547620 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[translatewiki@master] Restart jobrunner after config updates

Change 547620 merged by jenkins-bot:
[translatewiki@master] Restart jobrunner after config updates

I have merged the related patch. We will be testing this issue after deploying the patch on Twn, and then setting up a new project.

abi_ closed this task as Resolved.Dec 11 2019, 8:04 AM

This is working fine. Tested this yesterday after deploying T237456: Integrate WatchTranslations with