-
Notifications
You must be signed in to change notification settings - Fork 40.6k
Fix index out of range error when sorting kubectl get #70740
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 index out of range error when sorting kubectl get #70740
Conversation
Hi @mfpierre. 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 I understand the commands that are listed here. 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. |
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.
thanks for the PR @mfpierre
seems to me like get_test.go would need an update here.
/ok-to-test
@kubernetes/sig-cli-bugs |
@neolit123 just added a unit test case with an empty list of objects The test is crashing without the fix |
@mfpierre thanks for the update. /ok-to-test |
b6dbd08
to
bb9ea69
Compare
Looks like trailing some whitespaces caused issues /retest |
/test pull-kubernetes-e2e-kops-aws |
/lgtm |
Hey @justinsb thanks for the review, do you think this bug fix can make it into 1.13? |
I think it should, but that's probably a question for sig-cli maintainers. Looks like janetkuo won the github lottery here... /assign janetkuo |
it's not a regression (bug existed in 1.12), but the fix is contained, the risk is low, and I'd consider it a candidate for cherry-pick. /milestone v1.13 |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, mfpierre 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
There's an unsafe access to the
[0]
element ofr.objects
which can cause this error to happen:Special notes for your reviewer:
Does this PR introduce a user-facing change?: