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

Live Share support #3753

Closed
rchiodo opened this issue Dec 6, 2018 · 12 comments
Closed

Live Share support #3753

rchiodo opened this issue Dec 6, 2018 · 12 comments
Assignees

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Dec 6, 2018

Support live share with Python Interactive window.

This entails

  • Passing commands back to the guest so they can cause the guest to open a window too
  • Caching responses on the host to pass back to the guest (as the guest doesn't have real access to the ipython instance)
  • Writing functional tests for the whole thing
  • Port forwarding the jupyter server instance to the guest so when we get to jupyter extensions being hosted, they can communicate with the iPython console too.
@rchiodo rchiodo self-assigned this Jan 4, 2019
@rchiodo
Copy link
Contributor Author

rchiodo commented Jan 4, 2019

It doesn't work because of this issue for now:
microsoft/live-share#1480

Waiting on feedback from live share team.

@rchiodo
Copy link
Contributor Author

rchiodo commented Jan 22, 2019

So I can kind of get this to work if I turn off all schemes for our code lens. But then the command actually runs on the remote machine so the user doesn't get any of the benefit of it.

This work is going to require much more thinking about this. We probably need to start with a meeting with the liveshare team. They don't publish any sort of API to get our stuff to talk with them. That's the starting point I'd say.

Otherwise we'd have to

  • Somehow detect a command is from a remote user
  • Send the results to both sides

@rchiodo rchiodo removed their assignment Jan 22, 2019
@rchiodo
Copy link
Contributor Author

rchiodo commented Jan 22, 2019

@ronglums do you have any indicators on the priority of this? If it's rather high, I can start looking for who to ping for a meeting.

@ronglums
Copy link
Contributor

@rchiodo let's get the conversation going sooner rather than later..

@rchiodo
Copy link
Contributor Author

rchiodo commented Jan 28, 2019

The results of our discussion

  • We should be able to port forward a port on the host machine to the guest machine and use this as our connectioninfo in the guest. Jupyter's controls will just think this is a jupyter server running as the tcp server should just forward everything along
  • CodeLens are provided by the host machine, not the guest machine. We probably just need to eliminate our use of schemes in our provider registration.
  • We should create a custom server to mirror results between the host/guest. The whiteboard example the live share team is going to send us would be a good starting point for this.
  • We should NOT permit running cells from the guest unless the host grants it.
  • We can initiate the live share connection from the guest on extension activation

@rchiodo
Copy link
Contributor Author

rchiodo commented Jan 28, 2019

Live share has an npm called vsls:
https://www.npmjs.com/package/vsls

@rchiodo rchiodo self-assigned this Feb 7, 2019
@rchiodo rchiodo changed the title Live Share support (verify it works for Datascience) Live Share support Feb 12, 2019
@rchiodo
Copy link
Contributor Author

rchiodo commented Feb 12, 2019

Current status

  • Enabled behind a feature flag
  • Local to local works for most scenarios
  • Still need to write functional tests
  • Still need to verify all of the react side commands work across boundaries

rchiodo referenced this issue in microsoft/vscode-python Feb 12, 2019
For #3581

Get live share to work when server session already started. 
Fix problems with closing/reopening on the guest side reusing old results

Still to do:
- Add telemetry for liveshare sessions
- Add functional tests to verify liveshare algorithms (probably do this next)


<!--
  If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.:
    - [x] ~Has unit tests & system/integration tests~
-->
- [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
- [x] Title summarizes what is changing
- [x] Has a [news entry](https://github.com/Microsoft/vscode-python/tree/master/news) file (remember to thank yourself!)
- [ ] Has sufficient logging.
- [ ] Has telemetry for enhancements.
- [x] Unit tests & system/integration tests are added/updated
- [ ] [Test plan](https://github.com/Microsoft/vscode-python/blob/master/.github/test_plan.md) is updated as appropriate
- [ ] [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/master/package-lock.json) has been regenerated by running `npm install` (if dependencies have changed)
@rchiodo
Copy link
Contributor Author

rchiodo commented Feb 25, 2019

Closing this in favor of smaller tasks.

Work left to do:

  • Submit change in algorithm for using addcode instead of command duplication
  • Functional tests
  • True remote test

@rchiodo
Copy link
Contributor Author

rchiodo commented Feb 25, 2019

See items

#3609
#3603
#3610

@rchiodo rchiodo closed this as completed Apr 24, 2019
@damienrj
Copy link

damienrj commented May 4, 2019

What is the status of this, is it working now? Would like to use this for remote interviews. At least I have been been able to get the other participant to see the Interactive python window. Code does share a port, and the other person can see the kernal.

@rchiodo
Copy link
Contributor Author

rchiodo commented May 6, 2019

Yes it should be finished now. Both sides need the python extension. Be careful though. The other person can run any python code they want and it runs inside your jupyter kernel.

We're thinking about making a 'read-only' mode for the guest so that they can only see the interactive window but can't send cells to it.

@damienrj
Copy link

damienrj commented May 6, 2019

Read only sounds good as well. The kernel gets shared but I can't see the interactive window, and I can connect to the kernel if I go to the shared server so it is close to working. However, trying to run cells on the remote machine give me the message.

The host doesn’t allow running this command. If needed, ask them to enable it.

It sounds like this is supposed to be working so I can open a ticket if that is best.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants