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

Add tunnel activation event #188730

Closed
connor4312 opened this issue Jul 24, 2023 · 7 comments · Fixed by #189936
Closed

Add tunnel activation event #188730

connor4312 opened this issue Jul 24, 2023 · 7 comments · Fixed by #189936
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders remote-explorer Remote explorer view verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@connor4312
Copy link
Member

With #188270, extensions can now contribute tunnel factories. However, extensions doing this need to get activated on * / startupFinished to be shown there. It'd be nice if there was some kind of "tunnel" activation event that would only pick up when a tunnel or requested, or perhaps if the Ports view is interacted with, to avoid this.

Mentioned in https://github.com/microsoft/vscode-remote-tunnels/pull/661#discussion_r1272804131

@alexr00
Copy link
Member

alexr00 commented Jul 25, 2023

I like the ports view idea. Let's just go with that for now. There is the possibility that an extension might call openTunnel, but that is proposed API and I'm not aware of a case where that will be a problem.

@alexr00 alexr00 added feature-request Request for new features or functionality remote-explorer Remote explorer view labels Jul 25, 2023
@alexr00 alexr00 added this to the August 2023 milestone Jul 25, 2023
@alexr00
Copy link
Member

alexr00 commented Jul 25, 2023

Do we need this for July?

@connor4312
Copy link
Member Author

I don't think so

@joaomoreno joaomoreno changed the title Add some kind of "tunnel" activation event Add "tunnel" activation event Jul 28, 2023
@joaomoreno joaomoreno changed the title Add "tunnel" activation event Add tunnel activation event Jul 28, 2023
alexr00 added a commit that referenced this issue Aug 8, 2023
@alexr00
Copy link
Member

alexr00 commented Aug 8, 2023

The activation event will be called onTunnel. I ended up putting it in the place where ports are forwarded from the Ports view. This means the event will also fire when an extension calls openTunnel. There are a few places where we forward ports that this will miss, but I think they are all only relevant for resolvers.

alexr00 added a commit that referenced this issue Aug 9, 2023
* Add tunnel activation event
Fixes #188730

* Refactor
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 9, 2023
@alexr00 alexr00 added author-verification-requested Issues potentially verifiable by issue author verification-needed Verification of issue is requested labels Aug 28, 2023
@vscodenpa
Copy link

This bug has been fixed in the latest release of VS Code Insiders!

@connor4312, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version f7973f3 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@jrieken
Copy link
Member

jrieken commented Aug 30, 2023

I can verify that the activation sending is in source code but I don't know if it actually happens

@alexr00
Copy link
Member

alexr00 commented Aug 30, 2023

The built in tunnel forwarding extension can be used to verify this. If you can forward a port when not connected to a remote, then this is verified.

@TylerLeonhardt TylerLeonhardt added the verified Verification succeeded label Aug 30, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders remote-explorer Remote explorer view verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants