Prepare development environment for testing copies of the Slack apps
Background
Initial notes from &7729 (comment 875803434):
Prepare our GitLab development environment.
- We can choose which app to use through the
slack_app_*settings inapplication_settings.- This could be just some notes on how to switch the app correctly, or maybe we could also write a quick Rake task if we expect to switch between apps often.
Proposal
Figure out how to get the Classic app copies fully working which we created in #355990 (closed).
This means we should be able to:
- "Install" the apps in the Ecosystem workspace (this involves the OAuth flow, and the creation of a
SlackIntegrationrecord in GitLab) - Authorize our Slack users through the slash command (this involves the creation of a
ChatNamerecord in GitLab). - Perform actions through the slash command.
It's probably easiest to use Gitpod for this, or maybe we can also use Staging as discussed in #355990 (closed).
At the very least we need to change these application_settings:
-
slack_app_enabled:true -
slack_app_id:App IDfrom Slack settings. -
(encrypted_)slack_app_secret:Client Secretfrom Slack settings. -
(encrypted_)slack_app_verification_token:Verification Tokenfrom Slack settings.
We could change these manually, or ship some code to switch between apps dynamically (restricted to dev and maybe staging, maybe also with a FF). It should be fine to commit the secrets in our code, since these apps are only available in the Ecosystem workspace.
Once the Classic app flow is working, we can start updating one of the app copies to GBP:
- Make sure both copies are "installed" in the Ecosystem workspace.
- Change
application_settingsaccordingly.
- Change
- Update the second copy to GBP:
- Initiate the update using the
Update to Granular Scopeslink in the sidebar. - Check the migration guides, I think initially we only need the
commandsscope. - Take notes about other changes that are needed (if any).
- Take notes how this looks from the user perspective in the Ecosystem workspace.
- Does the app need to be "reinstalled" in the workspace?
- Does the user see any indication at all that the app has changed?
- Does the slash command still work after the upgrade, or before/after the "reinstall" step?
- Initiate the update using the
documentation task to update https://gitlab.com/gitlab-org/ecosystem-stage/integrations/team/-/blob/main/integrations/slack.md