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

Pull request review and Pull request review comments not working

Open ecylmz opened this issue 4 years ago • 20 comments

Hi,

Pull request review and Pull request review comments not working for us. We have following error log on mattermost:

{"level":"warn","ts":1605265921.2438548,"caller":"mlog/sugar.go:27","msg":"Error webhook post","plugin_id":"github","error":"SqlPostStore.Save: İleti kaydedilemedi., pq: value too long for type character varying(26)"}

İleti kaydedilemedi means The message could not be saved

This error maybe not related to this plugin.

My environment:

Webhook payload: https://gist.github.com/ecylmz/183cabab78939dc8bc0403b9bb7419b9

GitHub Plugin: (github - 2.0.0)

Mattermost server:

Version: 5.26.0
Build Number: 5.26.2
Build Date: Fri Sep  4 02:04:34 UTC 2020
Build Hash: bed73717c54643abc1e2211e794d59a25b2cc823
Build Enterprise Ready: true
DB Version: 5.26.0

postgres (PostgreSQL) 12.4 (Debian 12.4-1.pgdg100+1)

What do you think could cause this error?

Thanks.

ecylmz avatar Nov 13 '20 11:11 ecylmz

Hi @ecylmz,

Thanks for the report. Would you be open on installing a custom version with additional logging? That would help with debuggin.

hanzei avatar Nov 13 '20 12:11 hanzei

Would you be open on installing a custom version with additional logging?

Of course! How can i install the custom version you mentioned?

ecylmz avatar Nov 13 '20 14:11 ecylmz

Could you please DM me on the Mattermost Community Server?

hanzei avatar Nov 17 '20 13:11 hanzei

I can't join any team. image

If it is not a problem for you, you can send the instructions by mail. my email: emrecan [at] ecylmz.com

ecylmz avatar Nov 17 '20 14:11 ecylmz

@ecylmz Thanks for the report. We are looking into this.

Meanwhile I've send you the build via mail.

hanzei avatar Nov 18 '20 11:11 hanzei

@ecylmz I updated the total users limit for the team. Can you try again?

jwilander avatar Nov 18 '20 17:11 jwilander

@hanzei When i install the plugin, i get the following error:

