-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ide] Add IntelliJ desktop IDE support #6270
Conversation
We now can use the public EAP releases and avoid the secrets, no?
I will look into what might be going on
That's something we didn't give any thought to as the code with me links weren't supposed to be used. We could randomly generate or use the workspace id but would need to inform the user of that somehow. cc @loujaybee We should make it explicit in the preferences that this requires IDEA Ultimate. |
I am interested in this test, can I take it? @corneliusludmann |
@atduarte What does that mean? When I run the bash command I get from the Code With Me page, I'm able to join the Gitpod workspace without any requirements. Has this been changed with the latest release? |
For me (without IntelliJ yet installed) it opens the "code with me EAP" guest application. I think those requirements only apply to the host, and in this case Gitpod is the host? It appears that all guests shouldn't require licenses / IDEA ultimate?
Disclaimer: pardon my ignorance as I wrap my head around the implementation 😁 |
Bear with us, it shouldn't be too long before we publish and send out any external communications on how you can join part of the beta / early release so you can experiment and give us some feedback 🙏 |
ok |
With regards to the code with me link and splash page (screenshot below) I wonder how easily it would be to bring that step within the UX of Gitpod? It seems that the generation of the curl script is doing OS detection + pulling the ID, so we could display that script directly on the workspace page to avoid the redirect. However, long term I think we'd probably want to bundle the logic into the companion app, but that's probably redundant if we eventually get rid of the Code With Me method. Note: Definitely not required within this PR, but thought I'd mention here. |
Looks like this also fixes #5641? |
cac3fb1
to
797847e
Compare
1a6c58b
to
aa4f633
Compare
/werft run 👍 started the job as gitpod-build-clu-intellij-ide.138 |
/werft with-clean-slate-deployment
/werft with-clean-slate-deployment
3fc04b9
to
92e14cf
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Associated issue: #5642 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## main #6270 +/- ##
===========================================
+ Coverage 19.04% 34.76% +15.72%
===========================================
Files 2 4 +2
Lines 168 975 +807
===========================================
+ Hits 32 339 +307
- Misses 134 596 +462
- Partials 2 40 +38
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I would love to. However, as mentioned above, I don't see a good way to split this into viable pieces. Let's have a look at what we have in this change:
For each of the items in the list, I created a separate commit (see commit hashes in the list) as well as separate PRs (see links in the list). That makes sure that each piece compiles on its own and works deployed separately, but the ability to test the changes is pretty limited. I would suggest to keep this PR as an “umbrella” PR that shows the integration of all pieces and would update the commits here (to make sure the integration still works) when I do changes in the separate PRs due to reviewer feedback. Would this be a good compromise, @csweichel? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa! @corneliusludmann it felt really good to be able to browse all workspace files inside IntelliJ IDEA. 🔮
I kept running into some reconnection issues but maybe it was because of the pushed updates in #6270 (comment). ❗
Left some minor UX comments but feel free to skip them for now.
@@ -32,6 +33,8 @@ function getPhaseTitle(phase?: StartPhase, error?: StartWorkspaceError) { | |||
return "Starting"; | |||
case StartPhase.Running: | |||
return "Starting"; | |||
case StartPhase.IdeReady: | |||
return "Your Workspace is Ready!"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: Wondering if a simpler phase would be better here.
return "Your Workspace is Ready!"; | |
return "Running"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to: #6438
{desktopIdeFeatureEnabled && | ||
<div className="mt-4 space-x-4 flex"> | ||
<CheckBox | ||
title="Use Desktop IDE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Shall we use the same verb as the action button on the loading page?
title="Use Desktop IDE" | |
title="Open in Desktop IDE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to: #6438
</div> | ||
<div className="mt-10 justify-center flex space-x-2"> | ||
<a target="_blank" href={this.state.desktopIde.link}><button>{this.state.desktopIde.label}</button></a> | ||
<button className="secondary" onClick={() => window.parent.postMessage({ type: 'openBrowserIde' }, '*')}>Open VS Code in Browser</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: What do you think of rephrasing this and associating the browser IDE with the product?
<button className="secondary" onClick={() => window.parent.postMessage({ type: 'openBrowserIde' }, '*')}>Open VS Code in Browser</button> | |
<button className="secondary" onClick={() => window.parent.postMessage({ type: 'openBrowserIde' }, '*')}>Open in Gitpod</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Come across this, and I don't think it's a good idea. The "Open in Gitpod" buttons that exist around the internet in Git repositories will lead to whatever IDE you have configured in your account. This button "Open VS Code in Browser" will lead to VS Code no matter what.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point @atduarte!
@@ -0,0 +1,11 @@ | |||
{ | |||
"entrypoint": "/ide-desktop/startup.sh", | |||
"entrypointArgs": [ "Open IntelliJ IDEA IDE" ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Does it matter if we mention the term IDE here?
"entrypointArgs": [ "Open IntelliJ IDEA IDE" ], | |
"entrypointArgs": [ "Open in IntelliJ IDEA" ], |
</div> | ||
<div className="mt-10 justify-center flex space-x-2"> | ||
<a target="_blank" href={this.state.desktopIde.link}><button>{this.state.desktopIde.label}</button></a> | ||
<button className="secondary" onClick={() => window.parent.postMessage({ type: 'openBrowserIde' }, '*')}>Open VS Code in Browser</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to: #6438
<div className="mt-4 space-x-4 flex"> | ||
<CheckBox | ||
title="Use Desktop IDE" | ||
desc="Choose whether you would like to open your workspace in a desktop IDE instead." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a longer conversation regarding this one in: #5641 (comment), let me cross-reference it there, also.
<a target="_parent" href={this.state.workspace?.contextURL}><p className="w-56 truncate hover:text-blue-600 dark:hover:text-blue-400" >{this.state.workspace?.contextURL}</p></a> | ||
</div> | ||
</div> | ||
<div className="mt-10 justify-center flex space-x-2"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: Although out of the scope of these changes, here's an early draft on how these actions could be unified, compressed, and always available during workspace loading phase based on a relevant discussion (internal). 🍔
We could later also include a dropdown option in the workspace start so that users can change this setting ad-hoc during workspace start in the loading phases where this is possible. 💡
In contrast, a dropdown selection could allow the loading phase to proceed and only when ready and needed would prompt to open the local VS Code application, but I could be wrong here. This would also connect and surface the selection option from /settings.
Thinking out loud here, I’d expect this option to be non-editable once the loading phase is near the end where we load the Web IDE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads up!
Let's address this in: #5641
That's awesome! Thank you very much for going this way. |
92e14cf
to
c931375
Compare
Description
This PR adds support for Intellij desktop IDEs.
Feature Flag: To be able to merge this into
main
without rolling this out to all users on the next deployment, the settings are only visible when you are an admin user. We could also introduce a dedicated feature flag for this. However, I think hiding it behind the admin flag is sufficient enough.We could think about splitting this change into smaller PRs. However, it seems to me that parts of this change are not really viable and it would not make sense to cut them out.
Werft Build Secret: Because we should not leak the download URLs of the IntelliJ backends, we store them in the K8s secret
jetbrains-secrets
in thewerft
namespace and consume them during the build. Once the download URLs are public, we can remove this and add the URLs to the repo directly.To Do
The goal of this PR is to get a basic implementation merged into
main
and improve the implementation with smaller PRs. That means that most of the following to-do items should be moved to separate issues instead of fixing them in this PR.We should focus on this PR to fix issues that would break something only.
ide_image
filed composite as discussed here: Create and use jetbrains' workspace images #5642 (comment)gitpod
(hard-coded). How should we handle this?Stop Workspace
button?Related Issue(s)
Fixes #5642, fixes #5641
How to test
Note: The preferences settings are hidden. Only users with admin rights see the desktop IDE settings. If you are not the first user of the preview env, you need to run something like
$ leeway run components:make-admin
.https://clu-intellij-ide.staging.gitpod-dev.com/workspaces
Go to
Settings
→Preferences
and enableUse Desktop IDE
:Start a workspace. You should see the following:
Click on
Open IntelliJ IDEA IDE
and follow the instructions.Click on
Open VSCode in Browser
and Open VSCode should open as usual.Release Notes
Depending on the rollout strategy, we would probably don't have this in the release notes yet but add this to the PR that removes the feature flag.
Meta
/no-cc