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

Enhance gRPC errors #1608

Merged
merged 4 commits into from
May 16, 2018
Merged

Conversation

matiasinsaurralde
Copy link
Contributor

@matiasinsaurralde matiasinsaurralde commented Apr 22, 2018

Enhancement for #991
The dialer already does an URL check (parsing) but this is a simpler thing to check during init

main.go Outdated
@@ -190,7 +190,11 @@ func setupGlobals() {
}

if config.Global.CoProcessOptions.EnableCoProcess {
CoProcessInit()
if err := CoProcessInit(); err != nil {
log.WithFields(logrus.Fields{
Copy link
Member

@asoorm asoorm Apr 23, 2018

Choose a reason for hiding this comment

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

Can just use log.WithField("prefix", "coprocess").Error(err)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@matiasinsaurralde
Copy link
Contributor Author

This is a very small change, to test this, set this into your tyk.conf and use the standard Tyk build (the one we get from go build -tags 'coprocess grpc':

     "coprocess_options": {
        "enable_coprocess": true,
        "coprocess_grpc_server": ""
    },

Without the patch you should see the recurring dialer errors.

@matiasinsaurralde
Copy link
Contributor Author

Just fixed conflicts on this PR

@buger buger merged commit b55b0a5 into TykTechnologies:master May 16, 2018
buger pushed a commit that referenced this pull request May 30, 2018
* main: display CP init errors

* coprocess: check for empty gRPC URLs before calling the dialer

* coprocess: fix dummy driver

* coprocess: fix config access
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.

3 participants