Skip to content

Allow user select eap version of JetBrains IDE #7852

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

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Jan 26, 2022

Description

Allow user select eap version of JetBrains IDE

Related Issue(s)

Relate #7023

How to test

We can check current Desktop IDE version by: Start a workspace, run cat /ide-desktop/backend/product-info.json | jq

  1. Go to preference, select Pycharm, check version
  2. Go to preference, select Pycharm and check Include JetBrains EAP then check version

Release Notes

NONE

Documentation

@iQQBot iQQBot force-pushed the pd/add-latest-jb branch 2 times, most recently from 1416792 to 636130e Compare January 26, 2022 18:37
@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from iqqbot and additionally assign jankeromnes after the PR has been reviewed.
You can assign the PR to them by writing /assign @jankeromnes in a comment when ready.

Associated issue: #7023

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link

codecov bot commented Jan 26, 2022

Codecov Report

Merging #7852 (9266dc4) into main (1bb0be9) will decrease coverage by 3.96%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             main   #7852      +/-   ##
=========================================
- Coverage   12.01%   8.04%   -3.97%     
=========================================
  Files          20      31      +11     
  Lines        1190    2212    +1022     
=========================================
+ Hits          143     178      +35     
- Misses       1043    2031     +988     
+ Partials        4       3       -1     
Flag Coverage Δ
components-gitpod-cli-app 10.86% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
installer-raw-app 5.63% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/local-app/pkg/auth/auth.go
components/local-app/pkg/auth/pkce.go
installer/pkg/components/ws-manager/rolebinding.go 0.00% <0.00%> (ø)
installer/pkg/common/storage.go 0.00% <0.00%> (ø)
...components/ws-manager/unpriviledged-rolebinding.go 0.00% <0.00%> (ø)
...staller/pkg/components/ws-manager/networkpolicy.go 0.00% <0.00%> (ø)
installer/pkg/common/render.go 0.00% <0.00%> (ø)
installer/pkg/components/ws-manager/tlssecret.go 0.00% <0.00%> (ø)
installer/pkg/common/objects.go 0.00% <0.00%> (ø)
installer/pkg/components/ws-manager/deployment.go 0.00% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bb0be9...9266dc4. Read the comment docs.

@iQQBot
Copy link
Contributor Author

iQQBot commented Jan 26, 2022

/werft run with-helm

👍 started the job as gitpod-build-pd-add-latest-jb.3

@akosyakov akosyakov requested a review from gtsiolis January 26, 2022 20:18
@akosyakov
Copy link
Member

akosyakov commented Jan 26, 2022

@gtsiolis @loujaybee could you review UI/UX 🙏 please

@@ -190,6 +191,23 @@ export class IDEConfigService {
}
}

