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

gp rebuild with isolated debug workspace #15795

Merged
merged 1 commit into from
Feb 6, 2023
Merged

gp rebuild with isolated debug workspace #15795

merged 1 commit into from
Feb 6, 2023

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Jan 17, 2023

Description

This approach creates an isolated debug workspace within the existing workspace using the docker run command. To access the debug workspace, a user adds the prefix debug- to the original workspace ID and uses the new ID as the debug workspace ID. See [1)] to learn more about the usage.

Both the original and debug workspaces share the same workspace, Docker, supervisor, and IDE mounts, but have separate networks. The debug workspace runs an HTTP proxy and SSH server to enable access. The workspace proxy uses the debug- prefix to forward traffic to the corresponding workspace.

Related Issue(s)

Related to #7671

How to test

  • Start a workspace and then follow [1] to use gp rebuild
  • It should work with VS Code Browser and Desktop (with latest version of extensions).
  • JB changes are in for the launcher, but it is hard to test in preview evns. We will test in production and improve later.

Release Notes

Allow to test the workspace configuration changes within the current workspace with gp rebuild.

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft analytics=segment
  • /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-rebuild-debug.1 because the annotations in the pull request description changed
(with .werft/ from main)

@akosyakov
Copy link
Member Author

akosyakov commented Jan 17, 2023

/werft run

👍 started the job as gitpod-build-ak-rebuild-debug.2
(with .werft/ from main)

@akosyakov akosyakov force-pushed the ak/rebuild_debug branch 2 times, most recently from c6bea97 to 927a56a Compare January 17, 2023 15:13
@roboquat roboquat added size/XL and removed size/L labels Jan 17, 2023
@akosyakov akosyakov force-pushed the ak/rebuild_debug branch 4 times, most recently from c8142cc to 95c326f Compare January 17, 2023 16:12
@roboquat roboquat added size/XXL and removed size/XL labels Jan 17, 2023
@akosyakov akosyakov force-pushed the ak/rebuild_debug branch 5 times, most recently from 1db92b2 to 34cd6d6 Compare January 17, 2023 20:02
@akosyakov
Copy link
Member Author

akosyakov commented Jan 17, 2023

/werft run

👍 started the job as gitpod-build-ak-rebuild-debug.14
(with .werft/ from main)

@akosyakov akosyakov force-pushed the ak/rebuild_debug branch 3 times, most recently from 538b192 to 8ecfb2f Compare January 17, 2023 21:45
@akosyakov
Copy link
Member Author

akosyakov commented Jan 17, 2023

/werft run recreate-vm=true

👍 started the job as gitpod-build-ak-rebuild-debug.18
(with .werft/ from main)

@akosyakov
Copy link
Member Author

akosyakov commented Jan 18, 2023

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-ak-rebuild-debug.19
(with .werft/ from main)

@akosyakov akosyakov force-pushed the ak/rebuild_debug branch 4 times, most recently from 227f746 to 63a9247 Compare January 18, 2023 15:34
@kylos101
Copy link
Contributor

kylos101 commented Feb 3, 2023

@akosyakov in df00d55, why FROM gitpod/workspace-full:latest, instead of FROM gitpod/workspace-base:latest? Just curious, I'm not suggesting workspace-base, more curious.

@akosyakov
Copy link
Member Author

@akosyakov in df00d55, why FROM gitpod/workspace-full:latest, instead of FROM gitpod/workspace-base:latest? Just curious, I'm not suggesting workspace-base, more curious.

@kylos101 It should apply the same default image which we put in outer loop. it is workspace-full right?

@kylos101
Copy link
Contributor

kylos101 commented Feb 3, 2023

@akosyakov in df00d55, why FROM gitpod/workspace-full:latest, instead of FROM gitpod/workspace-base:latest? Just curious, I'm not suggesting workspace-base, more curious.

@kylos101 It should apply the same default image which we put in outer loop. it is workspace-full right?

Good question! I'm not sure, honestly.

For example, the outer loop workspace image can be the default gitpod/workspace-full:latest (which is what happens if the customer doesn't override, or if their overridden image build fails, then they can opt to use the default, which is gitpod/workspace-full:latest).

To recap, customers can specify their own image in the following ways:

  1. a custom image
  2. a private image
  3. a specific tag for gitpod/workspace-full
  4. Or use a different base image, like gitpod/workspace-base:latest

I'm not sure on the use cases for the debug workspace. How useful is the debug workspace, if it doesn't include the customer's intended image/customizations? If it doesn't "need" to use the same workspace image as the outer loop, then gitpod/workspace-full-latest should be fine.

@akosyakov
Copy link
Member Author

To recap, customers can specify their own image in the following ways:

In this PR we only use gitpod/workspace-full:latest as a fallback after parsing .gitpod.yml and trying all other variants.

@kylos101
Copy link
Contributor

kylos101 commented Feb 3, 2023

To recap, customers can specify their own image in the following ways:

In this PR we only use gitpod/workspace-full:latest as a fallback after parsing .gitpod.yml and trying all other variants.

Thank you for clarifying, @akosyakov ! That helps. 😃

It looks like you're still making changes as of an hour ago, and this is in a draft state, so I'll hold off on approvals for now.

@akosyakov akosyakov marked this pull request as ready for review February 3, 2023 16:00
@akosyakov akosyakov requested a review from a team February 3, 2023 16:00
@akosyakov akosyakov requested a review from csweichel as a code owner February 3, 2023 16:00
@akosyakov akosyakov requested a review from a team February 3, 2023 16:00
@github-actions github-actions bot added team: workspace Issue belongs to the Workspace team team: IDE labels Feb 3, 2023
@akosyakov
Copy link
Member Author

akosyakov commented Feb 3, 2023

It's ready. I put hold to actually deploy only on Monday. @iQQBot could you check that we did not overlook something what will break stable features 🙏

Lou wants to start UX testing on Monday after 15 CET. It would be cool to deploy before.

/hold

@iQQBot
Copy link
Contributor

iQQBot commented Feb 6, 2023

/werft run

👍 started the job as gitpod-build-ak-rebuild-debug.85
(with .werft/ from main)

Copy link
Contributor

@iQQBot iQQBot left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -239,6 +236,9 @@ func Run(options ...RunOption) {
if cfg.DesktopIDE != nil {
internalPorts = append(internalPorts, desktopIDEPort)
}
if cfg.isDebugWorkspace() {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to also mark 24999-25003 internal?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean in the outer container? I don't think so, we don't reserve these ports. They can be used if gp rebuild is not running. If it is running I would prefer to be explicit and maybe provide supervisor api that gp rebuild could add name/description for such ports.

@iQQBot
Copy link
Contributor

iQQBot commented Feb 6, 2023

/werft run with-integration-tests=workspace

👍 started the job as gitpod-build-ak-rebuild-debug.87
(with .werft/ from main)

@akosyakov
Copy link
Member Author

/unhold

@akosyakov
Copy link
Member Author

akosyakov commented Feb 6, 2023

@csweichel We need a tick from you to land? 🙏

@roboquat roboquat merged commit 9b3f8a2 into main Feb 6, 2023
@roboquat roboquat deleted the ak/rebuild_debug branch February 6, 2023 13:47
@roboquat roboquat added deployed: IDE IDE change is running in production deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Feb 6, 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: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/XXL team: IDE team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants