matthiasmullie added a comment.

I've given the error handling some more thought and am not convinced we need to (attempt to) roll back the upload, should submitting captions fail.
Here's what could go wrong submitting captions:

  • invalid user input: we should validate this before submitting, so this shouldn't be cause for errors
  • upload processing taking too long (assembly & addition of page_prop is deferred...) and we fail to retrieve mediainfo entity id: this is kind of expected to fail immediately after upload so this is attempted 10 times, with increasing intervals (1s, 2s, 3s, ...) but it'll cause failure eventually (after 9 retries, or 45 seconds)
  • fail to submit to wikibase (e.g. it's down): this is not expected to fail, so it'll only be attempted 3 times (with 1s & 2s intervals), mainly to deal with dropped API calls on a flaky connection
  • continued network connectivity issues after the upload did get through already

#4 would make reverting impossible anyway
#2 & #3 would usually be issues on WMF's end - not sure we'd want to throw away users' uploads because our tools broke
#1 if this happens, we should tighten our pre-submit validation...

I suggest that, instead of attempting to roll back & after having automatically retried the calls a few times, we just display an informative error message that explains what happened (file was uploaded, captions weren't), why (the exact error message) and suggest they go to the file page & add the caption there.

Something along these lines:
F15408086: Screenshot 2018-03-14 15.27.42.png

What do you think?
Also, suggestions for the wording are welcome :)


TASK DETAIL
https://phabricator.wikimedia.org/T188502

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: matthiasmullie
Cc: Base, Cparle, Ramsey-WMF, PDrouin-WMF, gerritbot, matthiasmullie, Aklapper, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, E1presidente, Darkminds3113, Sksvdbvd, SandraF_WMF, Youssefalli1, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Tramullas, Acer, V4switch, LawExplorer, Lewizho99, Maathavan, Susannaanas, Wong128hk, Aschroet, Jane023, Wikidata-bugs, PKM, aude, Bawolff, Ricordisamoa, Lydia_Pintscher, Fabrice_Florin, Raymond, Steinsplitter, Matanya, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to