Page MenuHomePhabricator

Improve logging around saving/publishing of translations on CX
Closed, ResolvedPublic4 Estimated Story Points

Description

We've setup a new channel: ContentTranslation to Logstash.

In addition,

  • We should update our code to log all errors related to publishing or saving drafts to this channel
  • Update LPL team dashboard in Logstash to track errors from this channel.
  • Setup a process to review logs pro-actively rather than having users reporting errors. - Team process discussion - to be tracked separately.
  • Decide if we want to allow users to report errors by prefilling fields in Phabricator. - Will be tracked separately.
  • See if alerts can be setup. - Tracked separately T376535: Setup alert for LPL team Grafana dashboards

Event Timeline

Change #1142626 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] CX: Wrap publish logic around try...catch

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

Change #1142634 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Check if node has isFocusListenerAttached method before calling

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

abi_ changed the task status from Open to In Progress.May 6 2025, 4:56 PM

Change #1142626 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Wrap publish logic around try...catch

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

Change #1142634 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Check if node has isFocusListenerAttached method before calling

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

Change #1144525 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] CX Desktop Editor: Scroll to the infobar when displaying message

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

Change #1144525 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Desktop Editor: Scroll to the infobar when displaying message

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

Change #1146000 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Add Logstash logging on section/page publish API

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

Change #1146632 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Add try...catch around CX/SX save handler

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

Change #1146000 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Add Logstash logging on section/page publish API

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

Change #1146632 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Add try...catch around CX/SX save handler

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

I'm noticing a lot of occurrences of Error when publishing section {targetTitle}, {apiException} with the apiException as,

  • ⧼abusefilter-warning-character⧽
  • captcha issues
  • The text you wanted to publish was blocked by our filter. The following domain is blocked from being added: pravda.com.ua

etc

I think all of these issues shouldn't be logged.

Change #1159925 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Avoid logging ApiUsageException on section/page publish API

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

Change #1159925 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Avoid logging ApiUsageException on section/page publish API

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

I'm still noticing some logs about captcha validation failures. I don't think these are worth logging.

{
    "captcha": {
        "type": "image",
        "mime": "image\/png",
        "id": "1214963447161357499",
        "url": "\/w\/index.php?title=%E7%89%B9%E5%88%A5:%E7%94%BB%E5%83%8F%E8%AA%8D%E8%A8%BC\/image&wpCaptchaId=1214963447161357499"
    },
    "result": "Failure"
}

Change #1166837 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Avoid logging captcha related errors during publish

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

Change #1166837 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Avoid logging captcha related errors during publish

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

Change #1168156 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Fix: Avoid logging captcha related errors during SX publish

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

Change #1168156 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Fix: Avoid logging captcha related errors during SX publish

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

All patches deployed. I'll be doing the QA.

All patches deployed. I'll be doing the QA.

I'm not seeing any spurious errors in the channel.

Next step: Update the LPL Logstash dashboard to show logs from this channel.

All patches deployed. I'll be doing the QA.

I'm not seeing any spurious errors in the channel.

Next step: Update the LPL Logstash dashboard to show logs from this channel.

I've updated the LPL team dashboard to include logs from the ContentTranslation channel

abi_ changed the task status from In Progress to Open.Jul 21 2025, 1:11 PM
abi_ moved this task from In Progress to Done on the LPL Essential (2025 Jul-Oct) board.

Moving to Done column, but leaving it open for others to verify what's been done.