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 kubelet logs --follow bug #13864

Merged
merged 1 commit into from Sep 17, 2015
Merged

Conversation

feiskyer
Copy link
Member

Fix kubelet logs --follow bug #13811

@k8s-bot
Copy link

k8s-bot commented Sep 11, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 13, 2015
@k8s-github-robot
Copy link
Contributor

Labelling this PR as size/S

@yujuhong yujuhong assigned lavalamp and unassigned yujuhong Sep 14, 2015
@yujuhong
Copy link
Member

Redirected to @lavalamp to find a reviewer.

@@ -258,7 +258,13 @@ func write(statusCode int, apiVersion string, codec runtime.Codec, object runtim
w.WriteHeader(statusCode)
writer := w.(io.Writer)
if flush {
writer = flushwriter.Wrap(w)
if _, ok := w.(*hijackTimeoutWriter); ok {
Copy link
Member

Choose a reason for hiding this comment

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

This is a perfect use case for a type switch:

switch innerWriter := w.(type) {
case hijackTimeoutWriter:
  writer = flushwriter.Wrap(innerWriter.w)
...
}

Copy link
Member

Choose a reason for hiding this comment

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

But more importantly, what goes wrong with these writers that you need to dig inside? Presumably they're wrapped for a reason.

Copy link
Member Author

Choose a reason for hiding this comment

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

@avalamp Thanks for advise, I have submitted new code. It could avoid type conversions.

@feiskyer
Copy link
Member Author

@lavalamp Please review new commits.

@lavalamp
Copy link
Member

@feiskyer thanks, this looks much better!

LGTM

@lavalamp lavalamp added lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-merge labels Sep 15, 2015
@k8s-github-robot
Copy link
Contributor

@k8s-bot ok to test

pr builder appears to be missing, activating due to 'lgtm' label.

@k8s-bot
Copy link

k8s-bot commented Sep 15, 2015

GCE e2e build/test failed for commit e4d9f247500255b2112e44c3ace1b06f1b958bda.

@k8s-github-robot
Copy link
Contributor

LGTM was before last commit, removing LGTM

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 16, 2015
@feiskyer
Copy link
Member Author

Rebased to trigger e2e test since there is Error fetching remote repo 'origin'.

@k8s-bot
Copy link

k8s-bot commented Sep 16, 2015

GCE e2e build/test failed for commit 608a16a10adfadaa7cadf09c30f41ea18ff0b58f.

@k8s-bot
Copy link

k8s-bot commented Sep 16, 2015

GCE e2e build/test failed for commit 6936406d3a9f5f681c085671a77058a530d391af.

@k8s-bot
Copy link

k8s-bot commented Sep 16, 2015

GCE e2e build/test failed for commit 4a149e276ab15f6cb266bff94ef792bb7200dc1e.

@k8s-bot
Copy link

k8s-bot commented Sep 16, 2015

GCE e2e build/test passed for commit 800e8fb.

@lavalamp lavalamp added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 16, 2015
@lavalamp
Copy link
Member

Sorry about the testing. You hit what appear to be three different flakes.

@feiskyer
Copy link
Member Author

@lavalamp I see e2e testing is down at kubernetes-dev. Fortunately this PR has passed e2e testing.

@k8s-github-robot
Copy link
Contributor

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Sep 17, 2015

GCE e2e build/test passed for commit 800e8fb.

@k8s-github-robot
Copy link
Contributor

Automatic merge from SubmitQueue

k8s-github-robot added a commit that referenced this pull request Sep 17, 2015
@k8s-github-robot k8s-github-robot merged commit 2da93a4 into kubernetes:master Sep 17, 2015
@feiskyer feiskyer deleted the logs-follow branch April 26, 2016 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants