klesh opened a new pull request, #5609:
URL: https://github.com/apache/incubator-devlake/pull/5609

   ### Summary
   
   Due to #4864 had been introduced, there are a couple of side effects that 
must be taken care of:
   1. What if a scope gets deleted while related pipelines are still 
running(users may remove the scope from the project while there is a pipeline 
running, so it is possible for the user to delete it on the Connection page): 
some unwanted data would be produced and they are hard to be identified and 
removed
   2. What if a new pipeline gets created while deletion is in progress: this 
is unlikely to happen when the deletion is quick, but it might when the number 
of records is huge, especially after we support  Cascade Connection Deletion.
   
   This PR makes pipeline-execution and scope-deletion mutually exclusive to 
prevent the above things from happening.
   
   **NOTE: We should reconsider most of our operation and consider wrap them 
inside Transaction due to Deletion Support**
   
   
   ### Screenshots
   
   Deleting scope while any pipeline is running would return error:
   
![image](https://github.com/apache/incubator-devlake/assets/61080/6f3d3c4c-6ce6-4202-b0ff-5722b160a74a)
   The Config-UI need to adopt the new error response format to show message 
correctly: @mintsweet the `Data` is renamed to `data` 
   
![image](https://github.com/apache/incubator-devlake/assets/61080/3bc4e141-483c-4c29-ae85-ba2edba90482)
   
![Snipaste_2023-06-29_17-43-00](https://github.com/apache/incubator-devlake/assets/61080/dad4119c-aee0-4858-85a6-175970dbd02a)
   
   
   
   Triggering pipeline while any deletion is taking place would be blocked 
until deletion finished
   
![image](https://github.com/apache/incubator-devlake/assets/61080/ac3c954a-fc4c-4fbd-994b-912a528eb226)
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to