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

Handle port forwarding rules in sequence #4053

Merged
merged 1 commit into from
Apr 30, 2020

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Apr 29, 2020

First, user defined rules.
Then, automatic rules.

Fixes #3563

Signed-off-by: David Gageot [email protected]

First, user defined rules.
Then, automatic rules.

Fixes GoogleContainerTools#3563

Signed-off-by: David Gageot <[email protected]>
@codecov
Copy link

codecov bot commented Apr 29, 2020

Codecov Report

Merging #4053 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
...ffold/kubernetes/portforward/resource_forwarder.go 87.75% <100.00%> (-0.49%) ⬇️

Copy link
Member

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a suggestion on UX

for _, r := range resources {
r := r
go func() {
go func() {
Copy link
Member

@tejal29 tejal29 Apr 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, if we are slowing down skaffold portforward phase due to sequentially forwarding resources.

Other alternative would be at L63, we first port forward uderDefinedResources in parallel. Wait for it to complete and then portforward serviceResources.

I don't mind this approach either "Correctness Vs Performance"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the idea @tejal29. You know what, let's go with correctness and if we have an issue, we'll improve the perf.

@dgageot dgageot merged commit cfe85f6 into GoogleContainerTools:master Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable only User Defined Port Forwarding
3 participants