This will be shown in the system console to let users know
which search backend is active.
Implemented via adding an extra param in the ping response.
https://mattermost.atlassian.net/browse/MM-49984
```release-note
The database section in the system console now has an additional
read-only section which shows the active search backend in use.
This can be helpful to confirm which is the currently active
search engine when there are multiple of them configured.
```
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
We would return "nil, nil" if a plugin was on the blocklist.
This would cause a nil dereference panic while trying to add
struct fields from manifest to the audit logs.
To avoid it, we return an error explicitly and ignore the
error ids to unnecessarily have it log an error.
https://mattermost.atlassian.net/browse/MM-51786
```release-note
NONE
```
After the monorepo integration, the boards product
was started before we started the hub.
This led to a data race where the GetHubForUserId was actually
called before the hub was initialized.
To fix this we initialize the platform first, and then the products.
https://mattermost.atlassian.net/browse/MM-52009
```release-note
NONE
```
* Do not shutdown DB handle from boards product
```
warn [2023-04-12 09:16:55.397 +05:30] Failed to save status caller="platform/status.go:175" user_id=gt5aricnu7g7xkr4jstfybgmbc error="failed to upsert Status: sql: database is closed"
```
The DB handle is a global object that is finally closed
at a higher layer after all the necessary tasks are finished.
So closing it prematurely, in the boards shutdown phase
is not necessary and can cause failures as observed above.
To fix this, we just remove the shutdown method.
```release-note
NONE
```
* fix tests
```release-note
NONE
```
Mockery started to throw errors like "Unexpected package creation during export data loading".
This was consistently reproducible locally and on upgrade, it has gone away.
```release-note
NONE
```
* Adds support for public routes on shared boards
* Fix linter
* Address review comments
* Update playbooks registerProduct call
* Use boards product config for setting
* update additional product locations for parameter changes
* fixes for read-only when logged in
* turn off global header and don't initialize plugin if shared board
* fix unit tests
* revert package-lock.json
* more fixes
* Remove FF check for system console setting for boards
* update tests, Product boards is displayed in system console
* only check products section of config
* update test for config change
---------
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* bind to localhost:0 for tests
Explicitly bind to `localhost:0` instead of just `:0` to avoid binding to all available interfaces and in turn avoid triggering firewall warnings on MacOS.
* fix Playbooks to use dynamic port
* TestMetrics: handle ipv4 localhost too
* TestMetrics: linting
* MM-49564: Upsert in the Store vs App layer
Refactor drafts so that Upserting a draft would happen in the DB and not
in the app layer.
* Fixes mocks
* Fixes tests
* Fixes translations
* Fixes tests
* Update tests
* Fixes tests
* Addresses review comments
- renames Save => Upsert
- removes Sleep from tests
* Fixes flaky test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* remove Boards feature flag from server, makefile, and docker
* Update server/boards/server/boards_service_util.go
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
---------
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
* Add new trial form to enrich trial requests with more customer info
* Update snapshots
* One more addition
* Fixes from PR feedback
* Fix types, i18n, update e2e tests
* Fix linter
* Fix i18n?
* Fix blank translation
* update snapshot
* Update snapshot properly
* Remove inapplicable test
* Fix business email validation only happening once
* UX Feedback
* Fix linter
* Fix linter again, not working locally
* FIX LINTER
* Move isvalid check until after some fields are set
* Fix for overlapping modals
* Fix linter
* UX feedback
* UX Feedback
* Fix typo in error modal
* [MM-51551] Add new Trial Form to Playbooks trial requests (#22650)
* Playbooks start trial entrypoints opens new trial form modal
* Fix style
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-51347] Trial form error modal for embargoed and air gapped entities (#22656)
* Playbooks start trial entrypoints opens new trial form modal
* Add support for air gapped environments when making trial requests
* Add specific handling for embargoed entities
* undo some code
* Fix linter
* Fix types
* Fix style
* Updates because TE has to upgrade to E0 before it can activate a trial
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
While inspecting Pyroscope, the function api.ReturnJSON
was seen to take some chunk of the overall memory allocations.
Looking deeper, we can see that the entire object
is json marshalled into bytes, and then wrote to the network.
Instead, we can just do a streaming write to the network
which avoids pre-allocating the entire object.
A similar approach is taken in the server channels codebase
as well.
```release-note
NONE
```
We log warnings whenever our websocket buffer sizes exceed
certain thresholds. The problem with that is, when this happens,
the logs are completely spammed with these lines
making it annoying for the customer.
To improve the situation, we use a timer that only gets reset
every minute.
https://mattermost.atlassian.net/browse/MM-51700
```release-note
NONE
```