Fix pod log stream follow detection#2612
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions 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-sigs/prow repository. |
|
|
|
Welcome @goutamadwant! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: goutamadwant The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
/kind regression
What this PR does / why we need it:
Watch.stream decides whether to pass watch= or follow= by looking at the wrapped API method docstring.
The generated pod log method now documents follow as split :param follow: and :type follow: bool lines instead of the older :param bool follow: form. Because the watch code only recognized the older form, it passed watch=True to read_namespaced_pod_log, and the generated client rejected that kwarg.
This keeps the existing old-format check and also recognizes the generated split follow docstring, so pod log streaming uses follow=True while normal watch APIs continue to use watch=True.
Which issue(s) this PR fixes:
Fixes #2610
Special notes for your reviewer:
Added a regression test for the generated pod log docstring format. This is scoped to the Watch.stream argument selection path and does not change generated client files.
Checked locally with:
Does this PR introduce a user-facing change?
Yes - Watch.stream(v1.read_namespaced_pod_log, ...) now uses follow=True for pod log streaming with the current generated docstring format, instead of failing with an unexpected watch argument.
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
NONE