GoogleCloudPlatform / cloud-code-intellij

Plugin to support the Google Cloud Platform in IntelliJ IDEA - Docs and Issues Repository
Apache License 2.0
319 stars 59 forks source link

Intellij becomes unresponsive when using Cloud Code #3087

Closed JJRdec closed 2 years ago

JJRdec commented 2 years ago

Expected Behavior

App shouldn't become unresponsive.

Actual Behavior

Using "Cloud Code kubernetes" run configs to run and debug apps in my local cluster (docker desktop). When stopping a debug session the application regularly becomes responsive and most be killed via task manager.

Additional Information

Recreate

  1. Debug/run session is active
  2. I try to stop session
  3. Its un responsive, the debug session doesn't end
  4. I by closing the tab for the session image
  5. Waiting for process to detach starts image
  6. I try to run a new debug session - the application is unresponsive. (We can see the debug button is frozen on the click) image

There are loads of Intellij processes (CMD, kubectl.exe, ) running when using Cloud Code, maybe that could be the culprit.

image

image

etanshaul commented 2 years ago

this is extremely helpful. thanks @JJRdec . We will look into this.

peterlin741 commented 2 years ago

@JJRdec, could you provide us with the exact version of the Cloud Code plugin you are using? You can find this at Preferences > Plugins (e.g. 22.7.1-221)

image

JJRdec commented 2 years ago

@JJRdec, could you provide us with the exact version of the Cloud Code plugin you are using? You can find this at Preferences > Plugins (e.g. 22.7.1-221)

Yes its the latest... 22.7.1-221

image

JJRdec commented 2 years ago

Also, my Skaffold setup is similar to this example: Multi-config example

etanshaul commented 2 years ago

@JJRdec we are actively investigating. We are able to repro occasionally, but not consistently. It seems related to simultaneous browsing of resources in the Kubernetes explorer while the development session is running (all of those kubetcl processes are "watch" processes, to allow us to autoupdate the tree as your Kubernetes resources change) - is this consistent with what you are seeing?

JJRdec commented 2 years ago

@JJRdec we are actively investigating. We are able to repro occasionally, but not consistently. It seems related to simultaneous browsing of resources in the Kubernetes explorer (all of those kubetcl processes are "watch" processes, to allow us to autoupdate the tree as your Kubernetes resources change) - is this consistent with what you are seeing?

No, its occasionally - maybe every 3-5 debug sessions. I am also dealing with 3/4 deployments (multi-config Skaffold) which I'm sure isn't helping. Is there a way to disable to Kubernetes Explorer feature for now within Intellij?

etanshaul commented 2 years ago

Is there a way to disable to Kubernetes Explorer feature for now within Intellij?

If, after starting the IDE, you simply never open that panel, it should be equivalent. You can also open the toolbar, click on settings icon and select remove from sidebar (you may want to force kill any kubectl processes after this just to isolate that away). After doing all this, I'd be curious if the issue goes away completely for you.

JJRdec commented 2 years ago

Unfortunately, after removing the Kubernetes Explorer from the sidebar and restarting Intellij the issue persists.

I had to start and stop debug session 5 times or so. But the processes kept growing to around 150 and then I couldn't stop the debug once again - Intellij became unresponsive and described before.

image

image

etanshaul commented 2 years ago

@JJRdec I think we understand why all those kubectl processes are being launched (despite the explorer tree being open). We will fix this bug asap.

We are still investigating to root cause of why those processes are preventing the session from being stopped (and ultimately freezing things up).

etanshaul commented 2 years ago

We have a partial fix for this. It should take care of most scenarios. We'll update when it is released (hopefully soon, this week). Thanks again for escalating this issue.

peterlin741 commented 2 years ago

This has been fixed in 22.8.1. Thanks for the feedback!