Skip to content

server changes to enable new JB integration #7711

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 4 commits into from
Jan 24, 2022
Merged

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Jan 20, 2022

Description

It is an extract from #7362 with changes which should be deployed by @gitpod-io/engineering-meta team before.

There are following changes:

  • add Gitpod plugin for JB Gateway as oauth2 client
  • getOwnerToken method is added to allow Gitpod plugin to fetch it for SSH auth
  • added a new referrer prefix referrer:<client>(:<IDE>)?, right now only jetbrains-gateway is supported, so one can start intellij directly by prefixing URL with gitpod.io#referrer:jetbrains-gateway:intellij/. Referrer prefix is also used to track clients access, so later can be reused for any derivative of VS Code for instance.
  • add optional installation steps for desktop IDEs in order to open desktop links

Related Issue(s)

Related to #7362, fixes #7525

How to test

Screenshot 2022-01-21 at 12 21 17

Release Notes

NONE

Documentation

/werft analytics=segment|TEZnsG4QbLSxLfHfNieLYGF4cDwyFWoe

@gtsiolis gtsiolis requested review from a team January 20, 2022 09:52
@akosyakov akosyakov marked this pull request as draft January 20, 2022 09:53
@gtsiolis gtsiolis removed request for a team January 20, 2022 09:53
@akosyakov
Copy link
Member Author

We need one more change to the dashboard before it is complete.

@roboquat roboquat added size/XXL and removed size/XL labels Jan 21, 2022
@codecov
Copy link

codecov bot commented Jan 21, 2022

Codecov Report

Merging #7711 (ac97da9) into main (9a7411f) will decrease coverage by 1.25%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7711      +/-   ##
==========================================
- Coverage   11.54%   10.28%   -1.26%     
==========================================
  Files          20       18       -2     
  Lines        1169     1001     -168     
==========================================
- Hits          135      103      -32     
+ Misses       1031      897     -134     
+ Partials        3        1       -2     
Flag Coverage Δ
components-gitpod-cli-app 10.28% <ø> (ø)
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 ?

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

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 9a7411f...ac97da9. Read the comment docs.

@akosyakov akosyakov force-pushed the ak/jb_meta_changes branch 3 times, most recently from dcabf3e to ed54390 Compare January 21, 2022 11:07
@akosyakov akosyakov marked this pull request as ready for review January 21, 2022 11:29
@akosyakov
Copy link
Member Author

/hold

because I want to make sure that @gtsiolis review UI design for the ready page with VS Code Desktop

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 21, 2022

Looking at UX changes in this now! 👀

@iQQBot
Copy link
Contributor

iQQBot commented Jan 21, 2022

I set my default default to goland, and open a workspace, it jump to code with me page too quickly, I can't open it in vscode browser anymore

@akosyakov
Copy link
Member Author

akosyakov commented Jan 21, 2022

@iQQBot thanks for reviewing 🙏 it is a regression

@akosyakov
Copy link
Member Author

@iQQBot I pushed the fix, building now.

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.

Great work, @akosyakov! 🔮

It took me while to wrap my head around some new concepts we've introduced with the gateway, etc. Posted also a comment with questions and suggestions in this relevant discussion (internal). Cc @loujaybee

I've left below some comments that are mostly out of the scope of these changes. Feel free to tackle these here if they make sense, create follow up issues if they seem important to track, or leave them here for future reference. 🏓

Regarding the UX of the new elements added in this page, I'm pasting below how this could look like with some small style changes. Let me know if a spec file with detailed spacing and color suggestions could help. Feedback is welcome! 🏀

BEFORE AFTER
Screenshot 2022-01-21 at 4 16 30 PM (2) Screenshot 2022-01-21 at 4 14 42 PM (2)

Approving to unblock merging but holding in case we need someone else to take a closer look at the code changes.

/hold

@@ -292,6 +303,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
<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>
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: This is out of the scope of the changes in this PR and we can tackle this in a follow up issue but the workspace ID now wraps after the changes in #7391. Using w-56 truncate classes from the context URL should suffice.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

praise: Thanks, @akosyakov! This has been bothering me for days. ✨

defaultDesktopIDE: "code-desktop"
desktopIDEs: ["code-desktop"]
installationSteps: [
"Click <b>Allow</b> in the dialog by your browser.",
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: Do not know where to comment for this but thanks so much for triggering the dialog without the need to click the primary button here! ✨

desktopIDEs: ["code-desktop"]
installationSteps: [
"Click <b>Allow</b> in the dialog by your browser.",
"If you don't see the dialog, make sure you have <a target='_blank' class='gp-link' href='https://code.visualstudio.com/download'>VS Code</a> installed on your machine.",
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: Couldn't find where to comment about this and it's probably out of the scope of the changes in this PR but it could be more clear and useful now to change the title here to the suggestion from #6270 (comment) or make the action more clear and separate it from the state.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok change phase to Running and added Opening Workspace... as status description. I also replaced Opening IDE... with Opening Workspace.... I don't think everybody know what IDE stands for.

Copy link
Contributor

@gtsiolis gtsiolis Jan 21, 2022

Choose a reason for hiding this comment

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

I'd expect the Opening Workspace ... heading to be closer to the instructions and the action buttons, below the workspace entry as seen in the AFTER screenshot in #7711 (review), since this heading is more related to the actions than the actual lifecycle state of the workspace.

However, I think the current approach is also ok and not worth holding this back for now. We can always discuss this in depth in #6602. Cc @loujaybee

PROPOSED CURRENT
150544836-21046bd0-d70b-4b02-93aa-df0529414128 (1) Screenshot 2022-01-21 at 6 51 32 PM (2)

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 82197cf8c9960682266aa9d35a3cb492596c244c

@roboquat roboquat removed the lgtm label Jan 21, 2022
@akosyakov
Copy link
Member Author

akosyakov commented Jan 21, 2022

@gtsiolis I think I addressed all your feedback, could you have a look again please?
Screenshot 2022-01-21 at 17 16 31

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 21, 2022

UX looks great, @akosyakov! 🏁

Left one minor comment in #7711 (comment) but I don't think it's worth holding this PR back for that comment.

@loujaybee loujaybee linked an issue Jan 21, 2022 that may be closed by this pull request
@loujaybee
Copy link
Member

Linked: #7708 looks like this will resolve that issue now, correct?

@gtsiolis gtsiolis requested a review from a team January 24, 2022 07:50
@AlexTugarev
Copy link
Member

/lgtm

Changes to server look good. Just verified with how to test quickly.

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: dda2728b4cb024fdc7dc4dd59483947621d49fb3

@akosyakov
Copy link
Member Author

/unhold

@akosyakov
Copy link
Member Author

/approve

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akosyakov, AlexTugarev, gtsiolis, iQQBot

Associated issue: #7362

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@roboquat roboquat merged commit f3ed7e4 into main Jan 24, 2022
@roboquat roboquat deleted the ak/jb_meta_changes branch January 24, 2022 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add JetBrains Gateway download "ready page" Create "Open In Gitpod (JetBrains)" button
6 participants