Purge all relevant Slack data when Slack app is uninstalled
This issue came out of this discussion #384226 (comment 1241527987).
When the GitLab for Slack app is completely uninstalled from a workspace we should purge all related Slack-related data (ChatName
, SlackIntegration
at time of writing).
We would subscribe to the app_uninstalled
event https://api.slack.com/events/app_uninstalled and handle it within Integrations::SlackEventService
.
This request was also made by the Slack app Review team on 24 Jan 2023:
It looks like when the app is currently uninstalled, the connection still remains within the web app. I believe this can be handled by subscribing to the
app_uninstalled
event, mentioned here: https://api.slack.com/events/app_uninstalled.
Availability & Testing
Risks include
- Accidentally purging a ChatName for a different workspace
- Accidentally leaving orphaned project integrations
Suggestions:
- feature tests that mock the Slack subscription and validate that the above do not happen.
Edited by Sean Gregory