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

fix: add null request for bi_di stream call #1066

Merged
merged 3 commits into from
Dec 6, 2021
Merged

Conversation

summer-ji-eng
Copy link
Collaborator

@summer-ji-eng summer-ji-eng commented Dec 4, 2021

Fixes #425.

appendRows bi-di stream call in nodejs-bigquery-storage fail to pass in the options.

        let options = {}
        options.otherArgs = {};
        options.otherArgs.headers = {};
        options.otherArgs.headers['x-goog-request-params'] = writeStream
        const stream = await storageClient.appendRows(options);

Because bi-direction stream call treat options as request when [createAPICall ]https://github.com/googleapis/gax-nodejs/blob/be8175624624648a32d535c3f6495814c163eb18/src/createApiCall.ts#L73)

Fix: Similar to client stream, we could pass null as request before options.

return this.innerApiCalls.{{ method.name.toCamelCase() }}(null, options);

@summer-ji-eng summer-ji-eng requested a review from a team as a code owner December 4, 2021 02:22
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 4, 2021
Copy link
Contributor

@alexander-fenster alexander-fenster left a comment

Choose a reason for hiding this comment

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

Looks good to me! I suggest to merge it but not release until the new year though, since this fix has some potential of breaking the existing code.

@summer-ji-eng
Copy link
Collaborator Author

Looks good to me! I suggest to merge it but not release until the new year though, since this fix has some potential of breaking the existing code.

Thanks for suggestion. Will mark the new release with DO NOT MERGE tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bi-directional streaming calls with extra options
2 participants