Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

watch stream: don't unmarshal responses when streaming log #185

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

roycaihw
Copy link
Member

We were doing a best-effort unmarshalling for both pod log and regular watches, but we really shouldn't try unmarshalling pod logs into watch events. The existing code would unmarshal a pod log that happens to be a JSON blob and contains a field "object".

/hold
We need an e2e test for basic watch functionality in the main repo first.

/cc @Ark-kun @palnabarun

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 21, 2020
@k8s-ci-robot
Copy link
Contributor

@roycaihw: GitHub didn't allow me to request PR reviews from the following users: Ark-kun.

Note that only kubernetes-client members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

We were doing a best-effort unmarshalling for both pod log and regular watches, but we really shouldn't try unmarshalling pod logs into watch events. The existing code would unmarshal a pod log that happens to be a JSON blob and contains a field "object".

/hold
We need an e2e test for basic watch functionality in the main repo first.

/cc @Ark-kun @palnabarun

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.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roycaihw

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 21, 2020
@codecov-io
Copy link

Codecov Report

Merging #185 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #185      +/-   ##
==========================================
+ Coverage   92.46%   92.52%   +0.05%     
==========================================
  Files          13       13              
  Lines        1487     1485       -2     
==========================================
- Hits         1375     1374       -1     
+ Misses        112      111       -1
Impacted Files Coverage Δ
watch/watch.py 100% <100%> (+1.17%) ⬆️

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 7e7976b...ea11e44. Read the comment docs.

@roycaihw
Copy link
Member Author

adding a test in main repo: kubernetes-client/python#1087

@roycaihw
Copy link
Member Author

roycaihw commented Mar 3, 2020

kubernetes/e2e_test/test_watch.py::TestClient::test_watch_configmaps Running test against : https://10.20.255.31:8443
PASSED

/hold cancel

This change is ready for review. Please take a look

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 3, 2020
@palnabarun
Copy link
Member

Thank you for walking me through the changes and the background personally. :)

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2020
@k8s-ci-robot k8s-ci-robot merged commit b87a5fe into kubernetes-client:master Mar 3, 2020
@roycaihw roycaihw deleted the watch-unmarshal branch March 3, 2020 18:38
palnabarun added a commit to palnabarun/python that referenced this pull request Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm 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.

4 participants