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 issues on Windows #2218

Merged
merged 4 commits into from
Jan 20, 2021
Merged

Fix port forward issues on Windows #2218

merged 4 commits into from
Jan 20, 2021

Conversation

edvald
Copy link
Collaborator

@edvald edvald commented Jan 20, 2021

Fixes #2129 (which turned out only partially to have to do with hot reloading, specifically)

I found two problems that relate to the issue, both pretty subtle.

One was that the subprocesses used for k8s port forwards could in some cases hang around after the main process closes. I think the first commit takes care of that, at least I couldn't get it to come up again after the change.

Second was that we weren't properly catching the EADDRINUSE error from the proxy server we create as soon as we allocate the proxy (i.e. even before the underlying port-forward is started).

The reason this issue had eluded us during testing appears to be that it only came up on consecutive runs of Garden, where Garden would attempt to get the same port again on the next run, but Windows appears to reject that until after some time has passed (if I wait more than a minute, the ports go back to where they "want" to be).

@thsig thsig merged commit 5e04712 into master Jan 20, 2021
@thsig thsig deleted the fix-hanging-kubectl-procs branch January 20, 2021 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hot-reloading on windows doesn't appear to work natively
2 participants