I haven’t looked at the relevant code recently in the invoker but I reckon all 
the context variables are available at init time. Sending deadline and 
activation id is ok. The deadline has to be sent twice since it will change 
from init to run. 

-r

> On Nov 5, 2019, at 12:44 AM, Seong Hyun Oh <[email protected]> wrote:
> 
> +1
> Yes, It is suitable for my use case.
> 
> I think these environment contexts can be moved to /init
> 
> auth environment
> - api_host (__OW_API_KEY)
> - api_key (__OW_API_HOST)
> 
> environment
> - namespace (__OW_NAMESPACE)
> - action_name (__OW_ACTION_NAME)
> 
> And some environments can not be moved to it.
> 
> not possible
> - (x) activaiton_id (__OW_ACTIVATION_ID)
> - (x) deadline (__OW_DEADLINE)
> 
> 
> 2019년 11월 5일 (화) 오후 2:24, Rodric Rabbah <[email protected]>님이 작성:
> 
>> The namespace is currently provided on /run as part of the environment
>> context. I think the entire context should be moved to /init. This would
>> also address your use case. Wdyt.
>> 
>> -r
>> 
>>> On Nov 5, 2019, at 12:04 AM, Seong Hyun Oh <[email protected]>
>> wrote:
>>> 
>>> Hi, whiskers.
>>> I want to discuss adding a new field `namespace` in the `/init` API [1]
>>> that initializes the action.
>>> 
>>> The action runtime does not know the namespace information when the
>> action
>>> is initialized.
>>> In some cases, this namespace information can be useful.
>>> 
>>> E.g,
>>> - Initializing a monitoring tool such as APM (Application Performance
>>> Management)
>>> - Custom docker actions that require a namespace for initialization
>>> 
>>> If the namespace is not provided at action init time, runtimes that need
>> a
>>> namespace should check the namespace every time when action is run.
>>> 
>>> I'd like to have your views on this proposal
>>> 
>>> {
>>> "value": {
>>>   "namespace": String, <- this `namespace` field will be added
>>>   "name" : String,
>>>   "main" : String,
>>>   "code" : String,
>>>   "binary": Boolean,
>>>   "env": Map[String, String]
>>> }
>>> }
>>> 
>>> Thanks
>>> Seonghyun
>>> 
>>> [1]
>>> 
>> https://github.com/apache/openwhisk/blob/master/docs/actions-new.md#initialization
>> 

Reply via email to