Generate Slack app Manifest File for Self-Managed Users (basic MVC)
This issue is part of the epic &1211 (closed).
Release notes
So far the GitLab for Slack app can only work with GitLab.com.
We want users on self-managed instances to also be able to use the GitLab for Slack app. This issue provides an MVC.
This change will allow self-managed users to create a copy of the GitLab for Slack app for themselves to install into their Slack workspace. The copy will be private to them and not publicly distributable. The steps to do this will be manual, and will also require manual steps to keep it updated if new features are released in the (canonical / publicly distributed Slack app directory version) GitLab for Slack app
Problem
The GitLab for Slack app can only work with GitLab.com. This is because the Slack app configuration requires specific hard-coded URLs, so these are all set to gitlab.com
.
We want self-managed instances to be able to also use the GitLab for Slack app.
Solution
To support Self-Managed users we can guide them through creating their own copy of the GitLab for Slack app from a manifest file.
Slack apps can be created as one-off apps that are installed into one Slack workspace only, and not distributable through the Slack app directory. These will be the type of Slack apps that self-managed customers will create for themselves.
As a copy of the (canonical / publically distributed Slack app directory version) GitLab for Slack app, it will functionally be the same.
Their GitLab instance will generate this manifest file for them. The manifest file will be identical to the (real) GitLab for Slack app with the instance's own URLs used instead of gitlab.com
URLs.
Limitation
In this iteration, GitLab will only generate the manifest for them, but not provide any automated way of installing (or, later updating) their apps on their behalf. Instead, the process will involve a degree of manual configuration on their behalf which we can document or guide them through as best we can.
A future iteration #401920 could bring some degree of automation to the process.
Proposal
This Slack document has information about creating Slack apps from a manifest file. The manifest file is something the GitLab instance will provide. The (canonical / publically distributed through the Slack app directory) GitLab for Slack app's manifest will be the template for this file.
-
backend Allow the GitLab for Slack app configurable by self-managed instances (currently we only allow it to be configurable on Gitlab.com):
- Change our GitLab for Slack app integration from being visible only to GitLab.com to being visible if the Slack app has been enabled in the admin (updating logic here).
- Allow the Slack application admin section to display for self-managed by removing this line.
- backend Add a class that will generate a GitLab for Slack app manifest as YAML, using our GitLab for Slack app's manifest as the template, substituting URLs with the GitLab instance's host. We will expose the manifest in the instance admin section in the next step.
-
frontend (these steps have not be approved by UX yet) Update the existing instance admin's Slack application section (
/admin/application_settings/general
expand Slack application):- Remove the line that says This option is only available on GitLab.com.
- Change section heading from Slack application to GitLab for Slack app
- Add instructions for how to create a new Slack app:
- Add a link for them to create a new Slack app using their bespoke manifest YAML through a special sharing link https://api.slack.com/reference/manifests#sharing_manifests.
- Instruct them that once they have created the new Slack app, to enter the secrets into the form fields.
- If they have filled out the secrets, we could present some instructions on how to update their existing Slack app from the manifest (which they would do any time we released new features for the GitLab for Slack app integration that requires a newer version of the Slack app). This will be a very manual process and would involve them copying the manifest their instance generates for them, they would then update the Slack app they had created earlier with that new manifest.
- documentation Update our Slack developer guide to ensure that our developers always update the manifest that GitLab generates with any changes made to our Slack app.
Documentation
https://docs.gitlab.com/ee/user/project/integrations/gitlab_slack_application.html has to be updated.
See #28164 (comment 880482072).
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.