Skip to content

WPB-18187: Delete app when removing a user from a team#5046

Merged
blackheaven merged 3 commits intodevelopfrom
gdifolco/WPB-18187-delete-app-endpoint
Feb 20, 2026
Merged

WPB-18187: Delete app when removing a user from a team#5046
blackheaven merged 3 commits intodevelopfrom
gdifolco/WPB-18187-delete-app-endpoint

Conversation

@blackheaven
Copy link
Contributor

@blackheaven blackheaven commented Feb 19, 2026

https://wearezeta.atlassian.net/browse/WPB-18187

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@blackheaven blackheaven requested a review from a team as a code owner February 19, 2026 13:09
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Feb 19, 2026
bindResponse (deleteTeamMember tid owner appIdObject) $ \resp -> do
resp.status `shouldMatchInt` 202

bindResponse (getApp owner tid appId) $ \resp -> do
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you also make sure that both StoredUser and StoredApp have been deleted at this point?

Copy link
Contributor

Choose a reason for hiding this comment

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

(maybe that would be a good unit test for UserSubsystem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done :)

@blackheaven blackheaven force-pushed the gdifolco/WPB-18187-delete-app-endpoint branch from 61cc5d7 to 4482f59 Compare February 19, 2026 15:11
@blackheaven blackheaven requested a review from fisx February 19, 2026 17:02
Copy link
Contributor

@fisx fisx left a comment

Choose a reason for hiding this comment

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

now that i understand the problem and context better, i can see a better solution:

  • move user deletion login to wire-subsystems (especially the part that is called by galley when deleting teams).
  • make a one-line modification to user deletion to make sure that if user is an app, the app table in postgres will also be cleaned up.

but i also realize now that moving stuff to wire-subsystems is not always trivial... :)

the fact that this slows down delete operations is not a big deal either, since deletion is not a very common operation and should only be a small part of brig's and galley's load.

so this is good, i want this solution. :shipit:

@blackheaven blackheaven requested review from a team as code owners February 20, 2026 11:12
@blackheaven blackheaven changed the title WPB-18187: Add App deletion endpoint WPB-18187: Delete app when removing a user from a team Feb 20, 2026
@blackheaven blackheaven merged commit e4a9489 into develop Feb 20, 2026
10 checks passed
@blackheaven blackheaven deleted the gdifolco/WPB-18187-delete-app-endpoint branch February 20, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants