mattermost-plugin-gitlab icon indicating copy to clipboard operation
mattermost-plugin-gitlab copied to clipboard

No messages for some personal notifications like comments and modifications of issues/MR

Open cpaulik opened this issue 4 years ago • 13 comments

We've just setup Mattermost on our self hosted Gitlab instance and the connection seems to work fine.

  • Gitlab 12.9.2
  • Mattermost 5.20.2

While I do get the personal daily summary and also the status bar in the sidebar some critical features seem to not be working:

  • We can see no messages in Gitlab if someone comments on or modifies one of your merge requests/issues

It does however work if there is a direct @ mention in Gitlab.

cpaulik avatar Apr 03 '20 10:04 cpaulik

Hi @cpaulik, if configured correctly, commenting on issues and merge requests should work fine. Can you recheck what events are triggered? If everything is OK with the configuration, can you please upload the error logs?

iomodo avatar Apr 11 '20 13:04 iomodo

In the log I get the following when I e.g. somebody comments on a issue I have created:

{"level":"info","ts":1586866092.0062203,"caller":"mlog/sugar.go:19","msg":"new msg","plugin_id":"com.github.manland.mattermost-plugin-gitlab","message":"[root](https://gitlab.vandersat.com/root) commented on your issue [cpaulik/todos#4](https://gitlab.vandersat.com/cpaulik/todos/-/issues/4#note_29234)","from":"root"}

But the gitlab bot stays silent.

If however a direct @mention is involved I see the following in the logs:

{"level":"info","ts":1586866235.90824,"caller":"mlog/sugar.go:19","msg":"new msg","plugin_id":"com.github.manland.mattermost-plugin-gitlab","message":"[root](https://gitlab.vandersat.com/root) mentioned you on [cpaulik/todos#4](https://gitlab.vandersat.com/cpaulik/todos/-/issues/4#note_29235):\n>@cpaulik Now with direct mention","from":"root"}

and the gitlab bot also shows it:

image

cpaulik avatar Apr 14 '20 12:04 cpaulik

@cpaulik I can't reproduce this. Are there any error logs worth noticing? When commented on an issue, notification is not delivered to the issue assignees as well as to the issue author, right? Are channel notifications also missing?

iomodo avatar Apr 15 '20 16:04 iomodo

I've assigned myself to the issue and commented again and there is nothing from the gitlab bot. Log output is still only this:

{"level":"info","ts":1587039483.038633,"caller":"mlog/sugar.go:19","msg":"new msg","plugin_id":"com.github.manland.mattermost-plugin-gitlab","message":"[root](https://gitlab.vandersat.com/root) commented on your issue [cpaulik/todos#4](https://gitlab.vandersat.com/cpaulik/todos/-/issues/4#note_29441)","from":"root"}

Subscribing to a issue_comments in a channel works.

I get the following two entries in the log

{"level":"info","ts":1587039713.2692857,"caller":"mlog/sugar.go:19","msg":"new msg","plugin_id":"com.github.manland.mattermost-plugin-gitlab","message":"[root](https://gitlab.vandersat.com/root) commented on your issue [cpaulik/todos#4](https://gitlab.vandersat.com/cpaulik/todos/-/issues/4#note_29442)","from":"root"}
{"level":"info","ts":1587039713.2696748,"caller":"mlog/sugar.go:19","msg":"new msg","plugin_id":"com.github.manland.mattermost-plugin-gitlab","message":"[cpaulik/todos](https://gitlab.vandersat.com/cpaulik/todos) New comment by [root](https://gitlab.vandersat.com/root) on [#4 Test issue for mattermost integration](https://gitlab.vandersat.com/cpaulik/todos/-/issues/4#note_29442):\n\nTest comment with subscription in channel","from":"root"}

Just to make sure. I've not configured anything special for the personal notifications other than the webhook on the project.

We are using mattermost included with Gitlab and we use Gitlab SSO

cpaulik avatar Apr 16 '20 12:04 cpaulik

I don't see any error messages that seem relevant. Only one warning from this plugin but that seems to be clear

{"level":"warn","ts":1586876485.9917228,"caller":"mlog/sugar.go:27","msg":"event type not implemented","plugin_id":"com.github.manland.mattermost-plugin-gitlab","type":"Wiki Page Hook"}

cpaulik avatar Apr 16 '20 12:04 cpaulik

Hi thanks for use this plugin!

