-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
port-forwarding in skaffold dev
is basically broken
#1594
Comments
Also experiencing this after trying 0.22.0. Old behavior would maintain the exposed service port. Now that only happens on the first deploy and all subsequent deploys change to a different port as described above. |
This issue should have been fixed by #1616 -- we'd recommend using skaffold built from master, or using v0.21.0 until v0.23.0 comes out next week with the fix! |
This behaviour seems to be happening again in |
I can confirm this behavior is still around in Port forwarding during |
@priyawadhwa any idea on when a fix could make it's way into master? Just tested |
Hey @arshbot -- I suspect this is happening because "pod name" was re-added to the port-forwarding key in #1780, so every time a pod is recreated it's assigned to a new port. I'm not sure if removing it will work because I don't want to re-introduce the race condition that PR was meant to fix. I'll go ahead and reopen this issue, our team is going to look at fixing port-forwarding soon & we will definitely take a look at this. cc @nkubala just wanted to confirm, pod name is necessary in the key, right? |
@priyawadhwa pod name is not necessary, I should have thought about it a bit more. this will be addressed with some of the upcoming port forwarding improvements. |
Thank you for taking note of this issue - I just want to make sure you understand the magnitude of this error for independent developers. This issue makes local development of Microservices with tools like Postman practically unfeasible - I've reverted to |
Related to #1815 |
This way, when pods are regenerated, they will be mapped to the same port. This should fix some of the issues users have been facing in GoogleContainerTools#1815 and GoogleContainerTools#1594.
I can confirm that at first glance If I could make a suggestion, do you think it'd be possible to add in some tests for this feature ( and hopefully others like this ) to prevent regression in the future? Tests are really useful in detecting subtle behavior changes that occur outside the scope of a newly implemented feature. |
This should help make sure we don't add podname to the key again. Ref GoogleContainerTools#1594.
Now that we track for port collision,
skaffold dev
will use a new port each time a pod is redeployed.For example:
8080
, it will be exposed on local port8080
4503
4504
...The text was updated successfully, but these errors were encountered: