dubee commented on a change in pull request #479: Trigger parameter issue
URL: https://github.com/apache/openwhisk-cli/pull/479#discussion_r378528233
 
 

 ##########
 File path: commands/trigger.go
 ##########
 @@ -548,17 +623,30 @@ func (t *Trigger) Update(Client *whisk.Client, args 
[]string) error {
 
        if err != nil && httpResp.StatusCode == 404 {
                t.Create(Client, args)
+               return nil
        } else if err != nil {
                whisk.Debug(whisk.DbgError, "Client.Triggers.Get(%s) failed: 
%s\n", qualifiedName.GetEntityName(), err)
                errStr := wski18n.T("Unable to get trigger '{{.name}}': 
{{.err}}",
                        map[string]interface{}{"name": 
qualifiedName.GetEntityName(), "err": err})
                werr := whisk.MakeWskErrorFromWskError(errors.New(errStr), err, 
whisk.EXIT_CODE_ERR_GENERAL, whisk.DISPLAY_MSG, whisk.NO_DISPLAY_USAGE)
                return werr
-       } else {
+       }
 
-               // Get full feed name from trigger get request as it is needed 
to get the feed
-               if retTrigger != nil && retTrigger.Annotations != nil {
-                       fullFeedName = getValueString(retTrigger.Annotations, 
"feed")
+       // Get full feed name from trigger get request as it is needed to get 
the feed
 
 Review comment:
   This this update method has 200 lines of code making it extremely hard to 
understand quickly.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to