It's by design: if you are the creator of an event, you don't need to receive a notif about it :shrug:

https://github.com/mattermost/mattermost-plugin-gitlab/blob/master/server/webhook/webhook.go#L60

manland avatar Apr 16 '20 16:04 manland

Hi thanks for use this plugin!

It's by design: if you are the creator of an event, you don't need to receive a notif about it 🤷

https://github.com/mattermost/mattermost-plugin-gitlab/blob/master/server/webhook/webhook.go#L60

There are two Users involved in my test here. One is cpaulik and the other is root. In any case it also does not work with other users comments. I’ve tested it with a colleague before.

cpaulik avatar Apr 16 '20 17:04 cpaulik

@cpaulik I'm not sure what might be the problem here. My suggestion would be to:

  1. re-check that comments is selected here
  2. run /gitlab settings notifications on

If you still have problems reach me out at the https://community.mattermost.com, let's schedule 1-on-1 I'll try to debug.

iomodo avatar Apr 22 '20 15:04 iomodo

@cpaulik @iomodo

Did you manage to solve the issue? I'm facing almost the same problem, except that in my case even the direct @ mentions don't work. I do get relevant information in Mattermost server logs (and no corresponding errors over there):

{"level":"info","ts":1590515726.7182753,"caller":"mlog/sugar.go:19","msg":"new msg","plugin_id":"com.github.manland.mattermost-plugin-gitlab","message":"[root](https://gitlab.[redacted].com/root) commented on your merge request [[redacted]/[redacted]#1](https://gitlab.[redacted].com/[redacted]/[redacted]/-/merge_requests/1#note_25804)","from":"root"}

but no notifications in Mattermost client. I've got all the triggers checked in the Gitlab webhooks (including "Comments"). I did /gitlab connect. I did /gitlab settings notifications on. I've checked with several users mentioning me, commenting my MRs, assigning me. When I subscribe (/gitlab subscribe ...) the channel to a whole group/project then notifications start coming up. But currently I'm not interested in this functionality (as far as I understand – Mattermost notfications for everything happening in a whole project were already implemented in Gitlab). I'm interested in the personalized notifications, as listed under Features of this plugin:

Notifications - get a direct message in Mattermost when someone mentions you, requests your review, comments on or modifies one of your merge requests/issues, or assigns you on GitLab

This is the functionality that a lot of users have been asking about since we moved to Gitlab. And it seems that it's supposed to be a core functionality of this plugin. Isn't it connected to the issue #126?

olafik avatar May 26 '20 18:05 olafik

@olafik There was no solution found yet since I did not have the time to do more in depth debugging.

cpaulik avatar May 27 '20 09:05 cpaulik

Having a similar issue, I'm only getting some notifications for some subscriptions, for example, I get "Closed ticket" notifications just fine, but do not get "opened ticket" notifications, despite the mattermost.log clearly printing out the message that is supposed to be posted saying a ticket has been opened. This example is on a private repo, it seems to be reliably printing all notifications with the repos that are not private.

Edit: More specifically, the "opened ticket" I've described is on a reopened ticket, seems to be printing out brand new tickets. But my non-private repos do give notification for reopened tickets, the private ones do not. Another type of notification that doesn't work for one and not the other: commenting on a ticket.

deanf1 avatar Feb 04 '21 19:02 deanf1

Hi,

I am experiencing something really odd on my gitlab/MM integration (gitlab version : 15.7.2-ee, Mattermost Version: 7.5.2, Database Schema Version: 95, Database: postgres).

With a particular user, notifications work and she gets the "xxx commented on your issue yyy" in the gitlab plugin channel on the issue she created. On the merge request linked to the issue, I receive the mentions (when directed to me), she does not (when directed to her). Some other issues she did not created also have this behaviour. I have looked at the logs, and the message log is recorded.

I gave her the same role and project scope as me for testing purpose, and still have no clue why I get the notification and she does not.

@iomodo I would gladly make myself available for a 1-to-1 debug session if that is still an option (and if it is necessary), I can impersonate the user and reproduce the issue easily.

MehdiNabiClapLabs avatar Jan 11 '23 18:01 MehdiNabiClapLabs

Hey @MehdiNabiClapLabs thanks for the feedback. Unfortunately I don't have the cycles right now. @hanzei, @levb could you folks take a look?

iomodo avatar Jan 12 '23 11:01 iomodo