You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwhisk.apache.org by Tyson Norris <tn...@adobe.com.INVALID> on 2020/04/06 14:23:14 UTC

Transaction ID in js client

Hi –
One of our customers wants to reuse the transaction id when a js action uses the openwhisk js client to invoke another action.
This sounds reasonable to me, but I’m not sure if there is some argument to keep them as separate transaction ids?

There is a PR already here https://github.com/apache/openwhisk-client-js/pull/208 that I’m inclined to merge, but in case there is some reason to keep the transaction ids separate, will ask them to update the PR to make an it opt-in feature.

Thanks
Tyson


Re: Transaction ID in js client

Posted by Tyson Norris <tn...@adobe.com.INVALID>.
Yes, sequence gets same transaction id for all activations. If you had a sequence that uses the JS SDK to launch other activations, now they too would also get the same transaction id.
This all sounds more useful than not, so unless there are objections, I'll merge the PR as is on Monday.

Thanks
Tyson

On 4/9/20, 8:43 PM, "Alexander Klimetschek" <ak...@adobe.com.INVALID> wrote:

    IIRC the __OW_TRANSACTION_ID is currently set for sequence (each sequence = one transaction)? Could there by any negative consequences if this is overwritten?
    
    (just thinking out loud, I probably don't know all the details)
    
    Cheers,
    Alex
    ________________________________
    From: Tyson Norris <tn...@adobe.com.INVALID>
    Sent: Monday, April 6, 2020 07:39
    To: dev@openwhisk.apache.org <de...@openwhisk.apache.org>
    Subject: Re: Transaction ID in js client
    
    The current impl is that any request invoked via `this.client.request()` will get the x-request-id header set with the value from __OW_TRANSACTION_ID env var.
    
    On 4/6/20, 7:32 AM, "Rodric Rabbah" <ro...@gmail.com> wrote:
    
        I don't understand the PR - the amended headers are propagated to what HTTP
        request?
    
        -r
    
        On Mon, Apr 6, 2020 at 10:23 AM Tyson Norris <tn...@adobe.com.invalid>
        wrote:
    
        > Hi –
        > One of our customers wants to reuse the transaction id when a js action
        > uses the openwhisk js client to invoke another action.
        > This sounds reasonable to me, but I’m not sure if there is some argument
        > to keep them as separate transaction ids?
        >
        > There is a PR already here
        > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fopenwhisk-client-js%2Fpull%2F208&amp;data=02%7C01%7Ctnorris%40adobe.com%7C802f2d1f6d74493b5d5608d7dd014b36%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637220869982570099&amp;sdata=JK5hQB1Gy6OHmuH70wLQ5nDSmLy0Fz84qFo1z6SyM0g%3D&amp;reserved=0 that I’m inclined
        > to merge, but in case there is some reason to keep the transaction ids
        > separate, will ask them to update the PR to make an it opt-in feature.
        >
        > Thanks
        > Tyson
        >
        >
    
    
    


Re: Transaction ID in js client

Posted by Alexander Klimetschek <ak...@adobe.com.INVALID>.
IIRC the __OW_TRANSACTION_ID is currently set for sequence (each sequence = one transaction)? Could there by any negative consequences if this is overwritten?

(just thinking out loud, I probably don't know all the details)

Cheers,
Alex
________________________________
From: Tyson Norris <tn...@adobe.com.INVALID>
Sent: Monday, April 6, 2020 07:39
To: dev@openwhisk.apache.org <de...@openwhisk.apache.org>
Subject: Re: Transaction ID in js client

The current impl is that any request invoked via `this.client.request()` will get the x-request-id header set with the value from __OW_TRANSACTION_ID env var.

On 4/6/20, 7:32 AM, "Rodric Rabbah" <ro...@gmail.com> wrote:

    I don't understand the PR - the amended headers are propagated to what HTTP
    request?

    -r

    On Mon, Apr 6, 2020 at 10:23 AM Tyson Norris <tn...@adobe.com.invalid>
    wrote:

    > Hi –
    > One of our customers wants to reuse the transaction id when a js action
    > uses the openwhisk js client to invoke another action.
    > This sounds reasonable to me, but I’m not sure if there is some argument
    > to keep them as separate transaction ids?
    >
    > There is a PR already here
    > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fopenwhisk-client-js%2Fpull%2F208&amp;data=02%7C01%7Ctnorris%40adobe.com%7Ce1d523df2a0649256ff808d7da374a9e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637217803357043621&amp;sdata=5JLqVfX%2BPpcBTTuZtim%2FxZM25vDgYFqSvu7he5IzR9g%3D&amp;reserved=0 that I’m inclined
    > to merge, but in case there is some reason to keep the transaction ids
    > separate, will ask them to update the PR to make an it opt-in feature.
    >
    > Thanks
    > Tyson
    >
    >



Re: Transaction ID in js client

Posted by Tyson Norris <tn...@adobe.com.INVALID>.
The current impl is that any request invoked via `this.client.request()` will get the x-request-id header set with the value from __OW_TRANSACTION_ID env var.

On 4/6/20, 7:32 AM, "Rodric Rabbah" <ro...@gmail.com> wrote:

    I don't understand the PR - the amended headers are propagated to what HTTP
    request?
    
    -r
    
    On Mon, Apr 6, 2020 at 10:23 AM Tyson Norris <tn...@adobe.com.invalid>
    wrote:
    
    > Hi –
    > One of our customers wants to reuse the transaction id when a js action
    > uses the openwhisk js client to invoke another action.
    > This sounds reasonable to me, but I’m not sure if there is some argument
    > to keep them as separate transaction ids?
    >
    > There is a PR already here
    > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fopenwhisk-client-js%2Fpull%2F208&amp;data=02%7C01%7Ctnorris%40adobe.com%7Ce1d523df2a0649256ff808d7da374a9e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637217803357043621&amp;sdata=5JLqVfX%2BPpcBTTuZtim%2FxZM25vDgYFqSvu7he5IzR9g%3D&amp;reserved=0 that I’m inclined
    > to merge, but in case there is some reason to keep the transaction ids
    > separate, will ask them to update the PR to make an it opt-in feature.
    >
    > Thanks
    > Tyson
    >
    >
    


Re: Transaction ID in js client

Posted by Rodric Rabbah <ro...@gmail.com>.
I don't understand the PR - the amended headers are propagated to what HTTP
request?

-r

On Mon, Apr 6, 2020 at 10:23 AM Tyson Norris <tn...@adobe.com.invalid>
wrote:

> Hi –
> One of our customers wants to reuse the transaction id when a js action
> uses the openwhisk js client to invoke another action.
> This sounds reasonable to me, but I’m not sure if there is some argument
> to keep them as separate transaction ids?
>
> There is a PR already here
> https://github.com/apache/openwhisk-client-js/pull/208 that I’m inclined
> to merge, but in case there is some reason to keep the transaction ids
> separate, will ask them to update the PR to make an it opt-in feature.
>
> Thanks
> Tyson
>
>