microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

VS22: Restarts breaks connection to kubernetes and results in "Service not available" #296

Open Eneuman opened 2 years ago

Eneuman commented 2 years ago

To reproduce this behavior:

  1. In VS22 set BridgeToKubernetes to not disconnect after debug
  2. Start debugging a project
  3. Make changes to the project while it is running
  4. Click the "Restart" button in VS22 (Ctrl+Shift+F5)
  5. Repeat from 3. a few times and suddenly the service stops working.

After you click "Disconnect" in the yellow bar and wait for a minute, then you can start debugging again.

daniv-msft commented 2 years ago

Thanks @Eneuman for reporting this issue. @NCarlsonMSFT, Is this something you've heard about already?

Eneuman commented 2 years ago

You can also provoke this problem by enabling "BridgeToKubernetes to not disconnect after debug". Set a breakpoint in your code Debug you code and once your code stops on the breakpoint wait for 45 seconds and the bridge proxy pod (forwarding the calls to your machine) will terminate.

NCarlsonMSFT commented 2 years ago

@Eneuman We've opened an issue on our backlog to investigate the issue with restart. @daniv-msft the disconnect when waiting on a breakpoint seems like it may be a platform issue, can you comment? Does the VS Code extension experience the same timeout?

Eneuman commented 2 years ago

@NCarlsonMSFT When I look in the logs I can see this:

2022-03-10T08:33:40.4791066Z | EndpointManager | TRACE | 56 bytes were sent. 2022-03-10T08:48:40.1060032Z | EndpointManager | TRACE | Idle timeout reached. EndpointManager shutting down.

It shouldn't timeout when I have set it to "Dont disconnect", right ?

NCarlsonMSFT commented 2 years ago

@daniv-msft this sounds like a timeout in the platform. @Eneuman The setting in VS only controls whether VS intentionally disconnects when debugging ends it does not impact any timeouts.

Eneuman commented 2 years ago

@NCarlsonMSFT Ok, just let me know if you need any logs. I can repo this very easily on my part.

Eneuman commented 2 years ago

@NCarlsonMSFT Any news about this? It realy breaks the dev cycle.

NCarlsonMSFT commented 2 years ago

@Eneuman no news. There is a work item on the backlog to investigate this, but it has not reached the top of the list yet. I should warn you, based on your log, I strongly suspect when the investigation on the VS extension does happen the response will be the timeout is in the underlying bridge to Kubernetes platform and VS has no control over it. You can attempt to validate this yourself by trying the same scenario in the VS Code extension to test if it also times out.

daniv-msft commented 2 years ago

Apologies @NCarlsonMSFT and @Eneuman for the slow replies/investigations. We are dealing with extra work and a reduced dev team. Another argument to push for open sourcing the codebase and not put us as the blocking point.