Skip to content

Fix gateway referrer won't set default IDE #9624

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
Apr 29, 2022
Merged

Fix gateway referrer won't set default IDE #9624

merged 1 commit into from
Apr 29, 2022

Conversation

mustard-mh
Copy link
Contributor

@mustard-mh mustard-mh commented Apr 28, 2022

Description

Fix gateway referrer won't set default IDE

Related Issue(s)

Fixes #

How to test

  1. Configure Gateway with prev env host
  2. Open workspace via Gateway
  3. Open with this URL to do same thing like step1 step2 https://hw-fix-gw-ide.staging.gitpod-dev.com/#referrer:jetbrains-gateway:pycharm/https://github.com/gitpod-io/template-python-flask
  4. User setting should be the one you choose in gateway
  5. No onboarding Modal in /workspaces page

We need to do other tests like

  1. won't register just access <host>/#<repo> to see if workspace starts with code

Release Notes

NONE

Documentation

@mustard-mh mustard-mh requested a review from a team April 28, 2022 13:59
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Apr 28, 2022
@akosyakov
Copy link
Member

I wonder whether we can do it somehow differently? With a specific flag that a user explicitly configured IDE somehow? I afraid that someone will reintroduce and break again.

@mustard-mh
Copy link
Contributor Author

mustard-mh commented Apr 28, 2022

I wonder whether we can do it somehow differently? With a specific flag that a user explicitly configured IDE somehow? I afraid that someone will reintroduce and break again.

Deal with adding a comment. internal chat

@felladrin
Copy link
Contributor

To "Configure Gateway with prev env host" we need to recompile the Gateway plugin locally, @mustard-mh?

@mustard-mh
Copy link
Contributor Author

mustard-mh commented Apr 28, 2022

To "Configure Gateway with prev env host" we need to recompile the Gateway plugin locally, @mustard-mh?

@felladrin no, you can done this step by using /#referre prefix, they are doing the same thing i.e https://hw-fix-gw-ide.staging.gitpod-dev.com/#referrer:jetbrains-gateway:pycharm/https://github.com/gitpod-io/template-python-flask

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.

Working great!

I've tested it also using Goland (JetBrains Gateway Link).
With a clean account on this preview environment, I've accessed the JetBrains Gateway Link, authorised GitHub access and JetBrains access, and the Gateway opened the link correctly on Goland.

image

Then, I closed the workspace and checked my Preferences, and confirmed it had Goland checked as my selected IDE.

image

And confirmed the Onboard Dialog was not being displayed on Workspaces page.

image

Then I accessed Pycharm link:

image

And then confirmed Goland was still selected on Preferences page, as it has been selected as my default editor by the previous step.

image


I've also confirmed, after deleting my account from that previous environment, that if I access this link (without refencing any JetBrains IDE), it will set my default editor as VS Code Browser.

image

image

image

But, in this case, as soon as I opened the Workspaces page, it displayed the Onboard dialog.
Was it expected when the user doesn't use #referrer?

image

@mustard-mh
Copy link
Contributor Author

I've also confirmed, after deleting my account from that previous environment, that if I access this link (without refencing any JetBrains IDE), it will set my default editor as VS Code Browser.

But, in this case, as soon as I opened the Workspaces page, it displayed the Onboard dialog.
Was it expected when the user doesn't use #referrer?

@felladrin This is expected, only /#referrer prefix will change user default ide when user has not selected an IDE yet.

open with prefix only /#, workspace-starter will look for IDE, not found (not set yet), go with default code.

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.

Then it's good to go!

@mustard-mh
Copy link
Contributor Author

@felladrin I remember as origin proposal, onboarding Modal in /workspaces will only work with

  • User is onboarding user(not select IDE)
  • No workspaces in /workspaces page

No idea why this changed, check condition 2 gone.

cc @andreafalzetti

@andreafalzetti
Copy link
Contributor

andreafalzetti commented Apr 28, 2022

@felladrin I remember as origin proposal, onboarding Modal in /workspaces will only work with

* User is onboarding user(not select IDE)

* No workspaces in `/workspaces` page

No idea why this changed, check condition 2 gone.

cc @andreafalzetti

I think during a refactor it got lost because it was not possible to start a workspace without the modal actually setting for the user their defaultIde, we can re-introduce the second condition if necessary cc @mustard-mh

@roboquat roboquat merged commit 1f3919e into main Apr 29, 2022
@roboquat roboquat deleted the hw/fix-gw-ide branch April 29, 2022 11:40
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/XS team: webapp Issue belongs to the WebApp team
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants