Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

fix: send streamingConfig as a separate write before audioContent #176

Merged
merged 8 commits into from
Sep 21, 2018

Conversation

jkwlui
Copy link
Member

@jkwlui jkwlui commented Sep 18, 2018

Fixes #173.
Fixes #182.

I personally am not fan of modifying test methods generated by gapic, since the gapic tests should test the underlying (not helper-wrapped) methods.

So I tried to just require the underlying source via require('../src/v1'), the tests would pass if it's not run along with helpers.test.js (npx mocha test/gapic-{v1|v1beta1}.js). Somehow requiring helpers.js modifies the actual exports in the gapic generated libs - so when I run npm test it fails.

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@ghost ghost assigned jkwlui Sep 18, 2018
@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Sep 18, 2018
@jkwlui jkwlui added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Sep 18, 2018
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Sep 18, 2018
@jkwlui jkwlui added the cla: yes This human has signed the Contributor License Agreement. label Sep 18, 2018
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@googlebot googlebot removed the cla: no This human has *not* signed the Contributor License Agreement. label Sep 18, 2018
@ghost ghost assigned JustinBeckwith Sep 18, 2018
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Sep 18, 2018
streamingConfig: CONFIG,
});
setImmediate(done);
if (count === 0)

This comment was marked as spam.

@jkwlui jkwlui added the cla: yes This human has signed the Contributor License Agreement. label Sep 18, 2018
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@googlebot googlebot removed the cla: no This human has *not* signed the Contributor License Agreement. label Sep 18, 2018
@codecov
Copy link

codecov bot commented Sep 19, 2018

Codecov Report

Merging #176 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #176   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines          37     35    -2     
=====================================
- Hits           37     35    -2
Impacted Files Coverage Δ
src/helpers.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e84ccf...e22ae4f. Read the comment docs.

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Sep 19, 2018
@jkwlui jkwlui added the cla: yes This human has signed the Contributor License Agreement. label Sep 19, 2018
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@googlebot googlebot removed the cla: no This human has *not* signed the Contributor License Agreement. label Sep 19, 2018
src/helpers.js Outdated
payload.streamingConfig = config;
through.obj((audioContent, _, next) => {
if (audioContent !== undefined) {
next(null, {audioContent});

This comment was marked as spam.

@callmehiphop
Copy link
Contributor

This one threw me for a loop as well, from what I can tell helpers main goal is to allow streamingConfig to be passed in as an argument as opposed to being written to the stream. The non-helpers usage would look like the following

const stream = client.streamingRecognize();

stream.write({streamingConfig});
fs.createReadStream('my-file.wav').pipe(stream);

as opposed to

fs.createReadStream('my-file.wav')
  .pipe(client.streamingRecognize({config}));

@JustinBeckwith
Copy link
Contributor

@callmehiphop are you taking the PR over? That would be nice :)

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@ghost ghost assigned callmehiphop Sep 21, 2018
@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Sep 21, 2018
@callmehiphop
Copy link
Contributor

@JustinBeckwith sure thing, just rebased and pushed a commit. I think we're good to go (unless we want another contributor to take a peak at it first 😄)

@JustinBeckwith JustinBeckwith added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Sep 21, 2018
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

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.

None yet

5 participants