openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodric Rabbah <rod...@gmail.com>
Subject Re: Providing a namespace field when action is initialized
Date Tue, 05 Nov 2019 11:22:11 GMT
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 <seonghyunoh@gmail.com> 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 <rodric@gmail.com>님이 작성:
> 
>> 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 <seonghyunoh@gmail.com>
>> 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
>> 

Mime
View raw message