Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull request review and Pull request review comments not working #405

Open
ecylmz opened this issue Nov 13, 2020 · 20 comments · May be fixed by #768
Open

Pull request review and Pull request review comments not working #405

ecylmz opened this issue Nov 13, 2020 · 20 comments · May be fixed by #768
Labels
Type/Bug Something isn't working
Milestone

Comments

@ecylmz
Copy link

ecylmz commented Nov 13, 2020

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.

@hanzei
Copy link
Contributor

hanzei commented Nov 13, 2020

Hi @ecylmz,

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

@hanzei hanzei added the Type/Bug Something isn't working label Nov 13, 2020
@ecylmz
Copy link
Author

ecylmz commented Nov 13, 2020

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

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

@hanzei
Copy link
Contributor

hanzei commented Nov 17, 2020

Could you please DM me on the Mattermost Community Server?

@ecylmz
Copy link
Author

ecylmz commented Nov 17, 2020

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

@hanzei
Copy link
Contributor

hanzei commented Nov 18, 2020

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

Meanwhile I've send you the build via mail.

@jwilander
Copy link
Member

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

@ecylmz
Copy link
Author

ecylmz commented Nov 18, 2020

@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/gziphandler@v1.1.1/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2041\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\tgithub.com/gorilla/mux@v1.7.4/mux.go:210\ngithub.com/getsentry/sentry-go/http.(*Handler).Handle.func1\n\tgithub.com/getsentry/sentry-go@v0.6.1/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/cors@v1.7.0/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.

@tforster
Copy link

tforster commented Dec 1, 2020

@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?

@hanzei
Copy link
Contributor

hanzei commented Dec 1, 2020

#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?

@tforster
Copy link

tforster commented Dec 1, 2020

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
Copy link

tforster commented Dec 1, 2020

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.

@hanzei
Copy link
Contributor

hanzei commented Dec 3, 2020

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?

@tforster
Copy link

tforster commented Dec 3, 2020

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

@hanzei
Copy link
Contributor

hanzei commented Dec 4, 2020

  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?

@tforster
Copy link

tforster commented Dec 4, 2020

@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
Copy link

tforster commented Dec 5, 2020

@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
Copy link

tforster commented Dec 6, 2020

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

@hanzei
Copy link
Contributor

hanzei commented Dec 14, 2020

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

@ecylmz
Copy link
Author

ecylmz commented Dec 21, 2020

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
Copy link
Author

ecylmz commented Apr 18, 2021

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)"}

taeuk-gang added a commit to mantech-oss/mattermost-plugin-github that referenced this issue Dec 13, 2022
@Kshitij-Katiyar Kshitij-Katiyar added this to the v2.3.0 milestone Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/Bug Something isn't working
Projects
Status: Submitted / In Review
Development

Successfully merging a pull request may close this issue.

5 participants