Open issacg opened 1 year ago
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
Hey,
Currently, I am working on an extension that allows users of our PaaS to create VS Code tunnels to their servers and connect to them. Users can have on-demand workspaces (servers) that shut down after 60 minutes of inactivity. When reconnecting to the remote tunnel of such a server after more than 60 minutes, the tunnel connection cannot be established because the server has shut down.
This proposed feature would enable our extension to send URL requests to the user's server when starting VS Code to initiate their server. This would prevent the tunnel connection from failing.
Right now, this is the log of the extension host when the server is shut down and we attempt to connect via tunnel:
2024-06-16 17:30:59.395 [info] Extension host with pid 55036 exiting with code 0
2024-06-16 17:31:00.671 [info] Extension host with pid 55504 started
2024-06-16 17:31:00.671 [info] Skipping acquiring lock for /home/jan-david/.config/Code/User/workspaceStorage/c3d95f04922cc1e3717ddf5991976dcf.
2024-06-16 17:31:00.671 [info] $getCanonicalURI invoked for authority (tunnel)
2024-06-16 17:31:00.674 [info] ExtensionService#_doActivateExtension ms-vscode.remote-server, startup: false, activationEvent: 'onResolveRemoteAuthority:tunnel'
2024-06-16 17:31:00.710 [info] [resolveAuthority(tunnel,1)][0ms] activating remote resolvers tunnel+vscode-extension-12
2024-06-16 17:31:00.710 [info] [resolveAuthority(tunnel,1)][0ms] activating resolver for tunnel+vscode-extension-12...
2024-06-16 17:31:00.710 [info] [resolveAuthority(tunnel,1)][0ms] invoking final resolve()...
2024-06-16 17:31:01.223 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2024-06-16 17:31:01.711 [info] [resolveAuthority(tunnel,1)][1001ms] waiting...
2024-06-16 17:31:02.722 [info] [resolveAuthority(tunnel,1)][2012ms] waiting...
2024-06-16 17:31:03.723 [info] [resolveAuthority(tunnel,1)][3013ms] waiting...
2024-06-16 17:31:04.723 [info] [resolveAuthority(tunnel,1)][4013ms] waiting...
2024-06-16 17:31:05.723 [info] [resolveAuthority(tunnel,1)][5013ms] waiting...
2024-06-16 17:31:06.724 [info] [resolveAuthority(tunnel,1)][6014ms] waiting...
2024-06-16 17:31:06.950 [info] [resolveAuthority(tunnel,1)][6240ms] setting tunnel factory...
2024-06-16 17:31:06.950 [info] [resolveAuthority(tunnel,1)][6240ms] returned 127.0.0.1:37141
2024-06-16 17:31:37.004 [info] [resolveAuthority(tunnel,2)][1ms] activating remote resolvers tunnel+vscode-extension-12
2024-06-16 17:31:37.004 [info] [resolveAuthority(tunnel,2)][1ms] activating resolver for tunnel+vscode-extension-12...
2024-06-16 17:31:37.004 [info] [resolveAuthority(tunnel,2)][1ms] invoking final resolve()...
2024-06-16 17:31:38.005 [info] [resolveAuthority(tunnel,2)][1002ms] waiting...
2024-06-16 17:31:38.284 [info] [resolveAuthority(tunnel,2)][1281ms] setting tunnel factory...
2024-06-16 17:31:38.284 [info] [resolveAuthority(tunnel,2)][1281ms] returned 127.0.0.1:45337
2024-06-16 17:32:08.326 [info] [resolveAuthority(tunnel,3)][0ms] activating remote resolvers tunnel+vscode-extension-12
2024-06-16 17:32:08.326 [info] [resolveAuthority(tunnel,3)][0ms] activating resolver for tunnel+vscode-extension-12...
2024-06-16 17:32:08.326 [info] [resolveAuthority(tunnel,3)][0ms] invoking final resolve()...
[...]
My idea would be that we could somehow modify the tunnel initialization of the tunnel connection with adding an activationEvent to our extension like activationEvent: 'onResolveRemoteAuthority:tunnel'
.
As i mentioned it in the issue #9981 this could be solved using proposed API
Hi!
It would really be great if there was support to add a webhook (preferably an authenticated webhook) before opening and after closing a client connection to a remote tunnel.
The use-case I envision is to be able to trigger a VM/container/whatever start and VM/container/whatever stop command for remote tunnels hosted on an IaaS platform, similar in idea to the flow for hosted codespaces. This would allow for remote tunnel servers to be provisioned just-in-time rather than being available 24/7.
I envision using an existing platform such as Github Actions, Jenkins, Azure Pipelines or the likes to host these webhooks, as those platforms already have a lot of the "plumbing" needed such as secrets management and/or integrated workload identity with the various IaaS providers for storing the credentials; I mention this because a lightweight version of such a pipeline/action mechanism would work even better than a webhook (if a webhook is actually needed it could be plugged in to such a pipeline anyway, and otherwise an external webhook wouldn't actually be needed).
Thanks!