-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Trigger outgoing webhooks from incoming webhooks when enabled. Add co… #16635
Trigger outgoing webhooks from incoming webhooks when enabled. Add co… #16635
Conversation
…nfiguration parameter with default setting in config.go. Write tests.
@REABMAX: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. I understand the commands that are listed here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks @REABMAX !
@mickmister Can I double check to make sure we want to do this? It seems like it might lead to an infinite recursion (but that might be a danger with any auto-responding plugin, of course).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the improvement @REABMAX!! Great job on the implementation and tests 👍
@mickmister Can I double check to make sure we want to do this? It seems like it might lead to an infinite recursion (but that might be a danger with any auto-responding plugin, of course).
@cpoile There is indeed no way to avoid the infinite recursion, but I think that an admin that has this use case would be aware of this, and would not want to set the outgoing webhook to communicate to something that would possibly post back to MM. Having the setting default to false covers any accidental usage of this feature.
@REABMAX Can we convey that the default value is false in the release note? |
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
@DHaussermann Would you mind reviewing this whenever you have time, or assigning the review to someone else? |
/update-branch |
Creating a new SpinWick test server using Mattermost Cloud. |
Enterprise Edition Image not available in the 30 minutes timeframe, checking the Team Edition Image and if available will use that. |
@REABMAX sorry for the delay in testing this.
cc @mickmister maybe I have misunderstood something about this PR? |
@DHaussermann you'll need to enable the feature by setting |
Updated the description |
Thanks, I had not set the flag in the cofig. I do see this working now. @aaronrothschild should this flag be configurable in the system console as well? |
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
I will push this thread since there wasn't activity for 27 days now :) |
@aaronrothschild There's a pending question here of "should this flag be configurable in the system console?" |
Sorry, can someone explain to me what the purpose of this change is? Why would an admin want to trigger an outgoing webhook after receiving an incoming webhook? I understand yet why we would make this a feature/function for someone to enable. |
@aaronrothschild I would ask the author of #16238. I assume it has to do with some decoupling of the service that is causing the incoming webhook, and the service that is receiving the outgoing webhook. @REABMAX It looks like there is a conflict that needs to be solved with the master branch |
Test server creation failed. See the logs for more information. |
@aaronrothschild Please take another look at my reply above when you have the chance |
Gotcha, it seems like an esoteric use case, but as long as it's a default off and can be configured, it's OK with me. @mickmister |
@aaronrothschild There is still a pending question here of "should the config setting exist in the system console" or should it just exist in the config file without appearing in the system console? I'm not sure what the usual protocol/convention is for deciding this. |
@aaronrothschild Please see the question above when you have the chance |
@mickmister It's somewhat esoteric IMO, and it's not changing default behavior so it's more an exception setting. I think it should not go into the system console and should be set via the config.file or config.db setting. |
Hi @REABMAX, big thanks for your contribution! There hasn't been recent activity on this PR so I've marked it as inactive. Following our inactive contribution process, the PR is now closed due to 30 days or more of inactivity. However, if you're still interested working on the changes, let us know! Note that we merged multiple repositories into one monorepo, which may require you to resubmit the changes. If you have any questions, don't hesitate to let us know, we're happy to help. |
Summary
Added a config attribute "IncomingWebhooksTriggerOutgoingWebhooks" with default value false. If it is enabled outgoing webhooks can be triggered by incoming webhooks.
Also added a test.
Ticket Link
Fixes #16238
JIRA-Ticket: https://mattermost.atlassian.net/browse/MM-31208
Release Note