Page MenuHomePhabricator

Amend cx-notification-log table to include a wiki-id
Open, MediumPublic


The old unpublished ContentTranslation draft purge script keeps track of the timestamp of the newest draft it has sent a notification for.

However, this was written before we started running the script inside a loop for each wiki. The effect is that the timestamp gets more and more recent on each wiki where the script is run and where it find such drafts, and for the later wikis the notification period gets shorter and shorter, missing many drafts which should be notified. The reason for logging the timestamp is a protection feature to avoid sending multiple notifications when the script is running manually, or when the regular runs have overlapping notification periods.

Suggested fixes:

  • Amend cx-notification-log table to include a wiki-id.
  • Update script to use wiki-id.
  • Deploy DB change and test script on testwiki
  • Deploy DB in Wikishared and test script on other WPs.

Event Timeline

More specifically:

  • Add a database-patch to CX and update purge-drafts script to use it
  • Apply it on our own test wikis
  • Apply it on deployment prep
  • Apply it on production

Change 628843 had a related patch set uploaded (by KartikMistry; owner: KartikMistry):
[mediawiki/extensions/ContentTranslation@master] Amend cx-notification-log table to include a wiki-id