stable

Clone or download

Read-only

rebuild Program increment update from storage

part of story #22675 replicate program increment changes to mirrored program increments How to test: Make sure your redis worker is running 1. - Edit an existing Program Increment artifact. You can change anything. - a new row will be created in the `plugin_program_management_pending_program_increment_update` database table. It will have the program increment's artifact id, your user id and the changeset id. - You should see a log message in /var/log/tuleap/program_management_syslog : [debug] Processing program increment update with program increment #6107 for user #110 2. If you delete a Program Increment and then trigger a message from redis, then the corresponding database row will be deleted and nothing will be logged (it will not be processed). How to trigger manually a message from redis: - Enter the redis-cli in the redis container: $ docker exec -it tuleap_redis_1 sh -c redis-cli - Push a message to the events list > LPUSH 'app_user_events' '{"event_name":"tuleap.program_management.program_increment.update","payload":{"artifact_id":6107,"user_id":110},"_enqueue_ts":1630314422.2812,"_queued_total":0}' Here, "artifact_id" must be the id of a Program Increment with a matching row in the database table. "user_id" must be the id of your user and match the same row in the database table. "_enqueue_ts" represents the timestamp at which the message is pushed. You can get one here [0], make sure to select "$get_as_float" = true. [0] https://microtime.onlinephpfunctions.com/ Change-Id: Ib2ad536c9afda06b6710ee0d48e20d49369b783a

Modified Files

Name
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/PendingProgramIncrementUpdateDAO.php +43 −1 Go to diff View file
A plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/PendingProgramIncrementUpdateProxy.php +53 −0 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementUpdateRunner.php +3 −0 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/ProgramIncrement/ProgramIncrementsDAO.php +9 −0 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/DeletePendingProgramIncrementUpdates.php +28 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/IterationCreation.php +2 −2 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/PendingIterationCreation.php +1 −1 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/PendingProgramIncrementUpdate.php +35 −0 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/ProcessProgramIncrementUpdate.php +30 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/ProgramIncrementUpdateEventHandler.php +52 −26 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/SearchPendingProgramIncrementUpdates.php +28 −0 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/StoredChangesetNotFoundException.php +31 −0 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/StoredUserNotFoundException.php +31 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/ProgramIncrementUpdate.php +51 −1 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/ProgramIncrementTracker/ProgramIncrementTrackerIdentifier.php +9 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/ProgramIncrementTracker/RetrieveProgramIncrementTracker.php +3 −0 Go to diff View file
R plugins/program_management/include/Domain/Workspace/StoredUser.php Go to diff View file
M plugins/program_management/include/program_managementPlugin.php +13 −3 Go to diff View file
A plugins/program_management/tests/integration/Adapter/Program/Backlog/AsynchronousCreation/PendingProgramIncrementUpdateDAOTest.php +108 −0 Go to diff View file
A plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/PendingProgramIncrementUpdateProxyTest.php +42 −0 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementUpdateRunnerTest.php +9 −0 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/ProgramIncrementTracker/VisibleProgramIncrementTrackerRetrieverTest.php +2 −2 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/ProgramIncrementUpdateEventHandlerTest.php +60 −13 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/ProgramIncrementUpdateTest.php +90 −3 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrementTracker/ProgramIncrementTrackerIdentifierTest.php +16 −0 Go to diff View file
R plugins/program_management/tests/unit/Domain/Workspace/StoredUserTest.php Go to diff View file
M plugins/program_management/tests/unit/Stub/RetrieveProgramIncrementTrackerStub.php +13 −2 Go to diff View file
A plugins/program_management/tests/unit/Stub/SearchPendingProgramIncrementUpdatesStub.php +48 −0 Go to diff View file
M tests/integration/bin/setup.sh +2 −1 Go to diff View file