-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
remote: first cut at 'inline' remote resolvers #180263
Conversation
For web, it seems the most feasible direction for resolvers as we make existing remote extensions 'web enabled' is to allow them to run in the extension host. However, in no case will there just be a simple websocket we can connect to ordinarily. This PR implements a first cut at 'inline' resolvers where messaging is done in the extension host. I have not yet tested them on web, where I think some more wiring is needed to mirror desktop. Also, resolution of URLs is not in yet. I think for this we'd want to do some service-worker -based 'loopback' approach to run requests inline in the remote connection, similar to what I did for tunnels... Resolvers are not yet run in a dedicated extension host, but I think that should happen, at least on web where resolvers will always(?) be 'inline'. Most of the actual changes are genericizing places where we specified the "host" and "port" previously into an enum. Additionally, instead of having a single ISocketFactory, there's now a collection of them, which the extension host manager registers into when a managed resolution happens.
3304b06
to
f5427ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments. I didn't finish reviewing yet, sorry.
src/vs/platform/remote/electron-sandbox/remoteAuthorityResolverService.ts
Outdated
Show resolved
Hide resolved
…e-remote-resolver
…rity doesn't contain a '+' and is not in a 'hostname:port' format
…and extHostManagedSockets)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Releasing some more comments. I'm almost done, only src/vs/workbench/services/extensions/browser/extensionService.ts
left to review.
src/vs/workbench/services/environment/electron-sandbox/environmentService.ts
Outdated
Show resolved
Hide resolved
…r' into connor4312/inline-remote-resolver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@connor4312 Because I pushed code to the PR, it will not get auto-merged. We need one more approver. |
Yes, I posted in #codereview, I think someone mis-✅'d it 🤔 |
There's a regression from this PR, see #183901 |
For web, it seems the most feasible direction for resolvers as we make
existing remote extensions 'web enabled' is to allow them to run in the
extension host. However, in no case will there just be a simple
websocket we can connect to ordinarily.
This PR implements a first cut at 'inline' resolvers where messaging is
done in the extension host. I have not yet tested them on web, where I
think some more wiring is needed to mirror desktop. Also, resolution of
URLs is not in yet. I think for this we'd want to do some service-worker
-based 'loopback' approach to run requests inline in the remote
connection, similar to what I did for tunnels...
Resolvers are not yet run in a dedicated extension host, but I think
that should happen, at least on web where resolvers
will always(?) be 'inline'.
Most of the actual changes are genericizing places where we specified
the "host" and "port" previously into an union. Additionally, instead of
having a single ISocketFactory, there's now a collection of them, which
the extension host manager registers into when a managed resolution
happens.