stable
Clone or download
part of story #21368 create mirrored iteration How to test: Run `tuleap config-set feature_flag_program_management_display_iteration 1` to enable iterations Make sure your redis worker is running 1. Assuming you have already run tests for this story, you should have rows in the plugin_program_management_pending_iterations table. If not, see section 2 below. Trigger manually a redis message with the following steps: - Enter a bash shell on the redis container: $ docker exec -it tuleap_redis_1 bash - Enter the redis cli in interactive mode: # redis-cli - Push a message to the events list > LPUSH 'app_user_events' '{"event_name":"tuleap.program_management.iteration.creation","payload":{"artifact_id":6260,"user_id":110},"_enqueue_ts":1628157233.0802,"_queued_total":0}' Here, "artifact_id" must be the id of an Iteration 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. - You should see a log message in /var/log/tuleap/program_management_syslog : [debug] Processing iteration creation with iteration #6260 for user #110 2. If you have no pre-existing rows in the database table, follow these steps: - Edit a Program Increment artifact and add one or more artifact links with _is_child type to Iteration artifacts. For each iteration, Tuleap will write a new row in the database table and push a message to redis (like above). 3. If you delete an Iteration or 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). Notes: UserIdentifier, ChangesetIdentifier and IterationIdentifier are built from ids with no verifications. Since this whole feature is behind a feature flag, we consider it ok to add the verifications in another patch. [0] https://microtime.onlinephpfunctions.com/ Change-Id: Ibfefdae47cbcd9b1059f2375198cc7b4cf1ba287
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/IterationCreationsRunner.php | +14 | −21 | Go to diff View file |
M | plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/PendingIterationCreationDAO.php | +41 | −4 | Go to diff View file |
M | plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/ChangesetIdentifier.php | +5 | −0 | Go to diff View file |
R | plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/NewPendingIterationCreation.php | Go to diff View file | ||
A | plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/IterationCreationEventHandler.php | +73 | −0 | Go to diff View file |
M | plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/IterationReplicationScheduler.php | +1 | −1 | Go to diff View file |
A | plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/ProcessIterationCreation.php | +28 | −0 | Go to diff View file |
M | plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/RunIterationsCreation.php | +1 | −1 | Go to diff View file |
A | plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/SearchPendingIteration.php | +31 | −0 | Go to diff View file |
M | plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/StorePendingIterations.php | +1 | −1 | Go to diff View file |
M | plugins/program_management/include/Domain/Program/Backlog/Iteration/IterationIdentifier.php | +5 | −0 | Go to diff View file |
M | plugins/program_management/include/Domain/Workspace/UserIdentifier.php | +6 | −1 | Go to diff View file |
M | plugins/program_management/include/program_managementPlugin.php | +28 | −8 | Go to diff View file |
M | plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/IterationCreationsRunnerTest.php | +16 | −38 | Go to diff View file |
M | plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/LastChangesetRetrieverTest.php | +1 | −18 | Go to diff View file |
M | plugins/program_management/tests/unit/Domain/Program/Backlog/ArtifactUpdatedHandlerTest.php | +3 | −3 | Go to diff View file |
M | plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/ChangesetIdentifierTest.php | +6 | −19 | Go to diff View file |
A | plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/IterationCreationEventHandlerTest.php | +108 | −0 | Go to diff View file |
R | plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/NewPendingIterationCreationTest.php | Go to diff View file | ||
M | plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/IterationReplicationSchedulerTest.php | +3 | −3 | Go to diff View file |
M | plugins/program_management/tests/unit/Domain/Program/Backlog/Iteration/IterationIdentifierTest.php | +12 | −8 | Go to diff View file |
A | plugins/program_management/tests/unit/Domain/Workspace/UserIdentifierTest.php | +65 | −0 | Go to diff View file |
A | plugins/program_management/tests/unit/Stub/SearchPendingIterationStub.php | +70 | −0 | Go to diff View file |