{"level":"error","ts":1605719042.3522623,"caller":"mlog/log.go:190","msg":"Unable to activate plugin","plugin_id":"github","error":"unable to start plugin: github: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","errorVerbose":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.\nunable to start plugin: github\ngithub.com/mattermost/mattermost-server/v5/plugin.(*Environment).Activate\n\tgithub.com/mattermost/mattermost-server/v5/plugin/environment.go:266\ngithub.com/mattermost/mattermost-server/v5/app.(*App).SyncPluginsActiveState\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:125\ngithub.com/mattermost/mattermost-server/v5/app.(*App).InitPlugins.func1\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:193\ngithub.com/mattermost/mattermost-server/v5/config.(*emitter).invokeConfigListeners.func1\n\tgithub.com/mattermost/mattermost-server/v5/config/emitter.go:36\nsync.(*Map).Range\n\tsync/map.go:333\ngithub.com/mattermost/mattermost-server/v5/config.(*emitter).invokeConfigListeners\n\tgithub.com/mattermost/mattermost-server/v5/config/emitter.go:34\ngithub.com/mattermost/mattermost-server/v5/config.(*commonStore).set\n\tgithub.com/mattermost/mattermost-server/v5/config/common.go:90\ngithub.com/mattermost/mattermost-server/v5/config.(*FileStore).Set\n\tgithub.com/mattermost/mattermost-server/v5/config/file.go:108\ngithub.com/mattermost/mattermost-server/v5/app.(*Server).SaveConfig\n\tgithub.com/mattermost/mattermost-server/v5/app/config.go:403\ngithub.com/mattermost/mattermost-server/v5/app.(*App).SaveConfig\n\tgithub.com/mattermost/mattermost-server/v5/app/config.go:432\ngithub.com/mattermost/mattermost-server/v5/app.(*App).EnablePlugin\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:354\ngithub.com/mattermost/mattermost-server/v5/api4.enablePlugin\n\tgithub.com/mattermost/mattermost-server/v5/api4/plugin.go:316\ngithub.com/mattermost/mattermost-server/v5/web.Handler.ServeHTTP\n\tgithub.com/mattermost/mattermost-server/v5/web/handlers.go:240\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\tgithub.com/NYTimes/[email protected]/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2041\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\tgithub.com/gorilla/[email protected]/mux.go:210\ngithub.com/getsentry/sentry-go/http.(*Handler).Handle.func1\n\tgithub.com/getsentry/[email protected]/http/sentryhttp.go:61\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2041\ngithub.com/rs/cors.(*Cors).Handler.func1\n\tgithub.com/rs/[email protected]/cors.go:219\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2041\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2836\nnet/http.(*conn).serve\n\tnet/http/server.go:1924\nruntime.goexit\n\truntime/asm_amd64.s:1373"}

@jwilander thanks. I joined.

ecylmz avatar Nov 18 '20 18:11 ecylmz

@hanzei I just installed the GitHub integration as part of an evaluation of Mattermost. My first test was with PRs since we have issues turned off in GitHub because we use Azure DevOps boards (as an aside I am able to get ADO to post into Mattermost using ADOs builtin Slack integration using a Matterport incoming webhook URL - nice!).

What is the status of this bug? I don't see any response to @ecylmz post from two weeks ago. Is this still a known issue awaiting resolution?

tforster avatar Dec 01 '20 17:12 tforster

https://github.com/mattermost/mattermost-plugin-github/pull/406 will he with debugging this issue further. @ecylmz has issues installing a custom version of this plugin, which will allow us to figure out what causes the above error.

@tforster Are you encountering the same issue?

hanzei avatar Dec 01 '20 17:12 hanzei

I believe so. I am using the cloud version of Mattermost. Just started with it so still very new. Can I install the custom version and see if that helps?

tforster avatar Dec 01 '20 18:12 tforster

Do any of the subscriptions work? I have subscribed to a repo in a channel for the default plus issue_comments and created a test issue in the repo. Nothing is showing up in Mattermost. The sidebar items for PRs, assignments and messages work but notifications are not showing up in a subscribed channel.

tforster avatar Dec 01 '20 19:12 tforster

I believe so. I am using the cloud version of Mattermost. Just started with it so still very new. Can I install the custom version and see if that helps?

Unfortunately you can't install a custom version of a plugin in MM cloud.

I have subscribed to a repo in a channel for the default plus issue_comments and created a test issue in the repo. Nothing is showing up in Mattermost.

Any specified list of features does overwrite the default list. Could you please try again with pulls,issues,creates,deletes,issue_comments?

hanzei avatar Dec 03 '20 10:12 hanzei

I reissued /github subscriptions add pulls,issues,creates,deletes,issue_comments then created a new issue and assigned it to myself. The Assignments right-sidebar reflected the addition. But the channel containing the subscription is still empty.

image image

tforster avatar Dec 03 '20 14:12 tforster

  1. What does /github subscriptions list report?
  2. Does the Webhook in GitHub state that the event was successfully delivered?
  3. Do you see any errors in your Server logs?

hanzei avatar Dec 04 '20 08:12 hanzei

@hanzei

  1. tforster/webproducer - pulls,issues,creates,deletes,issue_comments
  2. Ah, I did not realise that the extension creates and manages Webhooks. The Webhook response is:
{
  "id": "web.incoming_webhook.text.app_error",
  "message": "No text specified.",
  "detailed_error": "",
  "request_id": "zptosmuncty5jc1mjqq98ctfpa",
  "status_code": 400
}
  1. I am on the Cloud version, I don't believe there is a way for me to view logs?

So, the error message is "No text specified". I have gone through the request JSON and I don't see any empty fields. Do we know what text (and property name) that Mattermost was expecting to see?

tforster avatar Dec 04 '20 14:12 tforster

@hanzei The Github integration is now working for issue comments. It looks like during my earlier experimentation and evaluation I entered the wrong webhook in the repository settings in GitHub. I just removed everything and started from scratch with https://github.com/mattermost/mattermost-plugin-github/blob/master/README.md.

As someone brand new to Mattermost and the Mattermost GitHub integration I was not aware that there are two separate pieces which likely explains why I was seeing the correct GitHub information reflected in the sidebar, yet nothing was showing up in the subscribed channel. Also, the response message "No text specified" is misleading as it implies the connection is fine and the problem is within the payload.

tforster avatar Dec 05 '20 17:12 tforster

I can also verify that pull request comments are working for me as was the notification when my test PR was closed.

tforster avatar Dec 06 '20 15:12 tforster

The No text specified text is set by GitHub, there is unfortunately no way to change that from our side.

hanzei avatar Dec 14 '20 08:12 hanzei

I upgraded Mattermost to 5.30.1 but still has issues installing a custom version of this plugin.

Error:

{"level":"error","ts":1608579142.9602752,"caller":"mlog/log.go:229","msg":"Unable to activate plugin","plugin_id":"github","error":"unable to start plugin: github: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","errorVerbose":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.\nunable to start plugin: github\ngithub.com/mattermost/mattermost-server/v5/plugin.(*Environment).Activate\n\tgithub.com/mattermost/mattermost-server/v5/plugin/environment.go:267\ngithub.com/mattermost/mattermost-server/v5/app.(*App).SyncPluginsActiveState.func2\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:132\nruntime.goexit\n\truntime/asm_amd64.s:1373"}

ecylmz avatar Dec 21 '20 19:12 ecylmz

Hello again,

I upgraded Mattermost to version 5.34.2. I also upgraded this plugin to v2.0.1.

The error is as follows:

{"level":"warn","ts":1618779681.0006225,"caller":"mlog/sugar.go:29","msg":"Error webhook post","plugin_id":"github","error":"CreatePost: Unable to save the Post., failed to save Post: pq: value too long for type character varying(26)"}

ecylmz avatar Apr 18 '21 21:04 ecylmz