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

15489 Коммитов

Автор SHA1 Сообщение Дата
Agniva De Sarker
5730d3da6e MM-47250: Add new system console section (#21333)
* MM-47250: Add new system console section

We add a new section in system console
for products.

```release-note
Added a new section in system console
for products. For now, it only contains
boards specific settings.
```

* fix unit tests

```release-note
NONE
```

* change comment

```release-note
NONE
```
2022-10-19 15:23:20 -04:00
Agniva De Sarker
10a627fac1 MM-45723: Include DM/GM channels for user indexing (#21391)
There were 2 separate issues here:

1. We were excluding DM/GM channels for user indexing.
Not sure why. This prevented users to be shown as
channel members in autocomplete results in both
Bleve and Elasticsearch.

2. We were incorrectly deciding to search across
the team based on if the current channel
is in the list of allowed channels or not. But we
were incorrectly wiping the list of allowed channels
even if a channelid was passed. This makes it work
same as a DB search.

One catch is that for the correct results to appear,
a re-indexing is required.

```release-note
Autocompletion results using Elasticsearch or Bleve will
correctly show a user as a channel member in DM/GM channels.
To force this change to appear, a re-indexing will be
necessary.
```
2022-10-19 20:51:00 +05:30
Shivashis Padhi
28698abb9f Apply role filters for /get/users in channel (#21251) 2022-10-19 09:50:41 +05:30
Said Atrahouch
b3ffec28c6 Merge pull request #21410 from mattermost/mm-46549-gather-intent-cloud-monthly-subscription
Mm 46549 gather intent cloud monthly subscription
2022-10-18 17:18:41 +02:00
Agniva De Sarker
3946c63970 MM-47612: Skip flaky test TestPluginAPIDeleteUserPreferences (#21425)
https://mattermost.atlassian.net/browse/MM-47612

```release-note
NONE
```
2022-10-18 19:37:40 +05:30
mattermod
b24440c2bd Update latest version to 7.4.0 2022-10-18 11:32:34 +00:00
Ibrahim Serdar Acikgoz
6aec81eb6e add nil check for license manager (#21364) 2022-10-18 13:30:22 +03:00
Rohitesh Gupta
9e72ca1867 Updated CodeQL to use latest version (#21436)
* Update CodeQL to latest version
2022-10-18 12:44:19 +05:30
Gábor Boros
9a857b47b4 feat: nested config value setting using env vars (#21049)
Automatic Merge
2022-10-15 07:32:14 +03:00
Agniva De Sarker
21bf5b5dd5 MM-47465: Skip flaky TestDeleteChannel (#21392)
https://mattermost.atlassian.net/browse/MM-47465

```release-note
NONE
```
2022-10-14 16:11:45 -04:00
Said Atrahouch
439048561e Fix model 2022-10-14 17:07:04 +02:00
Said Atrahouch
350b672714 [MM-46549] Allow update the cloud customer 2022-10-14 16:33:56 +02:00
Muhammad Salman
a5f6e181ee Merge pull request #21045 from salmanmanekia/MM-44790
new ui for email verification due to change in the email address
2022-10-14 16:03:22 +03:00
Agniva De Sarker
c57706e6f4 GraphQL: Remove channel stats from the API (#21377)
Channel Stats isn't optimized with dataloaders.

And it's a heavy call, therefore clients
can mistakenly call this with multiple channels
and bring down the server.

Since there is no advantage compared to a REST API,
let's just remove it and keep things safe.

```release-note
NONE
```
2022-10-14 14:17:43 +05:30
Mattermod
d96516acd9 Update minor version to 7.5.0 (#21405)
Automatic Merge
2022-10-14 02:32:14 +03:00
Julien Tant
3747d99806 [MM-46694] A/B Test: welcome post (#20926)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-10-13 14:23:22 -07:00
Muhammad Salman
8bd6ec8f99 [MM-44790] removing extra margin bottom from the verify email change email heading 2022-10-13 21:00:44 +03:00
Muhammad Salman
1d9fdce916 Revert "add metropolis font to email change verify email html"
This reverts commit 9f6497fb0e.
2022-10-13 20:34:48 +03:00
Scott Bishel
a6a44b5824 prepackage boards v7.4.2 (#21382)
Automatic Merge
2022-10-12 20:32:14 +03:00
Jesse Hallam
11665d28ea Pre-package Playbooks v1.32.5 (#21376)
* Pre-package Playbooks v1.32.5

* Pre-package Playbooks v1.32.6
2022-10-12 12:53:38 -03:00
Ibrahim Serdar Acikgoz
71d1b7df53 [MM-47468] Fix store metrics initialization (#21374)
* initialize metrics before store

* add tests

* reflect review comments
2022-10-12 16:31:16 +03:00
Rob Bierbooms
66b7c45e69 [MM-47367] Make sure mini preview is saved to database when updating database (#21304) 2022-10-12 15:19:00 +02:00
Amy Blais
23b2bfcd04 Update en.json (#21373)
Automatic Merge
2022-10-11 22:02:13 +03:00
Agniva De Sarker
279c448da3 MM-36295: Do not convert thumbnails/previews to jpeg for png images (#21230)
We were applying a white background to transparent images
and converting them to jpegs. This was to make text be legible
behind a black preview background.

However, this has led to a poor user experience, as users rarely
download the full image but always click on previews. Therefore,
we need the previews to remain as pngs.

To fix this, we just re-encode them as pngs instead of jpgs.

```release-note
NONE
```
2022-10-11 19:04:09 +05:30
Daniel Espino García
79651874ea Do not send categories for teams deleted or not member of (#21038)
* Do not send categories for teams deleted or not member of

* Fix tests and add test for deleted teams and memberships
2022-10-11 15:33:29 +02:00
Amy Blais
f72540c68f Update supported versions (#21143)
Automatic Merge
2022-10-11 16:02:11 +03:00
Muhammad Salman
9f6497fb0e add metropolis font to email change verify email html 2022-10-11 12:46:10 +03:00
Muhammad Salman
6cc85b8350 [MM-44790] removing extra quotes around font-family 2022-10-10 20:40:40 +03:00
Muhammad Salman
affddb65da [MM-44790] add additional font family for consitency 2022-10-10 20:40:40 +03:00
Muhammad Salman
979359ade6 [MM-44790] fix the external link warning 2022-10-10 20:40:40 +03:00
Muhammad Salman
542c36bd68 new ui for email verify change email address 2022-10-10 20:40:40 +03:00
Agniva De Sarker
9bf94bf6c1 MM-47249: Blocklist focalboard plugin in product mode (#21243)
We prevent the plugin from starting if in product mode,
and also give pretty errors to make it clear to the users.

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

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-10-08 10:21:22 +05:30
Scott Bishel
a28183b078 update prepackaged to v7.4.1 (#21288) 2022-10-07 10:48:50 -06:00
emmyni
07f04b0349 Merge pull request #21175 from emmyni/MM-29625
MM-29625: Remove CloudBilling Feature Flag
2022-10-07 11:11:54 -04:00
Pablo Andrés Vélez Vidal
9a804a96fe MM-47228 - restrict guest invitation flow if subscription plan does n… (#21195)
* MM-47228 - restrict guest invitation flow if subscription plan does not support it

* fix i18n texts and add unit test

* test the scenario where guest invites are blocked by subscription

* cover the success scenarios for cloud free trial and paid subscription

* fix go vet

* use the cloud prefix for the sku

* fix unit tests

* check the licence value to determine if the guest accounts are enabled

* remove unnecessary changes for getting the subscription information

* restrict user demotion if guestAccounts is not available in license

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2022-10-07 15:57:44 +02:00
Vishal
6e9b808efd [MM-46644] Auto respond message (#20900)
Automatic Merge
2022-10-07 16:02:11 +03:00
Agniva De Sarker
56fd8bf5cc MM-47403: Populate the productHooks field (#21280)
We need to do this to pass the hooked events
to the products.

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

```release-note
NONE
```
2022-10-07 13:07:06 +02:00
Ibrahim Serdar Acikgoz
e99eba33ff app/platform: move failover config initialization to platform (#21281) 2022-10-07 13:53:13 +03:00
Christopher Poile
5a4cac43a8 MM-47037 - Prepackage Calls v0.9.0 (#21268) 2022-10-06 18:23:30 -04:00
Scott Bishel
18f0cee454 update prepackaged boards to v7.4.0 (#21206)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-10-06 15:19:25 -06:00
Cass C
8edb8157f1 prepackage Playbooks v1.32.4 (#21267) 2022-10-06 16:51:15 -03:00
Alejandro García Montoro
70c74fc10d MM-47374: Revert full text search (#21233)
* Revert "MM-46871: Add remining search parameters to be escaped (#20963)"

This reverts commit 8797bfcde7.

* Revert "MM-46503: Escape incorrect pg user search query (#20863)"

This reverts commit 8fd1762c3b.

* Revert "MM-44576 autocomplete names including utf 8 chars (#20367)"

This reverts commit 8444c45959.
2022-10-06 17:02:20 +02:00
Ibrahim Serdar Acikgoz
10655a2eb3 fix a data race in the platform service (#21242) 2022-10-06 14:14:03 +03:00
Ibrahim Serdar Acikgoz
5e69c6b02f Move cluster, webhub and store out of Server (#20899) 2022-10-06 11:04:21 +03:00
Michel Engelen
203df2f537 removed feature flag for Advanced Text Editor (#21221) 2022-10-05 21:38:34 +02:00
Azanul Haque
e599a6cbf3 Mm 46416 add default random message (#21176)
Automatic Merge
2022-10-04 12:52:09 +03:00
Nick Misasi
069049db03 Fix delinquency emails (#21029)
* attempt to fix delinquency emails in gmail

* fix

* More fix
2022-10-03 14:16:43 -04:00
Nathaniel Allred
7186689f54 Mm 46065 (#20893)
* if thread is archived, allow the archived time to be returned instead of throwing an error
2022-09-30 13:20:26 -05:00
Ben Cooke
76386df998 [MM-24461] Show last active time of users when not online (#19126)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* new config EnableLastActiveTime

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-30 13:11:34 -04:00
Alejandro García Montoro
635cea19c7 MM-46105: Simplify posts batch retrieval query (#21149)
In MySQL, tested in Community, times for the old and new queries are
mostly the same:
- Original : 6 s 250 ms (execution: 258 ms, fetching: 5 s 992 ms)
- New      : 6 s 148 ms (execution: 148 ms, fetching: 6 s)

The output from EXPLAIN in Community is also similar for both queries:

- Original:

| id | select_type | table      | partitions | type   | possible_keys          | key                    | key_len | ref                  | rows    | filtered | Extra                 |
|----|-------------|------------|------------|--------|------------------------|------------------------|---------|----------------------|---------|----------|-----------------------|
|  1 | PRIMARY     | <derived2> |            | ALL    |                        |                        |         |                      |   10000 |   100.00 | Using filesort        |
|  1 | PRIMARY     | Channels   |            | eq_ref | PRIMARY                | PRIMARY                | 106     | PostsQuery.ChannelId |       1 |   100.00 |                       |
|  2 | DERIVED     | Posts      |            | range  | idx_posts_create_at_id | idx_posts_create_at_id | 115     |                      | 3108048 |   100.00 | Using index condition |

- New:

| id | select_type | table    | partitions | type   | possible_keys          | key                    | key_len | ref                        | rows    | filtered | Extra                 |
|----|-------------|----------|------------|--------|------------------------|------------------------|---------|----------------------------|---------|----------|-----------------------|
|  1 | SIMPLE      | Posts    |            | range  | idx_posts_create_at_id | idx_posts_create_at_id | 115     |                            | 3108050 |   100.00 | Using index condition |
|  1 | SIMPLE      | Channels |            | eq_ref | PRIMARY                | PRIMARY                | 106     | mattermost.Posts.ChannelId |       1 |   100.00 |                       |

In Postgres 12, this was tested locally with a 12M posts database, in a
machine with the following specs:
- CPU: i7-11800H (8C / 16T, 2.3 / 4.6GHz, 24MB)
- Memory: 32GB
- Storage: 1TB SSD M.2 2280 PCIe 4.0x4 Performance NVMe Opal2

The times of the queries in this setup are:
- Original query : 118.080 ms
- New query      : 94.454 ms

The complete output from EXPLAIN ANALYZE in Postgres 12:

- Original query:

mattermost=> EXPLAIN ANALYZE
SELECT PostsQuery.*, Channels.TeamId
FROM (
    SELECT *
    FROM
    Posts
    WHERE Posts.CreateAt > 1629244800000
        OR (Posts.CreateAt = 1629244800000 AND Posts.Id > '')
    ORDER BY CreateAt ASC, Id ASC
    LIMIT 10000
) AS PostsQuery
LEFT JOIN Channels ON PostsQuery.ChannelId = Channels.Id
ORDER BY CreateAt ASC, Id ASC;
                                                                                QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Sort  (cost=156636.28..156661.28 rows=10000 width=375) (actual time=114.093..114.833 rows=10000 loops=1)
   Sort Key: posts.createat, posts.id
   Sort Method: external merge  Disk: 3128kB
   ->  Hash Right Join  (cost=136335.48..155971.89 rows=10000 width=375) (actual time=67.919..107.330 rows=10000 loops=1)
         Hash Cond: ((channels.id)::text = (posts.channelid)::text)
         ->  Seq Scan on channels  (cost=0.00..10902.68 rows=272168 width=28) (actual time=0.018..28.826 rows=272168 loops=1)
         ->  Hash  (cost=135721.48..135721.48 rows=10000 width=374) (actual time=40.141..40.144 rows=10000 loops=1)
               Buckets: 16384  Batches: 2  Memory Usage: 2244kB
               ->  Limit  (cost=135596.48..135621.48 rows=10000 width=374) (actual time=36.799..38.169 rows=10000 loops=1)
                     ->  Sort  (cost=135596.48..135704.93 rows=43380 width=374) (actual time=30.641..31.699 rows=10000 loops=1)
                           Sort Key: posts.createat, posts.id
                           Sort Method: external merge  Disk: 18840kB
                           ->  Bitmap Heap Scan on posts  (cost=827.91..132497.48 rows=43380 width=374) (actual time=1.856..8.630 rows=54398 loops=1)
                                 Recheck Cond: ((createat > '1629244800000'::bigint) OR (createat = '1629244800000'::bigint))
                                 Filter: ((createat > '1629244800000'::bigint) OR ((createat = '1629244800000'::bigint) AND ((id)::text > ''::text)))
                                 Heap Blocks: exact=2674
                                 ->  BitmapOr  (cost=827.91..827.91 rows=43380 width=0) (actual time=1.660..1.661 rows=0 loops=1)
                                       ->  Bitmap Index Scan on idx_posts_create_at  (cost=0.00..801.78 rows=43379 width=0) (actual time=1.657..1.657 rows=54398 loops=1)
                                             Index Cond: (createat > '1629244800000'::bigint)
                                       ->  Bitmap Index Scan on idx_posts_create_at  (cost=0.00..4.44 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=1)
                                             Index Cond: (createat = '1629244800000'::bigint)
 Planning Time: 0.230 ms
 JIT:
   Functions: 14
   Options: Inlining false, Optimization false, Expressions true, Deforming true
   Timing: Generation 0.562 ms, Inlining 0.000 ms, Optimization 0.320 ms, Emission 5.863 ms, Total 6.745 ms
 Execution Time: 118.080 ms
(27 rows)

- New query:

mattermost=> EXPLAIN ANALYZE
SELECT Posts.*, Channels.TeamId
FROM
Posts
LEFT JOIN Channels ON Posts.ChannelId = Channels.Id
WHERE Posts.CreateAt > 1629244800000
    OR (Posts.CreateAt = 1629244800000 AND Posts.Id > '')
ORDER BY Posts.CreateAt ASC, Posts.Id ASC
LIMIT 10000;
                                                                             QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=148443.93..149610.68 rows=10000 width=375) (actual time=83.610..92.492 rows=10000 loops=1)
   ->  Gather Merge  (cost=148443.93..152661.73 rows=36150 width=375) (actual time=74.409..82.975 rows=10000 loops=1)
         Workers Planned: 2
         Workers Launched: 2
         ->  Sort  (cost=147443.91..147489.10 rows=18075 width=375) (actual time=64.325..64.629 rows=3436 loops=3)
               Sort Key: posts.createat, posts.id
               Sort Method: external merge  Disk: 5992kB
               Worker 0:  Sort Method: external merge  Disk: 7144kB
               Worker 1:  Sort Method: external merge  Disk: 7152kB
               ->  Parallel Hash Left Join  (cost=12336.48..146152.66 rows=18075 width=375) (actual time=42.908..51.116 rows=18133 loops=3)
                     Hash Cond: ((posts.channelid)::text = (channels.id)::text)
                     ->  Parallel Bitmap Heap Scan on posts  (cost=827.91..132054.64 rows=18075 width=374) (actual time=2.448..5.417 rows=18133 loops=3)
                           Recheck Cond: ((createat > '1629244800000'::bigint) OR (createat = '1629244800000'::bigint))
                           Filter: ((createat > '1629244800000'::bigint) OR ((createat = '1629244800000'::bigint) AND ((id)::text > ''::text)))
                           Heap Blocks: exact=902
                           ->  BitmapOr  (cost=827.91..827.91 rows=43380 width=0) (actual time=2.111..2.112 rows=0 loops=1)
                                 ->  Bitmap Index Scan on idx_posts_create_at  (cost=0.00..801.78 rows=43379 width=0) (actual time=2.105..2.105 rows=54398 loops=1)
                                       Index Cond: (createat > '1629244800000'::bigint)
                                 ->  Bitmap Index Scan on idx_posts_create_at  (cost=0.00..4.44 rows=1 width=0) (actual time=0.004..0.005 rows=0 loops=1)
                                       Index Cond: (createat = '1629244800000'::bigint)
                     ->  Parallel Hash  (cost=9315.03..9315.03 rows=113403 width=28) (actual time=29.928..29.929 rows=90723 loops=3)
                           Buckets: 65536  Batches: 8  Memory Usage: 2688kB
                           ->  Parallel Seq Scan on channels  (cost=0.00..9315.03 rows=113403 width=28) (actual time=5.378..16.495 rows=90723 loops=3)
 Planning Time: 0.460 ms
 JIT:
   Functions: 46
   Options: Inlining false, Optimization false, Expressions true, Deforming true
   Timing: Generation 2.291 ms, Inlining 0.000 ms, Optimization 1.518 ms, Emission 23.827 ms, Total 27.636 ms
 Execution Time: 94.454 ms
(29 rows)
2022-09-30 18:18:26 +02:00