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-cli] gp url should respect port forwarding #11849

Open
felladrin opened this issue Aug 3, 2022 · 2 comments
Open

[gp-cli] gp url should respect port forwarding #11849

felladrin opened this issue Aug 3, 2022 · 2 comments

Comments

@felladrin
Copy link
Contributor

While working on Auto-forward all workspace open ports when using JetBrains IDEs #11081, we noticed that the gp preview command is converting any Localhost URL to their respective Remote URL [1].

var previewCmd = &cobra.Command{
Use: "preview <url>",
Short: "Opens a URL in the IDE's preview",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
url := replaceLocalhostInURL(args[0])

We plan to change this behavior by making this conversion on the IDE-level instead of CLI-level. And also planning to do it only when needed, cause it's not always needed.

A sample case where this conversion is not needed is the following:
A user with JetBrains IDE starts a service on port 3000, which is automatically forwarded from the server to the user machine. But the user had the port 3000 already occupied by some other process. What JetBrains IDE does in this case is looking for the next free port (3001, for example). So whenever user runs: gp preview http://localhost:3000 it should open http://localhost:3001 on the browser.

@stale

This comment was marked as outdated.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Nov 26, 2022
@felladrin felladrin removed the meta: stale This issue/PR is stale and will be closed soon label Nov 29, 2022
@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Mar 18, 2023
@mustard-mh mustard-mh added the meta: never-stale This issue can never become stale label Mar 28, 2023
@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Mar 28, 2023
@felladrin felladrin removed their assignment May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants