Skip to content

Swap options - #42

Open
smousa wants to merge 3 commits into
bojand:masterfrom
smousa:swap-options
Open

smousa wants to merge 3 commits into
bojand:masterfrom
smousa:swap-options

Conversation

@smousa

@smousa smousa commented Jul 11, 2019

Copy link
Copy Markdown

Fixed some small issues related to passing in a grpc proto as opposed to reading it in from a file.

@bojand

bojand commented Jul 12, 2019

Copy link
Copy Markdown
Owner

Hello, thank you for the PR. Can you elaborate the issue this addresses? I agree with the change of order of assignments, but why are we removing the options param from the underlying client instructor invocation? Also I don't think the tests need any adjustments?

@smousa

smousa commented Jul 12, 2019

Copy link
Copy Markdown
Author

It looked like the retry code doesn't actually get used until it gets into client.js

I was running into an issue where my proto client was calling new grpc.Channel() and didn't know what to do with the retry arguments, because it was expecting something completely different.

I had changed the test, because the "defaults" field (which is the last argument) should contain both the metadata and the options, like,

{
    metadata: { foo: 'bar'},
    options: {
        interceptors: [ myverycoolinterceptor ]
    }
}

But in this test you were storing the interceptor config in the retry options field, which was failing, if you look at the previous commit. I am not sure why your tests didn't fail before, nor did I investigate that too deeply, but yeah.

I have independently verified this code works against the stuff I am working on, but I am using the alternate implementation where I am passing in the proto client, so maybe my proto client is different????

I hope this helps. Please let me know if you have any other questions.

This branch has not been deployed

No deployments
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.

2 participants