Skip to content
This repository was archived by the owner on Jan 18, 2026. It is now read-only.

fix: add null request for bi_di stream call#1066

Merged
summer-ji-eng merged 3 commits intomainfrom
bi_di_stream_request
Dec 6, 2021
Merged

fix: add null request for bi_di stream call#1066
summer-ji-eng merged 3 commits intomainfrom
bi_di_stream_request

Conversation

@summer-ji-eng
Copy link
Contributor

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

Fixes googleapis/google-cloud-node-core#657.

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
Contributor 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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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