ruffle1986 commented on issue #1307: METRON-1944: Unable to Delete a Comment in 
Alerts UI
URL: https://github.com/apache/metron/pull/1307#issuecomment-462282323
 
 
   @sardell Thanks for the report! Nice catch! 
   
   Yes, it was there before probably. In order the enable comment deletion, I 
had to slightly modify the existing code. However the issue you're struggling 
with is critical, I respectfully think it's out of the scope of this PR. 
   
   When it comes to removing comments (and adding as well!!), the app deals 
with HTTP requests which are not organized properly. When you successfully 
removed or added new comments, the server responses with the fresh new lest of 
the comments attached to the given alert. But if you're fast, adding/removing a 
bunch of comments then immediately closing and opening the comments pane again 
could cause issues. The problem is that the API endpoints for the 
deletion/addition returns with a list of comments and when you open the pane, 
it also returns the list of comments and the two are not necessarily the same 
at a certain point of time. They're not synced yet.
   
   Long story short, the current design and the implementation is not prepared 
for this kind of user quickness, the solution for this is not trivial and needs 
to have a further discussion for sure how to deal with it.
   
   If you don't think otherwise, I would open a Jira ticket about the 
aforementioned syncing issue and ship the patch in a different PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to