Skip to content

[inner loop poc] debug workspace window #15490

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

Merged
merged 1 commit into from
Jan 9, 2023
Merged

[inner loop poc] debug workspace window #15490

merged 1 commit into from
Jan 9, 2023

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Dec 22, 2022

Description

This PR introduces an experimental approach to debug gitpod workspace configuration. To be tested internally first, this will allow testing .gitpod.yml and .gitpod.Dockerfile within a workspace without the need to git push such files.

For demo, see an internal thread.

The debug location:

  • does not use blobserve to serve static content, but serve directly from the workspace
  • does not have access to sensitive cookies like Gitpod cookie

This PR as well fixes service VS Code production built from sources (not blobserve) and align serving of webviews for production (workspace locations) and in dev mode (port location).

Related Issue(s)

Fixes #

How to test

Test for regressions

  • Start VS Code stable, check that everything works and the inner loop actions are NOT available.

Test for feature flag

  • Start VS Code latest, check that everything works and the inner loop actions are NOT available.
  • Enable the feature flag for a user.
  • Start VS Code latest, check that everything works and the inner loop actions are available.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-ak-new-window.2 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-ak-new-window.3 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat added size/XL and removed size/L labels Dec 23, 2022
@akosyakov akosyakov changed the title [supervisor] make it compatible with run-gp [inner loop poc] debug workspace Dec 23, 2022
@akosyakov akosyakov changed the title [inner loop poc] debug workspace [inner loop poc] debug workspace window Dec 23, 2022
@akosyakov
Copy link
Member Author

akosyakov commented Dec 23, 2022

/werft run

👍 started the job as gitpod-build-ak-new-window.21
(with .werft/ from main)

@kylos101
Copy link
Contributor

kylos101 commented Dec 23, 2022

/werft run with-integration-tests=workspace with-large-vm=true

👍 started the job as gitpod-build-ak-new-window.22
(with .werft/ from main)

@roboquat roboquat added size/XXL and removed size/XL labels Dec 25, 2022
@akosyakov akosyakov force-pushed the ak/new_window branch 2 times, most recently from 50f0ee9 to c127011 Compare December 25, 2022 22:47
@akosyakov
Copy link
Member Author

akosyakov commented Dec 26, 2022

/werft run recreate-vm=true

👍 started the job as gitpod-build-ak-new-window.34
(with .werft/ from main)

@akosyakov akosyakov force-pushed the ak/new_window branch 3 times, most recently from 56477f3 to 330a901 Compare December 26, 2022 22:21
@akosyakov
Copy link
Member Author

akosyakov commented Dec 26, 2022

/werft run recreate-vm=true

👍 started the job as gitpod-build-ak-new-window.40
(with .werft/ from main)

@akosyakov akosyakov force-pushed the ak/new_window branch 4 times, most recently from d51162d to 909de18 Compare December 27, 2022 23:55
@andreafalzetti andreafalzetti force-pushed the ak/new_window branch 2 times, most recently from 7f1618a to ff46269 Compare January 3, 2023 17:53
@andreafalzetti
Copy link
Contributor

andreafalzetti commented Jan 3, 2023

/werft run recreate-preview

👍 started the job as gitpod-build-ak-new-window.52
(with .werft/ from main)

@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team labels Jan 5, 2023
@gitguardian

This comment was marked as outdated.

@Siddhant-K-code
Copy link
Member

Siddhant-K-code commented Jan 5, 2023

@akosyakov you need to squash all commits to one (because GitGuardian) with latest main pull. Internal Discussion

@akosyakov
Copy link
Member Author

akosyakov commented Jan 5, 2023

@Siddhant-K-code There is only one commit 🤔

@Siddhant-K-code
Copy link
Member

Siddhant-K-code commented Jan 5, 2023

@Siddhant-K-code There is only one commit 🤔

GitGuardian is failing due to this PR

@akosyakov
Copy link
Member Author

akosyakov commented Jan 5, 2023

@felladrin commented:

I started a workspace in the Preview Environment, which had image: mcr.microsoft.com/playwright:focal in the .gitpod.yml, then when clicking the build/test I got the following:

Executing task: gp-run --all-commands=false 

Error: no supported container runtime detected

Should we hide the buttons if we don't find a container runtime in the user's current image?

I think it is fine, it means a user should install it.

Copy link
Contributor

@felladrin felladrin left a comment

Choose a reason for hiding this comment

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

Reviewed and tested! ✅

When running without the feature flag or running VS Code Stable, it doesn't show the new actions for .gitpod.yml. After activating the feature for my user, all buttons were there and worked as described. And I didn't see any regression during the tests.

@kylos101
Copy link
Contributor

kylos101 commented Jan 5, 2023

@jenting could you review this PR? There are ws-proxy changes, when we filter this PR for code owner files? 🙏

Copy link
Contributor

@jenting jenting left a comment

Choose a reason for hiding this comment

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

LGTM in general

@akosyakov akosyakov force-pushed the ak/new_window branch 2 times, most recently from 641d824 to 7de88b2 Compare January 6, 2023 08:37
@iQQBot
Copy link
Contributor

iQQBot commented Jan 6, 2023

/werft run

👍 started the job as gitpod-build-ak-new-window.59
(with .werft/ from main)

@@ -16,10 +16,10 @@ const baseWorkspaceIDRegex =
"(([a-f][0-9a-f]{7}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|([0-9a-z]{2,16}-[0-9a-z]{2,16}-[0-9a-z]{8,11}))";

// this pattern matches v4 UUIDs as well as the new generated workspace ids (e.g. pink-panda-ns35kd21)
const workspaceIDRegex = RegExp(`^${baseWorkspaceIDRegex}$`);
const workspaceIDRegex = RegExp(`^(?:debug-)?${baseWorkspaceIDRegex}$`);
Copy link
Member Author

Choose a reason for hiding this comment

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

@geropl Could someone have a look please? 🙏

it is rather only this change for webapp. It does not really affect anythin besides supervisor frontend as far as I aware.

Debug workspaces are started within a regular workspace, not via Gitpod itself.

Copy link
Member

Choose a reason for hiding this comment

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

Debug workspaces are started within a regular workspace, not via Gitpod itself.

That would be an excellent doc comment on the debugWorkspace property below.

Co-authored-by: Anton Kosyakov <anton@gitpod.io>
Co-authored-by: Victor Nogueira <victor@gitpod.io>
Co-authored-by: Andrea Falzetti <andrea@gitpod.io>
@roboquat roboquat merged commit 6976960 into main Jan 9, 2023
@roboquat roboquat deleted the ak/new_window branch January 9, 2023 05:32
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed: IDE IDE change is running in production labels Jan 9, 2023
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed: webapp Meta team change is running in production deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/XXL team: IDE team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants