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

Swap options #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Swap options #42

wants to merge 3 commits into from

Conversation

smousa
Copy link

@smousa smousa commented Jul 11, 2019

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

@bojand
Copy link
Owner

bojand commented Jul 12, 2019

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
Copy link
Author

smousa commented Jul 12, 2019

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.

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