steven0711dong commented on a change in pull request #479: Trigger parameter
issue
URL: https://github.com/apache/openwhisk-cli/pull/479#discussion_r371968929
##########
File path: commands/trigger.go
##########
@@ -594,10 +579,42 @@ func (t *Trigger) Update(Client *whisk.Client, args
[]string) error {
}
}
+ //if there is no feed attached to this trigger
+ if len(fullFeedName) < 1 {
+ //but user indicate feed parameter change, we issue
error message.
+ if len(Flags.trigger.feedParam) > 0 {
+ whisk.Debug(whisk.DbgError, "trigger %+v is
found but it does not contain a feed. \n", trigger)
+ errStr :=
wski18n.T("triggerDoesNotContainFeed", map[string]interface{}{"name":
qualifiedName.GetEntityName()})
Review comment:
`triggerDoesNotContainFeed` represents a very specific message that tells
users they've run into a specific situation that will results to error. This
happens when they tries to update feed params when the trigger contains no
feed. I cannot find any constant in messages.go file that represents this.
There is only one constant that's relevant, which is
`FEED_CONFIGURATION_FAILURE`, but this is too broad and general error message.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services