https://mattermost.atlassian.net/browse/MM-39215
```release-note
We now have Grafana metrics for DB connection metrics.
They are:
max_open_connections
open_connections
in_use_connections
idle_connections
wait_count_total
wait_duration_seconds_total
max_idle_closed_total
max_idle_time_closed_total
max_lifetime_closed_total
```
* Fix plugin /public handling for subpaths
Plugins support a `public` folder in the bundle automatically being accessible at `<site_url>/plugins/<plugin_id/public/`, but it seems support for a `site_url` with a subpath has been broken for some time.
I tried to figure out when this stopped working, but gave up after a while and just focussed on the requisite changes plus tests.
* simplify comment
* more testing coverage, and simpler diff
* try cleaning up plugins after tests
* skip TestServePluginPublicRequest to isolate build issue
* Revert "skip TestServePluginPublicRequest to isolate build issue"
This reverts commit 62d0e4e427c7cf7b7f9b09202ce10cd5f1a56bca.
* do th.TearDown last by using t.Cleanup vs. defer
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
If a bulk export is triggered via a job, then
we update the metadata field of the job as it
progresses through the records.
https://mattermost.atlassian.net/browse/MM-49374
```release-note
Now you can monitor the progress of the bulk export job
via its metadata field. It is available at
`mmctl export job show <jobID>`.
```
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
We also reduce the max size of uploaded emojis to 512KiB.
https://mattermost.atlassian.net/browse/MM-49395
```release-note
Max size of uploaded emojis is now reduced to 512KiB
to reduce image download bandwidth.
```
* accept multiple users and channels
* remove logs
* add translation for multiple
* refactor
* fix lint issues
* rollback translations and use multiple messages
* fix test
* fix spacing
* extract permission checking
* improve check
* improve error messages
* rewrite tests for better clarity
This way the environment is being rebuild so it starts (almost) fresh without interfering with each other
* make errors non-blocking
* simplify responses collector
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Critical wasn't added in the StdLevels slice
and due to that mlog.Critical wasn't printing anything.
This was a complete blindspot that was missed.
We have removed all references to mlog.Critical in the codebase
and pointed Critical to be Fatal in the library.
In v8, we will remove Critical altogether.
```release-note
Servers with an encrypted key will throw an error
during startup now.
```
This change includes the following:
- Adds the job ID as a log field for bulk exports
- Adds checkpoint logging for posts and direct posts so that
progress can be tracked.
* Add restore_group permission
* Fix tests failing due to new permission in groups
* Add new migration to add custom_group_restore permission
* Add mock for new migration function
* Fix tests
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Self-hosted admins can purchase licenses in-app when `ServiceSettings,SelfHostedPurchase` is true (the default)
* Content Security Policy enables loading assets from `js.stripe.com/v3` when `ServiceSettings.SelfHostedPurchase` is true (the default).
* Add `hosted_customer` API subpath
* Add status of SelfHostedPurchase to telemetry config report.
* Support showing admins self-hosted invoices when `ServiceSettings.SelfHostedPurchase` is true (the default)
Co-authored-by: Conor Macpherson <116016004+ConorMacpherson@users.noreply.github.com>
We didn't use to handle the error returned from the Enqueue
method. We fix that.
Additionally, we add a verbosity flag that can allow us to
look into verbose logs from the rudder client. This can
help us to debug issues regarding telemetry not being sent.
https://mattermost.atlassian.net/browse/MM-48651
```release-note
NONE
```
* set global drafts feature flag to true
* Don't return error on deleteDraft when draft doesn't exist in server
* undo accidental feature flag change
* address comments
* change log level to debug
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* app/channels: use pluginslock while accessing plugins environment
* when using RunMultiHook we don't need to do a nil check on plugin env
* trigger ci