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

Don't call stream.end() on Watch ended by server #565

Merged
merged 2 commits into from
Mar 5, 2019

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Mar 5, 2019

This is part of #564

The changes in #564 to make formattedName() async changed a lot of the timing in the Watch code and uncovered an issue with the way we close streams. We should only call stream.end() if the SDK closes the stream. If the server closes the stream we don't call end() - if we do, we get an exception (that was previously swallowed).

This PR also introduces subclasses for Watch that provide the Target Proto and the Comaprator. This makes it possible to construct these after initialization time and to return a Promise.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 5, 2019
@codecov
Copy link

codecov bot commented Mar 5, 2019

Codecov Report

Merging #565 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #565      +/-   ##
==========================================
- Coverage   95.85%   95.77%   -0.08%     
==========================================
  Files          24       24              
  Lines        1931     1943      +12     
  Branches      168      168              
==========================================
+ Hits         1851     1861      +10     
- Misses         57       59       +2     
  Partials       23       23
Impacted Files Coverage Δ
dev/src/watch.ts 98.19% <100%> (-0.86%) ⬇️
dev/src/reference.ts 99.68% <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 4ceac71...7e1c3fa. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 5, 2019

Codecov Report

Merging #565 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #565      +/-   ##
==========================================
+ Coverage   95.85%   95.88%   +0.02%     
==========================================
  Files          24       24              
  Lines        1931     1943      +12     
  Branches      168      168              
==========================================
+ Hits         1851     1863      +12     
  Misses         57       57              
  Partials       23       23
Impacted Files Coverage Δ
dev/src/watch.ts 99.09% <100%> (+0.05%) ⬆️
dev/src/reference.ts 99.68% <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 c92e1cf...4ff3895. Read the comment docs.

@schmidt-sebastian
Copy link
Contributor Author

I'm gonna leave this unmerged for a bit to give @mikelehen a chance to comment.

Copy link
Contributor

@mikelehen mikelehen left a comment

Choose a reason for hiding this comment

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

LGTM

@schmidt-sebastian schmidt-sebastian merged commit 04eb91c into master Mar 5, 2019
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt-watchend branch March 11, 2019 03:08
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.

4 participants