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

[code] workspace sharing support #4580

Merged
merged 1 commit into from
Jun 28, 2021
Merged

[code] workspace sharing support #4580

merged 1 commit into from
Jun 28, 2021

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Jun 23, 2021

  • /werft with-clean-slate-deployment

What it does

Change in Gitpod Code: gitpod-io/openvscode-server@11d7256

How to test

  • Start a workspace.
  • You should see Share status bar indicator, click on it to start sharing. You should also be able to access owner actions like stop workspace, extend timeout and so on from the command palette and menus.
  • Open a workspace link by another user and check that a workspace can be accessed. Share indicator should show Shared by {owner}, clicking on it should not do anything. You should not be able to access owner actions.
  • Go to owner window again, share indicator should show Shared now, clicking on it should stop sharing.
  • You can also verify that there are Share and Stop Sharing commands under the main menu and the remote menu (click on remote indicator in the status bar).

@codecov
Copy link

codecov bot commented Jun 25, 2021

Codecov Report

Merging #4580 (28de9a7) into main (01f6b9a) will decrease coverage by 12.27%.
The diff coverage is n/a.

❗ Current head 28de9a7 differs from pull request most recent head c41d849. Consider uploading reports for the commit c41d849 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##             main    #4580       +/-   ##
===========================================
- Coverage   45.48%   33.20%   -12.28%     
===========================================
  Files           3       42       +39     
  Lines         332     9737     +9405     
===========================================
+ Hits          151     3233     +3082     
- Misses        163     6208     +6045     
- Partials       18      296      +278     
Flag Coverage Δ
components-ee-kedge-app ?
components-local-app-app-darwin ?
components-local-app-app-linux ?
components-local-app-app-windows ?
components-supervisor-app 36.29% <ø> (?)
components-ws-daemon-app 22.67% <ø> (?)
components-ws-daemon-nsinsider-app ∅ <ø> (?)
components-ws-manager-app 35.74% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/ee/kedge/pkg/kedge/serve.go
components/ee/kedge/pkg/kedge/collector.go
components/ee/kedge/pkg/kedge/kubernetes.go
components/supervisor/pkg/supervisor/services.go 25.55% <0.00%> (ø)
components/supervisor/pkg/supervisor/supervisor.go 0.00% <0.00%> (ø)
components/ws-manager/pkg/manager/annotations.go 66.66% <0.00%> (ø)
components/ws-daemon/pkg/resources/controller.go 34.05% <0.00%> (ø)
components/supervisor/pkg/ports/tunnel.go 63.63% <0.00%> (ø)
components/ws-manager/pkg/manager/manager_ee.go 0.00% <0.00%> (ø)
components/ws-daemon/pkg/internal/session/store.go 19.38% <0.00%> (ø)
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01f6b9a...c41d849. Read the comment docs.

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 25, 2021

/werft run

👍 started the job as gitpod-build-ak-code-share.2

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 25, 2021

/werft run

👍 started the job as gitpod-build-ak-code-share.3

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 25, 2021

/werft run

👍 started the job as gitpod-build-ak-code-share.4

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 25, 2021

/werft run with clean-slate-deployment

👍 started the job as gitpod-build-ak-code-share.6

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 25, 2021

/werft run with-clean-slate-deployment

👍 started the job as gitpod-build-ak-code-share.7

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 25, 2021

/werft run

👍 started the job as gitpod-build-ak-code-share.8

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 25, 2021

/werft run

👍 started the job as gitpod-build-ak-code-share.9

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 25, 2021

/werft run with-clean-slate-deployment

👍 started the job as gitpod-build-ak-code-share.10

Copy link
Contributor

@JanKoehnlein JanKoehnlein left a comment

Choose a reason for hiding this comment

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

Didn't work 😔

  • The "Joined" indicator didn't appear
  • In both workspaces, I could click on "Share" to unshare
  • Unsharing had no effect on the current connection (new connections were disabled)

I tried with two different sharing users

@JanKoehnlein
Copy link
Contributor

PS: The preview envs are currently pretty broken. I suggest to always deploy with-clean-slate-deployment

@akosyakov
Copy link
Member Author

@JanKoehnlein thanks for testing! The issue was that even for invited user I would use an owner user in the vscode extension. I changed now that a user is fetched from the browser session to detect whether current window own the workspace or not. I also limited commands which invited user can access. Please see test description above.

Copy link
Contributor

@JanKoehnlein JanKoehnlein left a comment

Choose a reason for hiding this comment

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

LGTM now.

I suppose "unsharing" a workspace doesn't terminate an existing connection, or should it?

@akosyakov
Copy link
Member Author

akosyakov commented Jun 28, 2021

I suppose "unsharing" a workspace doesn't terminate an existing connection, or should it?

It is a known bug for long time. We don't have any channel to communicate that a workspace is unshared. Although if you refresh the page then you won't be able to access anymore.

@akosyakov akosyakov merged commit 39ad790 into main Jun 28, 2021
@akosyakov akosyakov deleted the ak/code_share branch June 28, 2021 08:18
@akosyakov akosyakov restored the ak/code_share branch June 28, 2021 08:18
@akosyakov akosyakov deleted the ak/code_share branch June 28, 2021 08:18
@mikenikles
Copy link
Contributor

mikenikles commented Jun 28, 2021

This is exciting news! Could you add an item to the CHANGELOG.md file please so we won't miss it when we announce the next release 🙏?

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

Successfully merging this pull request may close these issues.

[code] upgrade after May 2021 recovery release [code] support "Share Running Workspace"
3 participants