Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate request id for each provider request. #387

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JadeRedworth
Copy link
Contributor

@JadeRedworth JadeRedworth commented Aug 17, 2018

Set the request-id on the context to be used for each provider request.

@JadeRedworth JadeRedworth changed the title Generate request id for each oracle provider request. Generate request id for each provider request. Aug 17, 2018
@@ -12,11 +12,12 @@ import (

"github.com/fnproject/cli/client"
"github.com/fnproject/cli/common"
fnclient "github.com/fnproject/fn_go/client"
fnclient "github.com/fnproject/fn_go/client"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some trailing whitespace here.

@@ -17,6 +20,16 @@ import (
"github.com/urfave/cli"
)

func getRequestID() string {
Copy link
Member

@msgodf msgodf Aug 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the format of these IDs? It might be worth giving an example in a comment above the function.

@tcoupland
Copy link
Contributor

Is this not already happening in the fn_go layer due to this:

fnproject/fn_go@11f1fff

@JadeRedworth
Copy link
Contributor Author

@mantree It is, but now we've added the request ID to the context from the CLI for all requests which allows the user to see the request-id.

@zootalures
Copy link
Member

@msgodf this is the end client ID so can be an opaque string I think this is the normal way of generating

@mantree as jade says request ID should pass to API from context, sorry didn’t think when I reviewed originally

@tcoupland
Copy link
Contributor

Ah ok, I was only thinking to make it visible when DEBUG=1.

…vider

requests.

remove func folder

Bump fn_go to 0.2.12.

Squashed commit of the following:

commit d4b4fa7
Author: JadeRedworth <[email protected]>
Date:   Fri Aug 17 16:45:22 2018 +0100

    move generation of request id to common.go

commit 70f44cc
Author: JadeRedworth <[email protected]>
Date:   Fri Aug 17 14:32:55 2018 +0100

    remove func folder

commit 735b2eb
Author: JadeRedworth <[email protected]>
Date:   Fri Aug 17 11:40:23 2018 +0100

    Create request-id to be set as a header on the request for oracle provider
    requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants