Skip to content

Commit 055a148

Browse files
committed
add note about editing external code only in development
1 parent 131ea78 commit 055a148

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

site/content/integrate/plugins/developer-workflow.md

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ To disable the Mattermost plugin health check job, go into your `config.json` an
7272

7373
##### Disable `go-plugin` RPC client "keep alive"
7474

75+
We'll be editing external library source code directly, so we only want to do this in a development environment.
76+
7577
By default, the `go-plugin` package runs plugins with a "keep alive" feature enabled, which essentially pings the plugin RPC connection every 30 seconds, and if the plugin doesn't respond, the RPC connection will be terminated. There is a way to disable this, though the `go-plugin` currently doesn't expose a way to configure this setting, so we need to edit the `go-plugin` package's source code (using the script below) to have the right configuration for our debugging use case.
7678

7779
In the script below, we automatically modify the file located at `${GOPATH}/pkg/mod/github.com/hashicorp/go-plugin@${GO_PLUGIN_PACKAGE_VERSION}/rpc_client.go`, where `GO_PLUGIN_PACKAGE_VERSION` is the version of `go-plugin` that your Mattermost server is using. This can be found in your local copy of the monorepo at [server/go.mod](https://github.com/mattermost/mattermost/blob/4bdd8bb18e47d16f9680905972516526b6fd61d8/server/go.mod#L141).

0 commit comments

Comments
 (0)