-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: port-forward error logs failed to port forward
#9728
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: port-forward error logs failed to port forward
#9728
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
failed to port forwardfailed to port forward
Reflect changes in `os.Process` introduced in Go 1.23
Darien-Lin
left a comment
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.
A few things:
Darien-Lin
left a comment
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.
Looks good to me. Thanks for making the changes and contributing to the code base!
|
Thank you for the review! |
* fix: port-forward error logs `failed to port forward` Reflect changes in `os.Process` introduced in Go 1.23 * use `reflect` to make it future proof(?) * Add safeguards to call FieldByName * Add basic test to getHandleFromProcess * Fix copyright year Co-authored-by: SeongChan Lee <foriequal@gmail.com>
Fixes: #9710
Description
Golang has changed os.Process structure since 1.23
cs.opensource.google/go/go/+/refs/tags/go1.22.0:src/os/exec.go;l=21
cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/os/exec.go;l=58
so this unpack doesn't work, lead to
failed to port-forwardmessage loop.