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
kubectl scale: Use visitor only once #114252
Conversation
`kubectl scale` calls visitor two times. Second call fails when the piped input is passed by returning an `error: no objects passed to scale` error. This PR uses the result of first visitor and fixes that piped input problem. In addition to that, this PR also adds new scale test to verify.
Currently, if user executes `kubectl scale --dry-run`, output has no indicator showing that this is not applied in reality. This PR adds dry run suffix to the output as well as more integration tests to verify it.
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Fri Dec 2 09:43:03 UTC 2022. |
/hold |
/triage accepted |
integration failure looks not related; /test pull-kubernetes-integration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job and thanks for the additional tests!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, brianpursley 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 |
/hold cancel |
/retest |
What type of PR is this?
/kind bug
What this PR does / why we need it:
kubectl scale
calls visitor two times. Second call fails when the piped input is passed by returning anerror: no objects passed to scale
error.This PR uses the result of first visitor and fixes that piped input problem. In addition to that, this PR also adds new integration tests to verify.
This PR is continuation of #109196
Which issue(s) this PR fixes:
Fixes kubernetes/kubectl#1183
Does this PR introduce a user-facing change?