GitLab for Slack App - Projects don't automatically inherit from Group level settings
Summary
A customer experienced this issue [Internal link]
According to the documentation, one should be able to add GitLab for Slack app on the group level, and this should be inherited by all the projects. Testing this on .com worked fine for any existing projects I had under my Group and Slack notifications were sent to the slack channel selected.
However when a new project was added, the notifications do not go through, and Kibana logs shows the error as
undefined method `bot_access_token' for nil:NilClass
@token = slack_installation.bot_access_token
In these tests, we confirmed that default settings were left as is on the project level, so ptojects should have inherited from the group.
NB: After this merge request allowed this behaviour on the group level, perhaps updates are required on new projects to allow authentication?
Steps to reproduce
- Pick an existing Group with some projects and install GitLab for Slack app
- Select trigger notifications for Issues and add a test slack channel
- Check to make sure the projects have this inherited integration.
- Create an issue and confirm if notifications are sent
- Create new projects and repeat creating an issue, check logs and confirm if the notification is sent to Slack.
Example Project
-
Project link - Failed notification
-
Old project with successful notification - Kibana
Customer Impact/Feedback
-
The workaround would require consistently having to manually install the Slack App for projects else it breaks workflow.
-
When the failure occurs, there is no clear error message as to why, the notification is just not sent. We need better error handling for such scenarios when the integration is not complete
-
Question:
Also, since it appears that GitLab does not offer individual notifications for users via slack do you have any 3rd party integrations you recommend? We need users to get a personal slack notification/mention when they are added as a reviewer or mentioned in GitLab.
4.) When there are updates to the Slack App integration, it mentions one has to reinstall the app. How is this update requirement communicated?
What is the current bug behavior?
What is the expected correct behavior?
Projects should automatically inherit the group settings and send slack notifications to channels if default settings are not changed on the project level.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)