stable

Clone or download

Read-only

request #12516: Post changeset creation async tasks crash when the artifact is marked for deletion

To reproduce the issue you need to have a Tuleap instance using the backend workers. The issue happens when an artifact is deleted before the async event resulting of changeset creation is processed. One way to end up in this situation on a instance with not a lot of load is to shutdown the backend workers, updtae an artifact and then to delete it. This contribution introduces some changes to PostCreation\AsynchronousActionsRunner to be able to write unit tests demonstrating the issue. The approach is not great, Tuleap should propose an API to route the events instead of delegating this work to each plugin where the work is duplicated and only the necessary classes are instanciated. This refactoring should be tackled in a dedicated to keep the scope of this patch dedicated to the bug fix only. Change-Id: Ia798bf7015a9a434c7c76116d4ab98122ec673a7

Modified Files

Name
M plugins/tracker/include/Tracker/Artifact/Changeset/PostCreation/AsynchronousActionsRunner.php +51 −7 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_ArtifactFactory.class.php +1 −1 Go to diff View file
M plugins/tracker/include/trackerPlugin.class.php +1 −3 Go to diff View file
A plugins/tracker/phpunit/Tracker/Artifact/Changeset/PostCreation/AsynchronousActionsRunnerTest.php +113 −0 Go to diff View file