openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 蒋鹏程<jiang.pengch...@navercorp.com>
Subject Re: key 'kind' does not exist
Date Tue, 10 Sep 2019 06:41:23 GMT
ok, I created a PR[1] which use "unknown" as the fallback "kind"
​
Best regards
Jiang PengCheng
[1] https://github.com/apache/openwhisk/pull/4617

-----Original Message-----
From: "Chetan Mehrotra"<chetan.mehrotra@gmail.com>
To: <dev@openwhisk.apache.org>;
Cc:
Sent: 2019-09-09 (星期一) 19:48:08 (GMT+08:00)
Subject: Re: key 'kind' does not exist
 
Makes sense to send event in such error case.

Ideally kind could have been an option but changing it now would be a
schema change. So we can probably use some token value like "unknown".
This has a very slight chance of breaking any downstream code
processing user event if they try to map kind to current runtime.json
in use.

Another example is in our impl we used kind as one of the metric
attribute [1] which would result in defining a new metric for such
event. So such aspects would need to be fixed in downstream usage
(soon to be part of main repo #4584 !)

Chetan Mehrotra
[1] https://github.com/adobe-apiplatform/openwhisk-user-events/blob/master/src/main/scala/com/adobe/api/platform/runtime/metrics/PrometheusRecorder.scala#L64

On Sun, Sep 8, 2019 at 11:44 PM Dominic Kim <style9595@gmail.com> wrote:
>
> The `kind` comes from the `exec, it cannot be populated when an error
> happens while fetching action information.
> While this is an error case, I think it would be still worth to send
> `UserEvent` to notify the error happened.
> We may need a generic kind for error cases or multiple error kinds if we
> want to differentiate each error case.
>
> Best regards
> Dominic
>
> 2019년 9월 9일 (월) 오후 3:30, 蒋鹏程 <jiang.pengcheng@navercorp.com>님이
작성:
>
> > hello all:
> >
> >  I opened an issue for a tiny bug in invoker side:
> > https://github.com/apache/openwhisk/issues/4615
> >
> >  When get action from DB is failed or namespace is blacklisted while
> > invoking an activation, the `InvokerReactive` will generate a fallback
> > result for it,
> > in these cases, it's not possible to get the `kind` info, but UserEvent do
> > require the `kind` annotation:
> >
> >  /** Constructs an "Activation" event from a WhiskActivation */
> >  def from(a: WhiskActivation): Try[Activation] = {
> >    for {
> >      // There are no sensible defaults for these fields, so they are
> > required. They should always be there but there is
> >      // no static analysis to proof that so we're defensive here.
> >      fqn <- a.annotations.getAs[String](WhiskActivation.pathAnnotation)
> >      kind <- a.annotations.getAs[String](WhiskActivation.kindAnnotation)
> >    ......
> >
> > so all these kind of activations cannot be sent to UserEvents, I think we
> > can use an "unknown kind" or something else for these "fallback"
> > activations, how do you think?
> >
> > Thanks
> > Jiang
> >

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message