stable

Clone or download

Read-only

fix: close request #29616 Move artifact must process synchronous deletion

Move an artifact from one tracker to another means: 1. export the artifact to XML 2. delete the artifact 3. import the artifact export at step 1 When the platform is configured to have async jobs, delete is automagically done async so we have: 1. (sync) export the artifact to XML 2. (async) delete the artifact 3. (sync) import the artifact export at step 1 When things go wrong, the async is still being processed while step 3 started, that means that random data can be deleted in the newly created artifact, like the global rank. As move must be done "in real time" for the end user, the proposed solution is to force delete to be in synchronous mode, even on async platforms so all steps are performed in the logical sequence. How to test ------------ * Have Redis configured so Tuleap can perform async jobs * Move an artifact from one tracker to another => Global rank of this artifact must not be lost. Change-Id: I39459ab855414e19495436fbb858d9b838a8c142

Modified Files

Name
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +5 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ArtifactsDeletion/ArtifactDeletorBuilder.php +13 −1 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ArtifactsDeletion/AsynchronousArtifactsDeletionActionsRunnerTest.php +26 −24 Go to diff View file
A src/common/Queue/ForceSynchronousMode.php +31 −0 Go to diff View file