-
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
Use AuthProviderService API in Dashboard – EXP-847 #19057
Conversation
0cdc898
to
b91164a
Compare
fc3be82
to
a8f060e
Compare
cad078c
to
fe333d2
Compare
fe333d2
to
b1e7bbb
Compare
}; | ||
} | ||
|
||
export function getScopesForAuthProviderType(type: AuthProviderType | string) { |
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.
This is all static information which can be derived from type. Pulling this into gitpod-protocol
enables to make use of it equally in dashboard and in server.
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.
We also need to upgrade setup.tsx CACHE_KEY
? "repo" | ||
: authProvider.type === AuthProviderType.GITLAB | ||
? "api" | ||
: ""; |
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.
the logic changed here, could you give more context about it?
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.
Nice catch!
I tried to fix the previous state, but didn't finish it apparently.
Old logic reads like this: If type is GitHub use GH scope, otherwise use GitLab scope. This is obviously wrong for BB and BBS.
The update reads like: this: if type is GitHub use GH scope, otherwise if type is GitLab use GL scope, otherwise use whatever is default for the provider type, which is known on server side.
I think that state is already a small fix. It would be great to verify though.
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.
I think that state is already a small fix. It would be great to verify though.
Do we have any account (like in 1Password) that could test those providers?
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.
BBS account in 1P, otherwise we can patch the deployment's secret in K8s to remove GitLab/Bitbucket from the default list. This gives us the change to create them in-App.
components/dashboard/src/data/auth-providers/update-org-auth-provider-mutation.ts
Show resolved
Hide resolved
Need to investigate the refresh page issue from #19057 (comment) |
979140a
to
133ccc2
Compare
#19057 (comment) was caused by AuthProviderClasses being missing in supported messages. It works fine now. |
#19057 (comment) is fixed as well. This was a bug in the shim. |
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.
Reported bugs fixed 🎉
|
/unhold |
Description
This PR make use of the gRPC based AuthProviderService in Dashboard. Most prominent components affected are: Login, Git Integrations for Orgs as well as in user space.
Summary generated by Copilot
🤖 Generated by Copilot at 0cdc898
This pull request updates the dashboard to use the public API for fetching and displaying auth provider descriptions. It also refactors some code to use the
AuthProviderType
enum and the newAuthProviderDescription
data type.Related Issue(s)
Fixes EXP-847
How to test
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold