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

remote: first cut at 'inline' remote resolvers #180263

Merged
merged 20 commits into from
May 15, 2023

Conversation

connor4312
Copy link
Member

@connor4312 connor4312 commented Apr 18, 2023

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.

@connor4312 connor4312 self-assigned this Apr 18, 2023
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.
@connor4312 connor4312 force-pushed the connor4312/inline-remote-resolver branch from 3304b06 to f5427ee Compare April 18, 2023 22:54
Copy link
Member

@alexdima alexdima left a 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.

Copy link
Member

@alexdima alexdima left a 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.

Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@alexdima alexdima marked this pull request as ready for review May 12, 2023 21:02
@connor4312 connor4312 enabled auto-merge (squash) May 12, 2023 21:24
@connor4312 connor4312 disabled auto-merge May 12, 2023 21:33
@connor4312 connor4312 enabled auto-merge May 12, 2023 21:34
@VSCodeTriageBot VSCodeTriageBot added this to the May 2023 milestone May 12, 2023
@alexdima
Copy link
Member

@connor4312 Because I pushed code to the PR, it will not get auto-merged. We need one more approver.

@connor4312
Copy link
Member Author

Yes, I posted in #codereview, I think someone mis-✅'d it 🤔

@connor4312 connor4312 merged commit ba7435e into main May 15, 2023
@connor4312 connor4312 deleted the connor4312/inline-remote-resolver branch May 15, 2023 15:31
@jeanp413
Copy link
Contributor

There's a regression from this PR, see #183901
cc @alexdima @connor4312

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants