-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oc debug: fix crash on attach #20697
oc debug: fix crash on attach #20697
Conversation
6803cb7
to
5dc7505
Compare
/test cmd |
Upstream pick that introduced this c7e00d1
LGTM but want CLI to look at this |
We could improve the upstream code to avoid the carry patch by exporting the defaultAttachFunc. The initialization of AttachFunc is odd as well. By initializing the upstream AttachFunc in the New... constructors the code would be setup from the initial construction to be overridden by our debug implementation. |
Upstream PR: kubernetes/kubernetes#67615 |
/hold |
lgtm provided upstream PR is approved |
Also, please split your commit into two. First one should be "UPSTREAM: 67615: attach: Move the AttachFunc default function to the initializer" and be up to date with upstream changes, second one should contain Origin changes |
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.
Pick the upstream changes as a separate UPSTREAM
commit and in the another one make the oc specific changes. I just approved uptream PR, so make sure to update that as well.
…initializer Fixes a partially constructed AttachOptions
Refactors to pick up the initializer for defaultAttachFunc Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1618522
@soltysh rebased and refactored... good to go for another review. |
/test cmd |
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.
/lgtm
/approve
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: rphillips, soltysh 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 |
Upstream merged, this is properly updated, approving. |
@rphillips: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
o.AttachFunc is nil since we use our own custom
oc debug
command.Attaching the defaultAttachFunc if nil fixes the crash and gives a
prompt.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1618522