Skip to content

Conversation

@akosyakov
Copy link
Member

@akosyakov akosyakov commented Mar 12, 2021

What it does

Changes in VS Code: gitpod-io/openvscode-server@845053f...f75d023

How to test

  • Switch to VS Code
  • Start a workspace
  • Open .gitpod.yml and add 9090 port
  • In terminal run curl lama.sh | LAMA_PORT=9090 sh and check that notification pops up with working preview button
  • Now change .gitpod.yml for the same port to auto show preview, restart the command in terminal
  • Now go to the port view and check there is a working action to preview the port
  • From the command line try gp preview https://localhost:9090 and gp preview $(gp url 9090) both should work by opening an external port URL, not localhost!

@csweichel
Copy link
Contributor

fixes #3382

@akosyakov akosyakov force-pushed the akosyakov/code-support-embedded-2806 branch from 11996d7 to 66d33e9 Compare March 12, 2021 15:49
if err == theialib.ErrNotFound {
gpPreviewBrowser := os.Getenv("GP_PREVIEW_BROWSER")
if gpPreviewBrowser != "" {
gpPreviewArgs := strings.Fields(gpPreviewBrowser)
Copy link
Member Author

Choose a reason for hiding this comment

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

@csweichel Does it look correct to support command with args? We probably should the same for GP_OPEN_EDITOR otherwise exec.LookPath will fail

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, we should do that for GP_OPEN_EDITOR as well.
I'd be happy to do this in a follow-up PR.

@svenefftinge
Copy link
Contributor

svenefftinge commented Mar 15, 2021

/werft run

👍 started the job as gitpod-build-akosyakov-code-support-embedded-2806.3

Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

Works nicely and LGTM

@akosyakov akosyakov force-pushed the akosyakov/code-support-embedded-2806 branch from 66d33e9 to 41ff7d2 Compare March 15, 2021 10:05
@akosyakov akosyakov force-pushed the akosyakov/code-support-embedded-2806 branch from 41ff7d2 to b5b0a7c Compare March 15, 2021 10:07
@akosyakov akosyakov merged commit 865769d into main Mar 15, 2021
@akosyakov akosyakov deleted the akosyakov/code-support-embedded-2806 branch March 15, 2021 10:29
@apolopena
Copy link

apolopena commented Mar 31, 2021

Nice. Is this currently testable in production? I see it has been merged to main.
When I have apache running on port 8001, using the vscode IDE, this:
gp preview $(gp url 8001)

outputs:

2021/03/31 18:36:25 not found

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Mar 31, 2021 via email

@apolopena
Copy link

Cool, thanks for the update. Is there an easy way to tell when code has been merged to main but not pushed to production? Or do I need to trace the trail of issues to a milestone?

@akosyakov
Copy link
Member Author

You can check whether the milestone is closed, if not we are still working on it. As soon as we ship we close the milestone: https://github.com/gitpod-io/gitpod/milestones

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.

[gp] 'gp preview <url>' should work in Code and other IDEs [code] support embedded live preview

6 participants