Previously, we relied on the plugin to close the DB connections
on shutdown. While this keeps the code simple, there is no guarantee
that the plugin author will remember to close the DB.
In that case, it's better to track the connections from the server side
and close them in case they weren't closed already. This complicates
the API slightly, but it's a price we need to pay.
https://mattermost.atlassian.net/browse/MM-56402
```release-note
We close any remaining unclosed DB RPC connections
after a plugin shuts down.
```
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* always ping on plugin registration; SharedChannel.IsValid allow no team for GM
* wait for services to start before ping
* ping plugin remotes synchronously on startup
* remove the waitForInterClusterServices stuff
* don't set remoteid when inviting remote to channel
* Update server/public/model/remote_cluster_test.go
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* address review comments
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* [MM-57724] Convert `./components/channel_header_dropdown/mobile_channel_header_dropdown.tsx` from Class Component to Function Component
* 🎨 Improve code quality
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-57721] Convert `./components/channel_header_dropdown/menu_items/leave_channel/leave_channel.tsx` from Class Component to Function Component
* fix failing tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-57712] Convert `./components/post_deleted_modal.tsx` from Class Component to Function Component
* 🎨 Improve code quality
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Revert "Revert "MM-57759: Bump mockery to version 2.42.2 to support go 1.22^" (#26772)"
This reverts commit cd3b5b46e1.
* Added the hooks.go file changes as well
```release-note
NONE
```
* Allow end users to fetch the group members list of groups which allow @-mentions
* Update server/channels/api4/group_test.go
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* Fix test name
* Move into subtest
---------
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* Restore focus to sidebar button when channel navigator closes
* Add new onHide function to use on exit of modal
* Move import back to original spot
* Remove duplicate blank line
* Fix spacing and semicolon
* Address PR feedback
* Add test id for targeting in unit test
* Add unit test for accessibility
* Fix linting
* Fix imports
* Convert SearchDateSuggestion to functional component
* Review fixes
* Review fix
Co-authored-by: Daniel Espino García <larkox@gmail.com>
* Another review fix
---------
Co-authored-by: Daniel Espino García <larkox@gmail.com>
* ProfileImageBytes for EnsureBotOptions
* leverage plugintest.NewAPI
* fix linting
* add UpdateUserRoles to plugin api
* MM-57018: support reattaching plugins
Expose a local-only API for reattaching plugins: instead of the server starting and managing the process itself, allow the plugin to be launched externally (eg within a unit test) and reattach to an existing server instance to provide the unit test with a fully functional RPC API, sidestepping the need for mocking the plugin API in most cases.
In the future, this may become the basis for running plugins in a sidecar container.
Fixes: https://mattermost.atlassian.net/browse/MM-57018
* drop unused supervisor.pid
* factor out checkMinServerVersion
* factor out startPluginServer
* restore missing setPluginState on successful reattach
* avoid passing around a stale registeredPlugin
* inline initializePluginImplementation
* have IsValid return an error
* explicitly close rpcClient
In the case of reattached plugins, the Unix socket won't necessarily disappear leaving the muxBrokers blocked indefinitely. And `Kill()` doesn't do anything if there's no process being managed.
* explicitly detachPlugin
* emphasize gRPC not being supported
---------
Co-authored-by: Mattermost Build <build@mattermost.com>