Граф коммитов

3239 Коммитов

Автор SHA1 Сообщение Дата
Giorgi Bochorishvili
42103205f9 Merge branch 'master' into mpa-playbooks 2023-01-12 16:27:14 +04:00
Konstantinos Pittas
3ad240c167 [MM-46579] Add a limit for preferences (#21780)
* add a limit for preferences

* add limits to preferences

* add config to telemetry

* remove unneeded tags from config
2023-01-12 13:17:53 +02:00
Tim Scheuermann
51ac81d816 MM-49083 Disable write timeouts for exports (#22035) 2023-01-11 11:23:09 +01:00
Agniva De Sarker
a9bac806f3 MM-39215: Add DBStatsCollector to metrics (#21957)
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
```
2023-01-11 08:39:54 +05:30
Jesse Hallam
41c028e346 Fix plugin /public handling for subpaths (#21886)
* 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>
2023-01-10 13:45:17 -04:00
Agniva De Sarker
02ffa107e1 MM-49374: Update job metadata for bulk export (#21983)
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>
2023-01-10 09:57:02 +05:30
Agniva De Sarker
079f752478 MM-49546: Sentry crash: fix nil pointer dereference (#22018)
We return a store error always to be handled correctly
at the app layer.

https://mattermost.atlassian.net/browse/MM-49546

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-01-09 22:25:29 +05:30
Agniva De Sarker
a83170e753 MM-49395: Increase compression for previews and emojis (#21985)
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.
```
2023-01-05 19:34:22 +05:30
Giorgi Bochorishvili
bc304ef9ef Merge branch 'master' into mpa-playbooks 2023-01-05 12:23:26 +04:00
Giorgi Bochorishvili
084c30bbc1 Add new method to channel service
Fix channel service App.ch nil bug
2023-01-05 12:22:52 +04:00
Konstantinos Pittas
d4de6e6120 [MM-23837] Support multiple users/channels in invite slash command (#21726)
* 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>
2023-01-04 21:49:15 +02:00
Mylon Suren
ed23df6a2e [MM-47489] Move Shared Channels (Experimental) to Professional (#21882)
* Move shared channels to professional license

* Remove references to SharedChannels from license and use license SKU instead

* add tests

* Refactor shared channels license check and add tests

* Re-add removed negation on license check

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2023-01-03 16:30:30 -05:00
Agniva De Sarker
e4b050693d Return 404 when thread membership not found (#21960)
We were incorrectly returning by checking
for `err != nil` when a 404 error was included
in that condition.

```release-note
NONE
```
2023-01-03 21:30:51 +05:30
Agniva De Sarker
6ad1861535 MM-48345: Fix Critical level logging (#21952)
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.
```
2023-01-03 20:14:16 +05:30
Luis Suarez
f1e96cb830 MM-48988 Log plugins version on install and on startup (#21907) 2023-01-03 00:07:38 +01:00
Vishal
babe01ee2e remove crt feature flag (#21788)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-12-30 14:41:31 +05:30
Giorgi Bochorishvili
c76a571067 Update app layer 2022-12-29 15:40:03 +04:00
Giorgi Bochorishvili
a57beb229c Add threads service 2022-12-29 13:38:38 +04:00
Giorgi Bochorishvili
9a4963ecb0 Add session, frontend and command services. 2022-12-26 15:59:49 +04:00
Giorgi Bochorishvili
110a31afd6 Merge branch 'master' into mpa-playbooks 2022-12-26 11:07:35 +04:00
Gabe Jackson
99b232e080 Improve bulk export logging (#21935)
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.
2022-12-25 21:43:30 -05:00
emmyni
7a8b09c242 Add comments for the subscriptionHistoryEvent call (#21946) 2022-12-22 15:33:04 -05:00
Giorgi Bochorishvili
ee0390db1d Merge branch 'master' into mpa-playbooks 2022-12-22 14:04:38 +04:00
Ibrahim Serdar Acikgoz
c252704140 Revert "[MM-48626] Move plugins environment out of Channels (#21730)" (#21934) 2022-12-21 22:10:26 +03:00
Ibrahim Serdar Acikgoz
dcf499b51d [MM-48626] Move plugins environment out of Channels (#21730) 2022-12-21 16:11:57 +03:00
Shivashis Padhi
79193240e9 [MM-44842] Add restore_group permission (#21806)
* 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>
2022-12-19 12:01:59 -05:00
Tim Scheuermann
bef1f1cf60 Close pipes on file writer error (#21900) 2022-12-16 16:44:51 +01:00
Ibrahim Serdar Acikgoz
e58b6ffa3e app/product: block products to be initialized with the feature flag (#21875) 2022-12-16 13:00:15 +03:00
cyrilzhang-mm
33b59e0e96 Add parameter to return group members in order of display name (#21775) 2022-12-15 14:20:36 -05:00
Ibrahim Serdar Acikgoz
e10460675e telemetry: add product hooks to daily telemetry (#21870) 2022-12-15 16:27:36 +03:00
Ibrahim Serdar Acikgoz
f31380f577 product/hooks: hooks service no longer requires channels service start (#21861) 2022-12-15 12:29:33 +03:00
Ibrahim Serdar Acikgoz
8d90c7042f [MM-48883] Remove app package dependency for products (#21853) 2022-12-14 15:24:04 +03:00
Tim Scheuermann
61317883bf Allow S3 uploads without a timeout for exports (#21774) 2022-12-13 20:36:40 +01:00
Nathaniel Allred
a8fa3f29e9 Self-hosted in-product purchase (#21804)
* 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>
2022-12-13 13:36:18 -06:00
Claudio Costa
6fd174a95f [MM-48946] Fix read after write issue when uploading data (#21868)
* Fix read after write issue when uploading data

* Prefer request.CTX interface
2022-12-13 11:47:05 -06:00
Giorgi Bochorishvili
df1865001e Add new functions to channel, permissions, post and team services 2022-12-13 19:47:01 +04:00
emmyni
4cd205027c [MM-48091]: Remove is_paid_tier (#21850) 2022-12-13 08:57:46 -05:00
Giorgi Bochorishvili
9668733615 Add new functions to channel service and kv store service interfaces 2022-12-13 17:11:57 +04:00
Tim Scheuermann
731c81cd10 [MM-46417] Added more logging to the import (#21764) 2022-12-12 21:56:45 +01:00
Agniva De Sarker
9ab1d8f805 MM-48984: Add missing timeout while creating a connection (#21847)
If a timeout is missing, this goroutine waits indefinitely trying
to get a connection. Leading to a goroutine accumulation in a scenario
where the DB is somehow not release connections.

https://mattermost.atlassian.net/browse/MM-48984

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-12-12 14:59:47 +05:30
Giorgi Bochorishvili
496fe73f10 Merge branch 'master' into mpa-playbooks 2022-12-10 19:21:08 +04:00
Alejandro García Montoro
3b043c1f12 Skip "block user by domain but allow bot" test (#21841)
See https://mattermost.atlassian.net/browse/MM-48973 for more details.
2022-12-09 11:03:03 +01:00
Ibrahim Serdar Acikgoz
fc31b1713e [MM-48947] app/platform: do not restart metrics on every config save (#21831) 2022-12-09 08:28:22 +03:00
emmyni
a0fe5014a9 [MM-48649]: Call the SendSubscriptionHistoryEvent function in a GO routine (#21836) 2022-12-08 17:07:34 -05:00
Agniva De Sarker
7606fd9725 MM-48651: Log error while queuing telemetry (#21821)
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
```
2022-12-08 21:25:00 +05:30
Mylon Suren
8c206c1fd4 [MM-48921] Don't return error when deleting Draft if Draft DNE (#21818)
* 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>
2022-12-08 09:40:14 -05:00
Kyriakos Z
8d554a3621 Fixes wrong err check (#21823)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-12-08 15:00:39 +02:00
Ibrahim Serdar Acikgoz
d8e2859b0b Minimize app dependency on platform service (#21548) 2022-12-07 20:31:03 +03:00
Ibrahim Serdar Acikgoz
617c024476 app: avoid plugin env check for RunMultiHook and use pluginslock while accessing plugin env (#21803)
* 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
2022-12-07 10:00:47 +03:00
Michael Kochell
c3c81cb3d6 MM-48120/MM-48623 Patch plugin bundle react-dom on webapp extract (#21171)
Automatic Merge
2022-12-06 19:44:48 +02:00