Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Telepresence exits when attaching to process in Goland #1003
I run a local minikube cluster and want to debug a Go microservice locally. I managed to get everything working just fine. telepresence created the proxy. I was able to hit the cluster and see my modified service getting called. so far so good.
but, then I tried to attach to the running process with Goland and that seems to kill telepresence.
Here is the relevant output of
After trying to attach to the local service (process 91302) the telepresence process (90795) is gone, but the local service is still running.
how can I make Goland attach to my local service launched by telepresence without killing telepresence?
I investigated this a little bit. Here are my findings and some sample code. I'll open a PR later.
Here is a little Go program (
The following Python program launches the z Go program and then waits for it to finish OR become a zombie. The main loop is very similar to the loop in Runner.wait_for_exit() method calling poll() repeatedly until the return code is not None.
referenced this issue
Apr 23, 2019
@ark3 noticed that the ps-based solution doesn't work on busybox (It could possibly work with some changes) and suggested to use a separate thread that does a blocking p.wait() and then sets the code and the quitting flag. I like this suggestion and it actually simplifies a lot because now the main loop always waits just for the quitting flag. The waiting code is simpler too (no need for those nasty
Updated PR coming soon