Gracefully handle transfer failures
Closed, ResolvedPublic

Description

Motivation:
In theory, all moves work the way they should. However, sometimes something might happen during the move, so that it cannot be completed successfully. Our extension should behave gracefully when that happens, and not leave broken files behind.

Task:

  • If something fails during the transfer of all file information, undo the whole move.
  • The only step excluded from that is the template mapping. Do not undo a move, if no template could be mapped, but instead show a (momentary) message on the new Commons file page that the template could not be mapped
  • if the move was undone, show the user an error message on the original file page. Text: "The file could not be moved because <error details>"

Background:
This is part of fulfilling on wish of the German-community speaking wishlist of 2013. For details see the parent task

Change 363179 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] WIP rolling back failed imports

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

Addshore claimed this task.
Addshore added a project: User-Addshore.
Addshore moved this task from Backlog to In Progress on the User-Addshore board.

https://gerrit.wikimedia.org/r/363179 now introduced the structure to be able to rollback each operation that is part of an import, although the rollback functions are not yet implemented.

Change 363321 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] WIP rollback changes on failure

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

Change 363599 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Make sure a page is created as part of first operation

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

Change 363321 abandoned by Addshore:
Rollback changes on failure

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

Change 363179 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Add ImportOperations

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

Change 363599 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Make sure a page is created as part of first operation

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

Addshore moved this task from Done to Demoed on the WMDE-QWERTY-Team-Board board.Jul 11 2017, 3:10 PM
Addshore closed this task as Resolved.Jul 12 2017, 9:57 AM