Skip to content

Allow users to delete teams #5066

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

Closed
gtsiolis opened this issue Aug 5, 2021 · 18 comments · Fixed by #5966
Closed

Allow users to delete teams #5066

gtsiolis opened this issue Aug 5, 2021 · 18 comments · Fixed by #5966
Assignees
Labels
component: dashboard feature: teams and projects [DEPRECATED] Please, use feature: organizations or feature: projects labels instead. team: webapp Issue belongs to the WebApp team type: improvement Improves an existing feature or existing code

Comments

@gtsiolis
Copy link
Contributor

gtsiolis commented Aug 5, 2021

Problem to solve

The upcoming changes for Teams & Projects do not include a way to delete a team.

Proposal

In the long run, having team settings could be interesting and also a good place to surface a team deletion action. However, a minimum viable change (MVC) for this could be to a) add a more actions button next to the primary action button on the team page (projects list) and b) trigger a confirmation modal to delete a team explaining any potential side-effects.

BEFORE AFTER (1) AFTER (2)
BEFORE AFTER AFTER-1

Drawbacks

The only drawback of this MVC proposal is that the delete action is only visible after adding at least one project. Alternatively, we could surface the more actions buttons also on the empty state of the team page next to the empty state action buttons.

@ajhalili2006
Copy link

Just a question: Can instance admins delete any teams, even without any projects, or do they need to manually delete it at database-side?

@gtsiolis
Copy link
Contributor Author

gtsiolis commented Aug 5, 2021

Hi @ajhalili2006! Currently this is not possible but it definitely makes sense to add this feature along the way. Added #5069 to track this feature request. 💯

We currently only surface Users and Workspaces on the Admin pages. We could consider surfacing Teams and Projects in the future as this could be helpful for debugging issues or helping out users. In the meantime, we're also considering a way to impersonate users as an instance admin, see #5068.

@svenefftinge
Copy link
Member

We should introduce a settings page, where the team can be deleted similarly to how an account is deleted.

@svenefftinge
Copy link
Member

see also #5067

@gtsiolis gtsiolis added feature: teams and projects [DEPRECATED] Please, use feature: organizations or feature: projects labels instead. and removed 🧑‍🚀 crew: teams and projects labels Sep 14, 2021
@JanKoehnlein JanKoehnlein added the team: webapp Issue belongs to the WebApp team label Sep 16, 2021
@JanKoehnlein
Copy link
Contributor

/schedule

@roboquat
Copy link
Contributor

@JanKoehnlein: Issue scheduled in the meta team (WIP: 0)

In response to this:

/schedule

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@laushinka
Copy link
Contributor

laushinka commented Sep 22, 2021

In the long run, having team settings could be interesting and also a good place to surface a team deletion action. However, a minimum viable change (MVC) for this could be to a) add a more actions button next to the primary action button on the team page (projects list) and b) trigger a confirmation modal to delete a team explaining any potential side-effects.

@gtsiolis Should we go with this proposal for now? Although it can indeed be confusing that a team is deleted on a projects page. One would expect that the dropdown would include options for the project..

@laushinka
Copy link
Contributor

I'll unassign myself for now while we decide on an approach 🙏🏽

@laushinka
Copy link
Contributor

Sorry accidentally clicked the close button 🤦🏻‍♀️

@laushinka
Copy link
Contributor

/assign @laushinka

@gtsiolis
Copy link
Contributor Author

Posting below the new design specs for team deletion flow. Cc @laushinka

FWIW, in contrast with the specs initially added in the isue description, the new specs follow the existing pattern of tabs to surface projects settings that currently include only team deletion action. Future additions to this project settings page could include team renaming (see #5067), project-level environement variables (see #4456), etc.

Things to take into account:

  1. There's already a similar deletion flow on personal accounts in /account which could include components or structure we may want to replicate.
  2. Added below two design variants for the deletion confirmation modal. I'm voting towards adding the text input and alert element long-term but feel free to go with the first variant if the second one could increase significantly the scope of these changes.
  3. The primary danger button (Delete Team) inside the confirmation modal should be enabled only if the user types the team's URL slug. Similar to what we do with the account deletion confirmation modal.
Project Settings Tab Project General Settings
Empty Settings
Project Deletion Modal (A) Project Deletion Modal (B)
Modal A Modal B

See design specs.

laushinka pushed a commit that referenced this issue Sep 28, 2021
@laushinka
Copy link
Contributor

A couple of follow-up questions:

  1. What do we want to happen when a team is deleted? Do we want to wipe it from the DB, or do a "soft" delete (not show it but stays in the DB)?
  2. Do we want to track the deletion event? @jakobhero

@svenefftinge
Copy link
Member

We for sure want to track that event. I think it would automatically be tracked as we are tracking all buttons?

Also deleting a team implies deleting its projects and the workspaces of all the associated users. So there needs to be a big warning around this, telling you about the impact including details of number of workspaces and projects that will be deleted.

@svenefftinge
Copy link
Member

What do we want to happen when a team is deleted? Do we want to wipe it from the DB, or do a "soft" delete (not show it but stays in the DB)?

I think they should be soft-deleted but we need to make after deletion they no longer block their name from being used again.

laushinka pushed a commit that referenced this issue Sep 29, 2021
@laushinka
Copy link
Contributor

We for sure want to track that event. I think it would automatically be tracked as we are tracking all buttons?

Also deleting a team implies deleting its projects and the workspaces of all the associated users. So there needs to be a big warning around this, telling you about the impact including details of number of workspaces and projects that will be deleted.

@svenefftinge After discussing with @AlexTugarev, for this first iteration it could be enough to have the team and its associated projects marked as deleted, because workspaces will be garbage-collected eventually.

@svenefftinge
Copy link
Member

Ok, good. I like making this a small improvement for now. FWIW pinned workspaces would never be deleted through GC, but I think this ok and provides some additional motivation to further improve this in a second round. :-)

@JanKoehnlein
Copy link
Contributor

@laushinka looks like our process doesn't support reopening issues that have been automatically closed. Please add another issue and PR for your fixes and schedule it in groundwork.

@laushinka
Copy link
Contributor

laushinka commented Oct 5, 2021

@JanKoehnlein Yes this issue was opened. I think it's correct to leave this one closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dashboard feature: teams and projects [DEPRECATED] Please, use feature: organizations or feature: projects labels instead. team: webapp Issue belongs to the WebApp team type: improvement Improves an existing feature or existing code
Projects
No open projects
Status: Needed for shipping 🚢
Development

Successfully merging a pull request may close this issue.

6 participants