-
Notifications
You must be signed in to change notification settings - Fork 40k
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: 'apply view-last-applied' must not use printf() semantics #45611
Conversation
…l cause format codes in the YAML/JSON to be interpreted.
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://github.com/kubernetes/kubernetes/wiki/CLA-FAQ 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.
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. |
Hi @atombender. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with 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. |
(Still waiting for the CNCF account service to send me a CLA to sign.) |
Bump for CLA re-check |
/assign |
@k8s-bot ok to test |
/lgtm |
Updated release note. |
/lgtm |
@k8s-bot pull-kubernetes-unit test this |
Is this because the PR branched from a failing commit? Should I rebase? |
/retest |
@pwittrock @fabianofranz Can you approve this and remove |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: atombender, fabianofranz, mengqiy, shiywang Associated issue: 45608 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 48183, 45611, 48065) |
…45611 Automatic merge from submit-queue. UPSTREAM: 45611: remove use of printf semantics for view-last-applied cmd Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1503601 Picks changes introduced in upstream PR kubernetes/kubernetes#45611 which removes printf() semantics from the output of `apply view-last-applied`. Using printf() was causing values with `%` to be interpreted as Go format code, which in turn adding unwanted statements such as `(MISSING)!` to the yaml / json output of the command. cc @openshift/cli-review
What this PR does / why we need it:
This fixes
kubectl apply view-last-applied
to not usefmt.Fprintf()
, as this will cause format codes in the YAML/JSON to be interpreted. For example, if a resource manifest contains%r
, this would causeview-last-applied
so print%!r(MISSING)
.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #45608.Special notes for your reviewer:
Release note: