Setup testing copies of the Slack app in the Ecosystem workspace
Background
Initial notes from &7729 (comment 875803434):
Set up two copies of the Classic Slack app in the GitLab Ecosystem workspace.
- We can use these apps to develop and test any changes in GitPod or staging, isolated from anything else.
- I don't think we'll be able to use the apps in a local GDK, since Slack needs to make requests to the GitLab instance.
- I'm thinking two copies so we can keep one as Classic (to test backwards-compatibility), and the other one we can upgrade to GBP so we can see how that process works, and test new changes against this one.
- I think this will be a manual process, but we just need to copy all the relevant settings (OAuth scopes/URLs, slash command configuration).
Open question: Which GitLab instance can we use for these apps?
Slack needs to make requests to the GitLab instance, so a local GDK won't work.
I currently see two options:
- Staging
- The challenge here is that we'd need to change the global
application_settingsfor the Slack app, or ship some code to switch between different apps.- Changing
application_settingscould be acceptable, we'd probably have to discuss this in a Change Management issue.
- Changing
- The benefit is that the URLs are permanent, and all team members can easily access this instance.
- The challenge here is that we'd need to change the global
- Gitpod
- The challenge here is that the instance and URLs are not permanent, but maybe there is a way to setup a fixed URL / shared workspace.
- The benefit is that we can make arbitrary code changes and don't have to wait for deployments.
Maybe for this issue we can just start with staging URLs, and then figure this out as part of #355994 (closed). We can always change the URLs later as needed.
It should also be possible to communicate with multiple instances from the same app:
- For OAuth, we can add multiple allowed redirect URLs.
- For the slash command, we can define multiple ones for different instances, with their own request URLs (e.g.
/staging,/gitpod).
Proposal
- Make sure you have access to:
- GitLab Ecosystem workspace: https://app.slack.com/client/T0187G888CD
- Administration for the Slack app: https://api.slack.com/apps/A676ADMV5
- Create a first copy of the production app:
- We'll keep this one as Classic for testing, so let's call it
GitLab Testing (Classic). - Use the URL https://api.slack.com/apps?new_classic_app=1 to create the app.
- Manually copy all the settings from the production app. The important ones are in
Slash commandsandOAuth & Permissions. - Change the URLs (OAuth redirect URL, and slash command request URL) to staging.gitlab.com.
- Note down the app ID / administration URL in this issue. We'll also need the client ID and various secrets later, but we can always get those from the app administration.
- We'll keep this one as Classic for testing, so let's call it
- Create a second copy of the production app:
- We'll upgrade this one from Classic to GBP, so let's call it
GitLab Testing (GBP). - Repeat the process for the first app, again using the URL https://api.slack.com/apps?new_classic_app=1.
- We'll upgrade this one from Classic to GBP, so let's call it
Edited by Markus Koller