Skip to content
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

Merged
merged 5 commits into from
Feb 26, 2025

Conversation

foriequal0
Copy link
Contributor

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-forward message loop.

@foriequal0 foriequal0 requested a review from a team as a code owner February 21, 2025 08:13
Copy link

google-cla bot commented Feb 21, 2025

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.

@foriequal0 foriequal0 force-pushed the fix/port-forward branch 2 times, most recently from 4dbfb25 to cecde56 Compare February 21, 2025 08:54
@foriequal0 foriequal0 changed the title Fix port-forward error logs failed to port forward fix: port-forward error logs failed to port forward Feb 21, 2025
Copy link
Contributor

@Darien-Lin Darien-Lin left a 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 Darien-Lin self-assigned this Feb 25, 2025
@pull-request-size pull-request-size bot added size/M and removed size/S labels Feb 26, 2025
Darien-Lin
Darien-Lin previously approved these changes Feb 26, 2025
Copy link
Contributor

@Darien-Lin Darien-Lin left a 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!

@foriequal0
Copy link
Contributor Author

Thank you for the review!

@Darien-Lin Darien-Lin merged commit eaea9c7 into GoogleContainerTools:main Feb 26, 2025
11 checks passed
@foriequal0 foriequal0 deleted the fix/port-forward branch February 26, 2025 03:35
mattsanta pushed a commit to mattsanta/skaffold that referenced this pull request Mar 19, 2025
…rTools#9728)

* 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
Darien-Lin pushed a commit that referenced this pull request Mar 19, 2025
* 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"failed to port forward, port is taken, retrying..." error with v2.14.1
2 participants