Page MenuHomePhabricator

Exclude binary contents from String representation of API upload errors
Closed, ResolvedPublicFeature

Description

Feature summary:

The new behaviour introduced in T333957 (release 8.1) should either be customized to exclude binary file contents on file upload errors, or enhanced to allow caller to exclude any particular parameter.

Use case(s):

video2commons suffers a lot from this change, because we are serializing upload errors in our Redis instance. Since this change, whole videos of hundreds of Mbs are being serialized and lead to a very unstable system. See T365154#9942516 for details.

Benefits:

It is needed to make video2commons stable again.

Event Timeline

Xqt triaged this task as High priority.Jul 4 2024, 7:07 AM
Xqt updated the task description. (Show Details)
Xqt changed the task status from Open to In Progress.Jul 4 2024, 10:16 AM
Xqt claimed this task.

Change #1052090 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Use unittest_print instead of log during APIError

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

@Don-vip: are you able to test my patch?

@Xqt I reviewed the code in gerrit and am OK with it. I'm pretty confident it will work :)

Change #1052090 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] Use unittest_print instead of log for APIError during tests

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