Skip to content

Update WatcherDelegatingHandler to stop eating first line (#183) #190

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

Merged

Conversation

hossambarakat
Copy link
Contributor

No description provided.

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please email the CNCF helpdesk: [email protected]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 3, 2018
@hossambarakat hossambarakat force-pushed the fix-eating-first-line branch from e9ea7a9 to ba12b6a Compare July 3, 2018 13:46
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 3, 2018
@@ -64,6 +66,37 @@ protected override bool TryComputeLength(out long length)
length = 0;
return false;
}
}
internal class PeekableStreamReader : StreamReader
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm worried that if someone calls any of the other ReadBlock, Read etc methods this is going to break...

At the very least let's override those messages and have them throw an exception so that we detect that it's happening...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense to me. I have updated the pull request to override all the remaining Read methods to throw NotImplementedException

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@brendanburns The build is failing but I have no clue why and I don't have permission to re-trigger the build. Would you please point me to what should I check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I managed to re-trigger the build and all pass now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@brendanburns, Was wondering if you have time to review the updated request

@brendandburns
Copy link
Contributor

Thanks for the PR!

Generally looks good, but one concern.

…haviour (kubernetes-client#183)

Override Read methods in PeekableStreamReader to avoid unpredicted behaviour (kubernetes-client#183)
@hossambarakat hossambarakat force-pushed the fix-eating-first-line branch from 6d504a0 to 880080a Compare July 4, 2018 03:16
@brendandburns
Copy link
Contributor

LGTM, thanks!

@brendandburns brendandburns merged commit 8c3152a into kubernetes-client:master Jul 9, 2018
JonJam pushed a commit to JonJam/csharp that referenced this pull request Sep 8, 2018
…-client#183) (kubernetes-client#190)

* Update WatcherDelegatingHandler to stop eating first line (kubernetes-client#183)

* Override Read methods in PeekableStreamReader to avoid unpredicted behaviour (kubernetes-client#183)

Override Read methods in PeekableStreamReader to avoid unpredicted behaviour (kubernetes-client#183)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants