You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/02/21 00:08:42 UTC

[GitHub] rabbah opened a new issue #4300: feed lifecycle event should have a fully resolved trigger name

rabbah opened a new issue #4300: feed lifecycle event should have a fully resolved trigger name
URL: https://github.com/apache/incubator-openwhisk/issues/4300
 
 
   In looking through some code for the providers, I noticed that when a user creates an event feed, the request carries a trigger name that is not fully resolved.
   
   For example, when creating an alarm feed,
      wsk trigger create t --feed whisk.system/alarms/once ...
   
   The feed provider receives the following request:
   {
     "authKey":"...",
     "lifecycleEvent":"CREATE",
      "triggerName":"/_/t"
   }
   
   The trigger name isn't fully resolved as it uses the implicit/placeholder `_`. This means the feed handler has to resolve the namespace. It can do this by doing a lookup using the provided key against the openwhisk controller:
   
      GET https://apikey@openwhisk.ng.bluemix.net/api/v1/namespaces
   
   In the providers I looked at, the namespace is being resolved another way: by using the `__OW_NAMESPACE` activation context value. This is OK as well but if we just treat the feed creation as an arbitrary API call, this won't work. So either the client has to resolve the trigger name fully, or the provider has to do it (or both?).
   
   I am contemplating a change to the feed specification to make the trigger name fully qualified (ie no underscore) and so clients must do this and providers can reject requests that don't conform.
   
   Current specification https://github.com/apache/incubator-openwhisk/blob/master/docs/feeds.md#implementing-feed-actions
   
   Related to https://github.com/apache/incubator-openwhisk-cli/issues/416

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


With regards,
Apache Git Services