for (const [id, option] of Object.entries(newValue.ideOptions.options).filter(([_, x]) => x.latestImage)) {
if (option.latestImage == null || option.latestImage === "") {
Copy link
Member

Choose a reason for hiding this comment

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

!option.latestImage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line doesn't really work, the real check is in the previous line, here it's just to remove the typescript error, of course can replace it with @ts-ignore

@@ -190,6 +191,23 @@ export class IDEConfigService {
}
}

for (const [id, option] of Object.entries(newValue.ideOptions.options).filter(([_, x]) => x.latestImage)) {
if (option.latestImage == null || option.latestImage === "") {
Copy link
Contributor

@andreafalzetti andreafalzetti Jan 26, 2022

Choose a reason for hiding this comment

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

Suggested change
if (option.latestImage == null || option.latestImage === "") {
if (option.latestImage === null || option.latestImage === "") {

Is the shallow comparison on purpose? I find it possibly causing headaches to debug (e.g. undefined == null => true). Alternatively why not if (!option.latestImage) {?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line doesn't really work, the real check is in the previous line, here it's just to remove the typescript error, of course can replace it with @ts-ignore

@@ -190,6 +191,23 @@ export class IDEConfigService {
}
}

for (const [id, option] of Object.entries(newValue.ideOptions.options).filter(([_, x]) => x.latestImage)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this for loop is fairly complex, with many things happening in a single line - did you consider breaking it down a bit?

@akosyakov
Copy link
Member

@iQQBot Let's put a checkbox in less prominent location like under the header or even under all desktop IDEs. Most of users don't need it.

Is it possible to show concrete versions as label? Do we have this information in the metadata or can we resolve it somehow from docker image? Can we get it?

@iQQBot
Copy link
Contributor Author

iQQBot commented Jan 27, 2022

@gtsiolis I need some visual design help, can you give me some help?

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 27, 2022

Looking at this now! 👀

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 27, 2022

Thanks for the ping @iQQBot! FWIW, I agree with @akosyakov in #7852 (comment) about moving the checkbox to a less prominent location.

This is also something we could use to consolidate all options including VS Code editors but let's leave this out of the scope of this PR. Cc @akosyakov @loujaybee

Adding below a design for this. I've removed the rest of the preferences elements to focus on the desktop editors. Feedback is welcome! 🏀

EAP

@akosyakov
Copy link
Member

akosyakov commented Jan 28, 2022

This is also something we could use to consolidate all options including VS Code editors but let's leave this out of the scope of this PR. Cc @akosyakov @loujaybee

Let's think about user stories here. I am not sure that's it all the same. There can be cases when you want to use stable for one, and latest for another. Maybe later we remove these big boxes instead have a drop down and add all versions there, stable and latest. Right now it is just for us to test against next version.

@iQQBot
Copy link
Contributor Author

iQQBot commented Jan 28, 2022

Thanks for @gtsiolis the design plan, @akosyakov Do you think it's OK to follow the above design? If so I'll follow the design and implement it

@akosyakov
Copy link
Member

Thanks for @gtsiolis the design plan, @akosyakov Do you think it's OK to follow the above design? If so I'll follow the design and implement it

Yes, it looks good and enable us to test latest versions.

@iQQBot
Copy link
Contributor Author

iQQBot commented Jan 31, 2022

Already changed based on review suggestions

@loujaybee
Copy link
Member

loujaybee commented Jan 31, 2022

I've removed the rest of the preferences elements to focus on the desktop editors.

No challenges with the proposed design for desktop.

However, if we implement as suggested then the preferences page (for desktop) will become inconsistent to the VS Code preferences section above (for browser) where two UX for choosing the latest/EAP versions are provided. If we go with the UX suggested, I'd suggest we also update the VS Code preferences to the same checkbox UX for insiders (or we create a ticket for it). CC: @gtsiolis

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 31, 2022

I've removed the rest of the preferences elements to focus on the desktop editors.

@loujaybee To clarify, the removal was only part of the review comment to focus on the changes in the scope of this . The proposal was not to consolidate browser and desktop editors in this PR, as discussed last week in our meeting with @akosyakov.

I'd suggest we also update the VS Code preferences to the same checkbox UX for insiders

Agree. Opening a follow up issue sounds also good.

🍊 🍊 🍊 🍊

Long-term I still think consolidating the editors and using the latest and desktop options below could be better UX. However, probably not worth holding this PR back for this.

Less choices, more control[1][2][3].

Happy to also discuss the limitations or benefits in a follow up issue or PR. Here's how this could look like:

editors

@loujaybee
Copy link
Member

loujaybee commented Feb 1, 2022

Thanks for the update, @gtsiolis 🙏

consolidate browser and desktop editors in this PR

I think we're in agreement on the proposal you mentioned. I also agree it doesn't make sense to prevent this PR progressing. I think we don't yet have an issue for what you mentioned, yet. So I'll make one now.

In this case, I'm think I'm talking about something related, but different. EAP and insiders are essentially the same concept, i.e the user doesn't get a new IDE, but instead gets a pre-release/early version, so I think should be represented in the same way in the UI for both the desktop and browser. Merging the PR will bring a (non-critical) inconsistency. Happy to move this to another issue, but wanted to raise so that we were aware of the inconsistency before merging.

Visual example:

EAP selected using checkbox Insiders selected using tile
Editors Editors

The screenshot you attached would tackle both:

  1. Inconsistent selection of early access/insider IDE's (what I'm raising here)
  2. Simplify the desktop / browser configurations (the additional simplification proposed)

I'll make an issue with the changes you suggested @gtsiolis, then let's follow up as soon as we can after this PR with those changes to simplify/align the browser/desktop preferences.

@loujaybee
Copy link
Member

loujaybee commented Feb 1, 2022

Related to the above, I've seen that we @gtsiolis has raised: #7932, so I agree, let's proceed with this as it is, that raised issue will address the inconsistency I mentioned 🙏

@gtsiolis
Copy link
Contributor

gtsiolis commented Feb 1, 2022

@loujaybee:

ok

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 7, 2022

@loujaybee @gtsiolis @akosyakov
What should be the next step of this PR?

@akosyakov
Copy link
Member

akosyakov commented Feb 7, 2022

/werft run

👍 started the job as gitpod-build-pd-add-latest-jb.6

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

UI wise it looks good, but new flag should be respected for #referrer:jetbrains-gateway prefix too.

@iQQBot iQQBot requested review from a team February 7, 2022 08:40
@akosyakov
Copy link
Member

@iQQBot do you know why latest image still use CWM links? We never were able to rebuild latest images since Gateway plugin PR was merged?

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 7, 2022

@iQQBot do you know why latest image still use CWM links? We never were able to rebuild latest images since Gateway plugin PR was merged?

this is the latest image is not "latest", it build failed since Gateway plugin PR was merged

@akosyakov
Copy link
Member

this is the latest image is not "latest", it build failed since Gateway plugin PR was merged

Could you make sure that they are good? Together with @felladrin

I don't want to deploy something what brings old functionality.

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 7, 2022

Yes, I already ping him

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 7, 2022

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

👍 started the job as gitpod-build-pd-add-latest-jb.8

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 7, 2022

/werft run with-clean-slate-deployment

👍 started the job as gitpod-build-pd-add-latest-jb.9

Copy link
Contributor

@felladrin felladrin left a comment

Choose a reason for hiding this comment

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

Tested on all platforms, both stable and EAP.

Screenshot 2022-02-07 at 12 39 11

Screenshot 2022-02-07 at 12 30 34

Screenshot 2022-02-07 at 12 38 01

Screenshot 2022-02-07 at 12 48 29

Screenshot 2022-02-07 at 12 53 03

Screenshot 2022-02-07 at 13 15 28

Screenshot 2022-02-07 at 13 18 37

Screenshot 2022-02-07 at 13 22 53

Screenshot 2022-02-07 at 13 26 38

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 7, 2022

/assign @gitpod-io/engineering-webapp

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

@iQQBot UX changes look incrementally good, since this will add the checkbox to use the latest EAP version without affecting anything else. Cc @akosyakov @loujaybee

@gitpod-io/engineering-webapp Could someone take a closer look at the code changes?

🍊 🍊 🍊 🍊

In the next iteration, we could probably consider improving 🅰️ this settings section or 🅱️ the workspace start page.

For 🅰️ we could,

  1. Merge the IDEs into a single section
  2. Update card selector component and sidebar design #7932
  3. Use the same modality for the latest VS Code option and drop the extra Insiders option
  4. Update the Latest Release checkbox control so that this applies to all options
  5. Surface release version for each editor or IDE
  6. Introducing a checkbox control to set the preference for the desktop version, including the (un)pairing use cases like when a user selects an editor that is only available in desktop, etc.
  7. Mark VS Code as the default option so that we can fallback to it when users uncheck the desktop preference

For 🅱️ we could:

  1. Improve more actions button on the workspace start page when opening in desktop IDEs #6910

@gtsiolis gtsiolis requested a review from a team February 7, 2022 12:47
@akosyakov
Copy link
Member

akosyakov commented Feb 7, 2022

@gtsiolis It would be cool to have issues for your ideas if we don't have them yet. The team could pull it one by one.

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Many thanks!

I've looked at the code, and found one small thing, but otherwise this looks to me. I've also briefly tested as instructed and it seemed to work fine. 👍

Rubber-stamping, since this has already been approved a few times. ✅

@@ -190,6 +191,20 @@ export class IDEConfigService {
}
}

for (const [id, option] of Object.entries(newValue.ideOptions.options).filter(([_, x]) => x.latestImage)) {
try {
value.ideOptions.options[id].latestImage = await this.resolveImageDigest(option.latestImage!);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I would find it a bit "cleaner" to use a boolean like option.useLatestImage, and if it's true, set option.latestImage (just like option.resolveImageDigest and option.image above).

Here, we seem to use option.latestImage both as a "boolean" (i.e. filter(([_, x]) => x.latestImage)) above) and a resolved value .latestImage = await .... This looks a little bit dangerous (e.g. we might accidentally resolve the same image multiple times, or maybe forget to resolve it elsewhere, etc).

However, not blocking the review due to this. Please feel free to address in a follow-up PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

latestImage is a string not boolean, so filter(([_, x]) => x.latestImage) is equal than filter(([_, x]) => x.latestImage != null && x.latestImage !== '')
it no problem I think

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @iQQBot! Yes, I understand this, but my point was, I prefer something like this:

type Option = {
  resolveLatestImage: boolean;
  latestImage?: string;
}

if (option.resolveLatestImage) {
  option.latestImage = await resolve();
}

where the controlling condition is different from what's actually resolved.

Currently, the code seems to work like this:

type Option = {
  latestImage?: string;
}

if (option.latestImage) {
  option.latestImage = await resolve();
}

This makes it a bit unclear if an image has already been resolved or not, e.g.:

  • If the code is called multiple times, you might accidentally resolve this image multiple times
  • You cannot do if (!option.latestImage) { option.latestImage = await resolve(); }
  • Someone might accidentally "forget" to resolve the image in some cases (i.e. leave it as option.latestImage === "latest", because if (option.latestImage) looks "true")

@roboquat roboquat merged commit 22f346c into main Feb 8, 2022
@roboquat roboquat deleted the pd/add-latest-jb branch February 8, 2022 08:27
@jankeromnes
Copy link
Contributor

jankeromnes commented Feb 8, 2022

Agree with @gtsiolis that the IDE settings are becoming a little confusing:

Screenshot 2022-02-08 at 09 21 31

  • It says on top that all desktop IDEs are Beta, and near the bottom that only the JetBrains desktop IDEs are Beta (which is it? 👀)
  • [ ] Latest Release seems to apply to all IDE options, but reading the description it seems to be only relevant for JetBrains. As a user, I wonder what happens if I check "Latest Release" but select "None" or "VS Code" as desktop IDE 🤔

But filing issues and iterating on this sounds like a good path forward. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

9 participants