-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[code] fix gp cli while running next to jb product #8191
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
Comments
after a chat with @akosyakov we concluded that we could start working on this feature incrementally, by adding initially only the endpoint in supervisor and testing it internally by supervisor CLI. Then, we could have a follow-up ticket to integrate with gp-cli and so on. |
@mustard-mh and I started working on this, we pair programmed for a couple of hours today and made some progress. Besides adding two new endpoints to We've considered 2 approaches, when users use The biggest downside of approach A is that we need to implement in supervisor 2 endpoints, one for Another small downside for approach A, is that potentially makes harder returning any error to the user. If the |
What if we do not use And provide cmd like And we should also provide How to Use Custom IDE (via ssh) section in our doc and #6707 #7570 |
I think the upside of A that we have clean interface and hide implementation details of working with concrete IDEs behind them instead of relying on other ways. B does not sound so clean, since there will be one explicit protocol via interface and another implicit via binaries. |
We should not do it. We should only map that is required for gp cli, i.e. open request should accept absolute path and preview should accept URL. That's it. If someone wants to use a specific capabilities of code CLI, then they should use it directly. |
If we exec in exec in cc @akosyakov |
Why do we need to access them? |
We don't need to access them currently😂 |
If we only pass
So if we decide to exec in
cc @akosyakov |
Right, for open request we should also have Are you worrying about backward compatibility to |
I still prefer exec in open need $ gitpod /workspace $ env | grep GP_PREVIEW_BROWSER
GP_PREVIEW_BROWSER=/ide/bin/remote-cli/gitpod-code --preview So why not ask supervisor for what ide user using now (or the cli location #8191 (comment)), and exec the cli in we also parse env before gitpod/components/gitpod-cli/cmd/preview.go Lines 63 to 66 in 9619985
gitpod/components/gitpod-cli/cmd/open.go Lines 57 to 60 in c8526ae
|
We should not run anything in supervisor. It works following:
There is no anymore env vars or binaries involved, everything is done via clearly defined protocol. |
Do you mean we need to exec in
it will be complex, and not support for |
We don't need to exec anything. VS Code extenison and JB backend plugin already have enough access to internals to do the proper thing.
It will be easier since there is not undocumented assumptions just one interface to implement for custom IDEs. |
This approach makes sense to me, thanks @akosyakov Regarding the new endpoints Update: actually, it makes more sense to have those in |
Proto approach
|
Yes, an idea was to extend existing APIs with new kind of notifications. |
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. |
Not sure if related (or fix in a separate ticket). But a comment from Discord:
|
Since #8025 gp open/preview always exepct JB product if it is enabled, so they break in VS Code Web. We should redesign it by relying on notification service on supervisor instead of env vars.
The text was updated successfully, but these errors were encountered: