Skip to content

[dashboard/self-hosted] add Setup page #3995

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 30, 2021
Merged

[dashboard/self-hosted] add Setup page #3995

merged 1 commit into from
Apr 30, 2021

Conversation

AlexTugarev
Copy link
Member

@AlexTugarev AlexTugarev commented Apr 19, 2021

how to test

  1. either use https://at-setup.staging.gitpod-dev.com/ or create a branch from this PR
    it should start out with a Welcome to Gitpod modal.
  2. create an OAuth Application on gitlab.com (built-in auth providers are disabled in e5c443a)
  3. use https://staging.gitpod-dev.com/<HOST>/callback as redirectURI on GitHub/GitLab.
  4. follow the instructions of the New Git Integration modal.
  5. expect to see the regular dashboard once you finished the setup of a git integration.
  6. be sure to test the environment exclusively. remember, the setup process is a single user thing.

Screen Shot 2021-04-21 at 12 41 15

Screen Shot 2021-04-21 at 12 41 20

closes #3705
closes #3904
closes #3920

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 19, 2021

Looking at this 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.

Hey @AlexTugarev! This is dope. 🌟

Left some minor comments below, let me know what you think!

question: Does this only work with a self-hosted Gitlab installation?

  1. I couldn't set up a GitLab integration using GitLab.com. I was getting the following errors:
    • First time, I got redirected to /sorry ....
    • Second time, I run into: The redirect URI included is not valid.
  2. I couldn't set up a GitHub integration using GitHub.com. Go redirected to an empty page with a URL like /complete-auth?message=error:eyJlcnJvciI6 ...

Regarding UX, there's a lot of room for improvements on the first screen but this should be fine for this iteration. For example, we could use the first screen to promote a couple of features or prompt for an upgrade to a paid tier.

@AlexTugarev
Copy link
Member Author

@gtsiolis, I just realized, you didn't went through the flow, because the hot to test from above was incomplete.

For preview environment we need to remove the k8s namespace from the redirect URL when testing, so it becomes: https://staging.gitpod-dev.com/<HOST>/callback

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 19, 2021

For preview environment ...

Ah, ok. Trying again now. ➿

@AlexTugarev
Copy link
Member Author

@gtsiolis, please ping me if you need help with the test setup.
I've already tackled your comments but as it would interrupt your testing, I'm waiting to push.

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.

Alright! /cc @AlexTugarev

  1. GitLab integration works as expected. ✅
  2. GitHub integration returns to the New Integration modal and prompts the user to activate the integration. ❌

Other notes:

  1. The integration is being added on the Git Providers list regardless if the integration activation failed.
  2. The integration is being exposed to the login options regardless id the integration activation failed.

question: Is it not possible to add a Bitbucket integration on a self hosted Gitpod instance?

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Apr 19, 2021

GitLab integration works as expected. ✅

Thanks for verifying @gtsiolis!

GitHub integration returns to the New Integration modal and prompts the user to activate the integration. ❌

Could you explain how you did that?
After the initial setup, i.e. creating & authorizing with git/identity provider, you should be redirected to the dashboard.

Once the setup is done, you should not be able to see the Setup page again.

The integration is being added on the Git Providers list regardless if the integration activation failed.

That should only be true for the owner.

The integration is being exposed to the login options regardless id the integration activation failed.

That should never be the case.

@gtsiolis
Copy link
Contributor

@AlexTugarev when I clicked Activate Integration after entering the Client ID and Client Secret I got redirect back to the same modal.

On the GH side, maybe I did something wrong but I tried entering both of the following as Homepage URLs:

  1. https://at-setup.staging.gitpod-dev.com/
  2. https://staging.gitpod-dev.com/

Regarding, the login page this is what I see when the GH activation fails on /integrations and /login:

Integrations Login
image image

@AlexTugarev
Copy link
Member Author

@gtsiolis, I just checked with GItHub OAuth apps for gitpod-dev environments.

If you chose to integrate with github.com OAuth app of yours, please configure the following redirect URI. Note that the k8s namespace is missing.
https://staging.gitpod-dev.com/auth/github.com/callback

There is a reason behind that change of redirect URI and it only affects preview environments. In theory you could just reuse the suggested URL from that modal, but we have a special case, in which we reuse a single OAuth app for all preview deployments, thus need to distribute the requested based on k8s in the upstream proxy for preview environments.

From #3995 (comment), I can learn two things:

  1. the urls might be wrong
  2. the error OAuth error message should be integrated into the integrations modal, the same way as we now do for the signup

@AlexTugarev
Copy link
Member Author

Regarding UX, there's a lot of room for improvements on the first screen but this should be fine for this iteration. For example, we could use the first screen to promote a couple of features or prompt for an upgrade to a paid tier.

@gtsiolis that's two separate thing, right? feel free to make suggestions. I was counting on you to get some input for the rough draft, which is basically made after the What's New modal.

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 20, 2021

Taking a look at this, round two! 🥊

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.

Thanks for all the updates here @AlexTugarev! 🥊

We're almost there! I still can't get the GH integration on but maybe it's because I'm missing something. Let me know what you think. 💭

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 20, 2021

FYI, I'm also working on improving the first step (currently a modal). Will open a follow-up issue once I have something ready-for-development. 🎨

@AlexTugarev
Copy link
Member Author

@gtsiolis, I figured why the unverified providers were visible on Login page, even for anonymous users.

There is indeed a variance in gitpod-com, which handles it completely different. I though fa72b25 would just make sense to introduce in core as well, which changes the bits to hide not verified from the dashboard (as filtered API result)

In general, we might need to convert the compile time variance to deployment configuration, to support both cases.

@AlexTugarev AlexTugarev requested review from csweichel and removed request for geropl April 21, 2021 07:29
@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 21, 2021

I figured why the unverified providers were visible on Login page, even for anonymous users.

Thanks for checking @AlexTugarev! Do you think it's worth opening a follow up issue for this? 🏓

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Apr 23, 2021

Do you think it's worth opening a follow up issue for this? 🏓

@gtsiolis, that's solved already.

@AlexTugarev AlexTugarev requested a review from geropl April 28, 2021 10:36
@geropl
Copy link
Member

geropl commented Apr 30, 2021

/werft run

👍 started the job as gitpod-build-at-setup.10

@geropl
Copy link
Member

geropl commented Apr 30, 2021

/werft run

👍 started the job as gitpod-build-at-setup.11

@geropl
Copy link
Member

geropl commented Apr 30, 2021

/werft run

👍 started the job as gitpod-build-at-setup.12

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants