Skip to content

[dashboard] Use public-api to CreateTeams #14232

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
Nov 1, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Oct 27, 2022

Description

Related Issue(s)

The feature is enabled behind a feature flag.

How to test

  • Use preview
  • Create a new team (with DevTools open)
  • Observe the request goes to api.<domain>
  • Validate create workflow continues to behave the same

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-mp-papi-create-teams-dashboard.1 because the annotations in the pull request description changed
(with .werft/ from main)

@easyCZ
Copy link
Member Author

easyCZ commented Oct 27, 2022

/werft run

👍 started the job as gitpod-build-mp-papi-create-teams-dashboard.2
(with .werft/ from main)

@easyCZ easyCZ force-pushed the mp/papi-create-teams-dashboard branch from e538ed1 to 77cb88e Compare October 30, 2022 20:34
@roboquat roboquat added size/XL and removed size/L labels Oct 30, 2022
@easyCZ easyCZ changed the base branch from main to mp/papi-create-teams-impl October 30, 2022 20:34
@easyCZ
Copy link
Member Author

easyCZ commented Oct 30, 2022

/werft run with-clean-slate-deployment=true with-preview=true

👍 started the job as gitpod-build-mp-papi-create-teams-dashboard.5
(with .werft/ from main)

@easyCZ
Copy link
Member Author

easyCZ commented Oct 31, 2022

/werft run with-clean-slate-deployment=true with-preview=true

👍 started the job as gitpod-build-mp-papi-create-teams-dashboard.6
(with .werft/ from main)

@easyCZ easyCZ force-pushed the mp/papi-create-teams-impl branch 3 times, most recently from ed3b89b to 43b063a Compare October 31, 2022 19:17
@easyCZ easyCZ force-pushed the mp/papi-create-teams-dashboard branch 3 times, most recently from d82144b to 4db10ad Compare October 31, 2022 19:55
Base automatically changed from mp/papi-create-teams-impl to main November 1, 2022 12:56
@roboquat roboquat added size/XL and removed size/L labels Nov 1, 2022
@easyCZ easyCZ force-pushed the mp/papi-create-teams-dashboard branch from 4db10ad to 75edf0e Compare November 1, 2022 13:04
@easyCZ easyCZ marked this pull request as ready for review November 1, 2022 13:04
@easyCZ easyCZ requested a review from a team November 1, 2022 13:04
@roboquat roboquat added size/L and removed size/XL labels Nov 1, 2022
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Nov 1, 2022
Comment on lines +17 to +28
const newToken = await getGitpodService().server.generateNewGitpodToken({
type: 1,
scopes: [
"function:getGitpodTokenScopes",
"function:getWorkspace",
"function:getWorkspaces",
"function:createTeam",
"function:joinTeam",
"function:getTeamMembers",
"function:getGenericInvite",
"function:listenForWorkspaceInstanceUpdates",
"resource:default",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it necessary to generate a new token here? Won't the user always have a suitable token when performing this action?

Copy link
Member Author

Choose a reason for hiding this comment

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

They have a cookie based session which is not compatible with the AccessToken based auth on Public API. I agree this is not great, or pretty, but it's a temporary solution until we have first class Access Tokens.

@easyCZ easyCZ force-pushed the mp/papi-create-teams-dashboard branch from 75edf0e to 1c03bb2 Compare November 1, 2022 13:38
@easyCZ easyCZ requested a review from andrew-farries November 1, 2022 13:39
@easyCZ
Copy link
Member Author

easyCZ commented Nov 1, 2022

Thanks for the swift review @andrew-farries!

@easyCZ
Copy link
Member Author

easyCZ commented Nov 1, 2022

/werft run

👍 started the job as gitpod-build-mp-papi-create-teams-dashboard.14
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-mp-papi-create-teams-dashboard.13 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat merged commit 295bda2 into main Nov 1, 2022
@roboquat roboquat deleted the mp/papi-create-teams-dashboard branch November 1, 2022 14:32
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Nov 2, 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/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement and use CreateTeam
3 participants