You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@submarine.apache.org by GitBox <gi...@apache.org> on 2021/05/08 01:41:55 UTC

[GitHub] [submarine] xunliu commented on a change in pull request #580: SUBMARINE-816. Implement Submarine delete event handler

xunliu commented on a change in pull request #580:
URL: https://github.com/apache/submarine/pull/580#discussion_r628661658



##########
File path: submarine-cloud-v2/controller.go
##########
@@ -1035,59 +1049,80 @@ func (c *Controller) syncHandler(key string) error {
 		return nil
 	}
 
-	// Get the Submarine resource with this namespace/name
-	submarine, err := c.submarinesLister.Submarines(namespace).Get(name)
-	if err != nil {
-		// The Submarine resource may no longer exist, in which case we stop
-		// processing
-		if errors.IsNotFound(err) {
-			utilruntime.HandleError(fmt.Errorf("submarine '%s' in work queue no longer exists", key))
-			return nil
+	klog.Info("syncHandler: ", key, " / ", action)
+
+	if action != "DELETE" { // Case: ADD & UPDATE

Review comment:
       Use const variable to replace "DELETE" ?




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org