fix: Respect port selection by name by services in ForwardPortE#1557
Merged
james00012 merged 2 commits intogruntwork-io:mainfrom May 21, 2025
Merged
fix: Respect port selection by name by services in ForwardPortE#1557james00012 merged 2 commits intogruntwork-io:mainfrom
james00012 merged 2 commits intogruntwork-io:mainfrom
Conversation
2 tasks
james00012
reviewed
May 14, 2025
Contributor
james00012
left a comment
There was a problem hiding this comment.
Otherwise LGTM. Let me run the tests.
| return port, err | ||
| } | ||
|
|
||
| func getPodPortByName(pod *corev1.Pod, portName string) (int, error) { |
Contributor
There was a problem hiding this comment.
Can we ensure that the function handles cases like pod = nil or pod.Spec gracefully?
Contributor
Author
There was a problem hiding this comment.
I added a check for pod = nil. pod.Spec, pod.Spec.Containers etc. should be enforced by type system.
c334d70 to
1099c25
Compare
1099c25 to
cb26c91
Compare
Contributor
|
Thanks for addressing the comments. Will re-trigger the test. Can you update the branch with the latest change by clicking the button "update branch" as well? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #1556.
TODOs
Read the Gruntwork contribution guidelines.
Release Notes
Added mapping of port selection by name by services to tunnel.ForwardPortE.