Slack: Error if user reinstalls GitLab Slack Application integration to different Slack workspace
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
A user can get into a situation where they cannot set up the GitLab Slack Application integration for a project, if that project has previously had the integration set up with a different Slack workspace from the one that the now want to use it with.
Steps to reproduce
-
Have two Slack workspaces available (you can use the Ecosystem Testing workspace).
-
Set up a GitLab Slack Application integration for a project, by visiting
https://gitlab.com/<PROJECT>/-/integrations/gitlab_slack_application/edit
. -
On the Slack OAuth page in the next step, choose the first Slack workspace when prompted. Click
Allow
. -
Go back to the project's GitLab Slack Application integration page
https://gitlab.com/<PROJECT>/-/integrations/gitlab_slack_application/edit
and click the trash can icon to remove it. -
Now, on the same page, click the
Install Slack app
button. -
This time on the Slack OAuth page, choose the second Slack workspace from the select list at the top-right.
Click
Allow
. -
You will see a
422
Visiting the integration page https://gitlab.com/<PROJECT>/-/integrations/gitlab_slack_application/edit
will show that the integration was created, but the slash command will not work.
Video Walkthrough Reproducing the Bug
Workaround
- Visit https://gitlab.com/-/profile/chat_names and click the
Remove
button next to the row that corresponds to the same project. - Visit the integration page
https://gitlab.com/<PROJECT>/-/integrations/gitlab_slack_application/edit
. If the integration exists, click the trash icon to delete it (if it doesn't exist, skip this step). - Try to set up the integration for the project now and it should work.
What is the current bug behavior?
The integration does not work.
What is the expected correct behavior?
The integration should work.