Page MenuHomePhabricator

Attempt to send original file to PhotoDNA for the scan if thumbnail fails
Closed, ResolvedPublic3 Estimated Story Points

Description

The process of generating a thumbnail to be sent to PhotoDNA is complicated and may fail. It also does not currently work for files which have been deleted (ArchivedFile objects). If a thumbnail cannot be generated, then the source file could be sent to PhotoDNA for scanning if it is in a supported format.

The list of supported formats is relatively large, such that most image files could be sent directly to PhotoDNA. However, just sending the source file may cause problems if the original file is very large.

This also allows reducing the number of images affected by T353853, as images that are at least 160px by 160px but no more than 320px wide will now be scannable.

Event Timeline

Dreamy_Jazz renamed this task from Attempt to send original file to PhotoDNA for the scan over a thumbnail to Attempt to send original file to PhotoDNA for the scan if thumbnail fails.Dec 21 2023, 1:08 AM

Change 987410 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@master] [WIP] Attempt to send original file to PhotoDNA if no thumbnail

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

Change 987410 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@master] Attempt to send original file to PhotoDNA if no thumbnail

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

Change 987485 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@wmf/1.42.0-wmf.12] Attempt to send original file to PhotoDNA if no thumbnail

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

Change 987726 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@wmf/1.42.0-wmf.10] Attempt to send original file to PhotoDNA if no thumbnail

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

Change 987485 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@wmf/1.42.0-wmf.12] Attempt to send original file to PhotoDNA if no thumbnail

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

Mentioned in SAL (#wikimedia-operations) [2024-01-04T14:16:27Z] <tchanders@deploy2002> Started scap: Backport for [[gerrit:987485|Attempt to send original file to PhotoDNA if no thumbnail (T353854)]]

Mentioned in SAL (#wikimedia-operations) [2024-01-04T14:20:04Z] <tchanders@deploy2002> dreamyjazz and tchanders: Backport for [[gerrit:987485|Attempt to send original file to PhotoDNA if no thumbnail (T353854)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-01-04T14:25:51Z] <tchanders@deploy2002> Finished scap: Backport for [[gerrit:987485|Attempt to send original file to PhotoDNA if no thumbnail (T353854)]] (duration: 09m 24s)

Change 987726 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@wmf/1.42.0-wmf.10] Attempt to send original file to PhotoDNA if no thumbnail

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

Mentioned in SAL (#wikimedia-operations) [2024-01-04T14:30:49Z] <tchanders@deploy2002> Started scap: Backport for [[gerrit:987726|Attempt to send original file to PhotoDNA if no thumbnail (T353854)]]

Mentioned in SAL (#wikimedia-operations) [2024-01-04T14:34:27Z] <tchanders@deploy2002> tchanders and dreamyjazz: Backport for [[gerrit:987726|Attempt to send original file to PhotoDNA if no thumbnail (T353854)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-01-04T14:40:14Z] <tchanders@deploy2002> Finished scap: Backport for [[gerrit:987726|Attempt to send original file to PhotoDNA if no thumbnail (T353854)]] (duration: 09m 25s)

This task will be difficult to QA without using a production instance as it modified the code that is only used when using the PhotoDNA API key. As such I propose that QA is skipped, but will leave this up to the QA engineers to make a decision either way. If QA is desired, I can see if I can find a way to allow QA.

Djackson-ctr subscribed.

I concur with Dreamy_Jazz's comment regarding QA so therefore I'm pushing this ticket to Done.