* short-circuit plugin activation steps if executable is not found
* improve error message by removing redundant ref to plugin and mor consise language about server environment
* Adding debugbar layer
* Adding sql debugbar info
* Make duration consistent across the debugbar lines
* Adding the debugbar/systeminfo endpoint
* Adding logs to the debugbar
* Improve the debugbar logger fields info
* Improving the debug bar architecture
* Allow to enable/disable debugbar in the backend
* Exposing the Debug Bar enable in the client config
* Adding more system information to the debugbar
* Adding params info to the store layer
* Organizing a bit the debugbar code in the server and adding some extra data to the system info api
* Adding debugbar email traces
* Changing the socket event name to 'debugbar'
* Adding explain support for the debugbar
* Adding missed file
* Omitting data related to the debugbar itself
* Removing unneeded functions
* Avoid arbitrary execution in explain api
* Moving debugbar inside the platform directory
* Replacing debugbar logger with a new logger Target
* Removed uneeded changes
* Fixing some linter errors
* Adding a debugbar log level to use it later for log events strictly related to the debug bar
* Fixing linter errors
* Fixing tests
* Adding i18n strings
Instead of being completely hardcoded, public key is now set at build time according to build tag (test key if `testlicensekey` tag is passed to go build, production key otherwise). A `isProdLicensePublicKey` is also available for determining if the prod license key is being used. It is needed for choosing whether to point to production or test environment CWS.
The test license key and CWS url values in this value are set to production values in this PR, but will be updated to the test values once we are ready to do the necessary updates to test environment spinwicks.
This ticket does a number of improvements to the email
batching code in general.
- Fix unbounded goroutines: We now send mails using a single
goroutine only. Since anyways the processing is asynchronous,
performance should not matter.
- Move the exit condition earlier: We have moved up the check
for the per-user email interval preference. This prevents
unnecessary DB calls from happening.
- Break from the loop properly: The objective was to not
send notifications if a user has viewed any channel since
a notification was queued. But there were 2 nested for loops
and we were breaking from just one and not the other. That is
correctly fixed now to prevent unnecessary DB calls.
- Gracefully shutdown the job: The batching task wasn't
properly shut down and could have notifications in-flight
which would have not got sent. We fix that now by cancelling
the task and waiting for it to finish.
https://mattermost.atlassian.net/browse/MM-50393
* MM-48627: Fix flaky testGetUptoNSizeFileTime
There was an issue with data clean up before
and after the tests.
https://mattermost.atlassian.net/browse/MM-48627
```release-note
NONE
```
* Lint fix and improvements
```release-note
NONE
```
* [MM-50534] - Renew email adds portal link when not eligible for self-serve renewal
* fix translations
* make more checks
* improve endpoint to make checks
* use new checks
* fix translations
* fix lint
* add meaningful names
* rename struct
* rename endpoint
* Ignore archived DM channels with deleted second user
* Add tests
* Add store test
* Add error check for post delete in test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>