Trying to translate Tech-News, memory translations from previous week do not display anymore as translation aid.
Note there is neither Apertium suggestion, but on other page, Apertium still works (whereas I have not found any page where TTM works).
Pols12 | |
Apr 15 2022, 3:38 AM |
F35057735: image.png | |
Apr 19 2022, 7:24 AM |
Trying to translate Tech-News, memory translations from previous week do not display anymore as translation aid.
Note there is neither Apertium suggestion, but on other page, Apertium still works (whereas I have not found any page where TTM works).
Note that I do see Apertium suggestions for Spanish appearing: https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FNews%2F2022%2F16&action=page&filter=&language=es
TTM appears to not work anywhere. Possibly related to some refactoring work being done. I'll try to reproduce this locally.
Change 783822 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/extensions/Translate@master] TTMServerAid::getData: Do not swallow TranslationHelperException
I downgraded to the same Elasticsearch version (6.5.4) on Meta but was unable to reproduce this issue locally. Its not possible for me to simulate the exact configuration on Meta-Wiki.
We were also swallowing some exceptions so that may be hiding the issue. I've submitted a patch to avoid doing that.
Change 783822 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] TTMServerAid::getData: Do not swallow TranslationHelperException
Is it possible to backport this? If it’s backported today, maybe there’s enough information to find the real bug and let the fix ride the train this week.
Change 780641 had a related patch set uploaded (by KartikMistry; author: Abijeet Patro):
[mediawiki/extensions/Translate@wmf/1.39.0-wmf.7] TTMServerAid::getData: Do not swallow TranslationHelperException
@Nikerabbit has production access and was able to run some code to identify the issue:
nikerabbit@mwmaint1002:~$ mwscript eval.php --wiki=metawiki > $s = TTMServer::primary(); > TTMServer::primary()->query( 'en', 'fi', 'hello' ); Caught exception MediaWiki\Extension\Translate\TranslatorInterface\TranslationHelperException: Elastica exception: Elastica\Exception\ResponseException: Fielddata access on the _id field is disallowed [reason: all shards failed] in /srv/mediawiki/php-1.39.0-wmf.7/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php:182 Stack trace:
This issue should be fixed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Translate/+/780878 which is already included in the wmf/1.39.0-wmf.8 and should ride the train.
Change 783907 had a related patch set uploaded (by Abijeet Patro; author: DCausse):
[mediawiki/extensions/Translate@wmf/1.39.0-wmf.7] ElasticSearchTTMServer: tie break on wiki+localid
Change 780641 merged by Urbanecm:
[mediawiki/extensions/Translate@wmf/1.39.0-wmf.7] TTMServerAid::getData: Do not swallow TranslationHelperException
Change 783907 merged by Urbanecm:
[mediawiki/extensions/Translate@wmf/1.39.0-wmf.7] ElasticSearchTTMServer: tie break on wiki+localid
Mentioned in SAL (#wikimedia-operations) [2022-04-19T07:11:55Z] <urbanecm@deploy1002> Synchronized php-1.39.0-wmf.7/extensions/Translate/ttmserver/ElasticSearchTTMServer.php: e9668719a6eb928b28ef67ba6d97348068012d04: ElasticSearchTTMServer: tie break on wiki+localid (T305428, T306233) (duration: 00m 51s)
Mentioned in SAL (#wikimedia-operations) [2022-04-19T07:12:46Z] <urbanecm@deploy1002> Synchronized php-1.39.0-wmf.7/extensions/Translate/src/TranslatorInterface/Aid/TTMServerAid.php: 36c6682: TTMServerAid::getData: Do not swallow TranslationHelperException (T306233) (duration: 00m 51s)
We've back-ported the patches. Translation memory suggestions are now appearing:
Tested on Meta-Wiki and MediaWiki.
Thanks @Urbanecm and @KartikMistry for helping with the back-port