Doug Lauder
ceee3f4b5f
re-config logger when config changes ( #18860 )
2021-10-28 08:06:34 -04:00
Kyriakos Z
f9608d383c
MM-39041: expose TotalsOnly option ( #18767 )
...
Sending a request to GetThreadsForUser for a TotalsOnly
returns just the counts without any threads.
2021-10-28 11:51:37 +03:00
Kyriakos Z
4f2043bf97
MM-37934: supports channel override for CRT notifications ( #18529 )
...
* MM-37934: supports channel override for CRT notifications
Users with CRT 'ON' are enabled to override global CRT notification
settings per channel basis.
* Fixes brain freeze :o
* Fix push notification for CRT
* Some refactor and comments as per review comments
* Minor refactor
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-10-28 11:05:46 +03:00
Agniva De Sarker
685b311401
ThreadStore: Remove quadratic complexity for participants population ( #18755 )
...
* ThreadStore: Remove quadratic complexity for participants population
While populating the participants, we would traverse the global list
twice to get the users for that thread. For threads with large number
of users, this can take considerable time. We replace that with a map
to change it to O(n).
While here, we improve memory usage of this code by pre-allocating
slices and maps. And also add some comments to help readers.
https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=c9aa17f3-b918-4a78-86aa-01562e418634
```release-note
NONE
```
* Apply in post store as well
```release-note
NONE
```
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-10-28 09:57:54 +05:30
Agniva De Sarker
416e227b64
Add a sleep in-between retries ( #18853 )
...
* Add a sleep in-between retries
From the logs in production, we have observed that practically
when a deadlock happens, it always fails even after trying 3 times.
Therefore, allowing it some time to recover before trying again.
https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=bf0e73f6-fd69-4d04-88af-53922672b556
```release-note
NONE
```
* Fix conflict with variable names
```release-note
NONE
```
2021-10-27 19:41:21 +05:30
Maria A Nunez
2ba20b5c82
MM-39591 - Restore custom message for guest invites ( #18849 )
2021-10-26 17:17:44 -04:00
Syerikjan Kh
1091710592
migrate from gorp to sqlx for Preference store ( #18742 )
...
Automatic Merge
2021-10-26 16:55:27 +02:00
Pablo Andrés Vélez Vidal
841155db3e
MM-39059 - AB test for the add members channel ( #18832 )
...
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com >
2021-10-26 16:06:50 +02:00
Ashish Bhate
097d32f409
MM-38445: Set isFollowing to false only when explicitly unfollowed ( #18740 )
...
Summary
Set post.IsFollowing to false only if the post is explicitly unfollowed. Otherwise leave it as nil.
Ticket Link
https://mattermost.atlassian.net/browse/MM-38445
2021-10-26 18:50:02 +05:30
Agniva De Sarker
c91ab6267a
Revert "Optimize TotalUnreadThreads ( #18788 )" ( #18845 )
...
This reverts commit 971af6935c .
2021-10-26 14:02:03 +05:30
Agniva De Sarker
e24f22745e
[MM-18946] [MM-26721] [MM-6842] Cross team search+private channel autocomplete ( #18468 )
...
* Show private channels in autocomplete
This is supported in all Engines:
MySQL, Postgres, Bleve, Elasticsearch.
https://mattermost.atlassian.net/browse/MM-18496
```release-note
Private channels will now appear in channel autocomplete.
If you are using Bleve or ElasticSearch, you will have to reindex
the channels again to populate them with the new attributes.
```
A large chunk of this work has been based on the earlier
effort at https://github.com/mattermost/mattermost-server/pull/17804 .
Full credit goes to https://github.com/arvinDarmawan .
* Add comment
```release-note
NONE
```
* Adding more tests
```release-note
NONE
```
* fix more tests
```release-note
NONE
```
* tmp
```release-note
NONE
```
* more fixes
```release-note
NONE
```
* add tests
```release-note
NONE
```
* Add review comments from previous PR
```release-note
NONE
```
* Add API to return all channels from all team
```release-note
NONE
```
* Added support for bleve and ES
```release-note
NONE
```
* Streaming response for GetAllChannels
```release-note
NONE
```
* Fix tests
```release-note
NONE
```
* Trigger CI
```release-note
NONE
```
* fix tests
```release-note
NONE
```
* Addressing review comments
```release-note
NONE
```
* Fix lint
```release-note
NONE
```
* Removing flaky test
```release-note
NONE
```
* Address comments
```release-note
NONE
```
* Trigger CI
```release-note
NONE
```
* Added /users/<userid>/channel_members endpoint
```release-note
NONE
```
* Minor edit
```release-note
NONE
```
* Improve embedding
```release-note
NONE
```
* Fix lint error
```release-note
NONE
```
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-10-26 11:30:59 +05:30
Agniva De Sarker
971af6935c
Optimize TotalUnreadThreads ( #18788 )
...
We remove the left joins with inner joins and also
remove the coalesce on posts.DeleteAt which improves
the join plan from a nested loop to a hash join,
and also allows the DeleteAt to be used as part of the
index filter.
Old plan
```
Aggregate (cost=666288.49..666288.50 rows=1 width=8) (actual time=5114.328..5119.991 rows=1 loops=1)
-> Gather (cost=2880.69..666288.27 rows=87 width=8) (actual time=614.214..5119.575 rows=533 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Nested Loop (cost=1880.69..665279.57 rows=36 width=8) (actual time=607.821..5099.078 rows=178 loops=3)
-> Hash Join (cost=1880.28..664932.93 rows=229 width=16) (actual time=224.374..1494.698 rows=1866781 loops=3)
Hash Cond: ((posts.channelid)::text = (channels.id)::text)
-> Parallel Seq Scan on posts (cost=0.00..662980.29 rows=27568 width=43) (actual time=201.053..1013.362 rows=4410819 loops=3)
Filter: (COALESCE(deleteat, '0'::bigint) = 0)
-> Hash (cost=1866.60..1866.60 rows=1094 width=27) (actual time=1.486..1.486 rows=1002 loops=3)
Buckets: 2048 Batches: 1 Memory Usage: 74kB
-> Index Scan using idx_channels_team_id_type on channels (cost=0.42..1866.60 rows=1094 width=27) (actual time=0.028..1.331 rows=1002 loops=3)
Index Cond: ((teamid)::text = '8ywxyw9ocp8smxrmjzrkqhrdwe'::text)
-> Index Scan using threadmemberships_pkey on threadmemberships (cost=0.41..1.50 rows=1 width=35) (actual time=0.002..0.002 rows=0 loops=5600344)
Index Cond: (((postid)::text = (posts.rootid)::text) AND ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text))
Filter: (following AND (posts.createat > lastviewed))
Rows Removed by Filter: 0
Planning Time: 2.005 ms
JIT:
Functions: 59
Options: Inlining true, Optimization true, Expressions true, Deforming true
Timing: Generation 9.905 ms, Inlining 122.509 ms, Optimization 293.764 ms, Emission 186.064 ms, Total 612.241 ms
Execution Time: 5125.739 ms
```
New plan
```
Aggregate (cost=683129.17..683129.18 rows=1 width=8) (actual time=1650.746..1656.455 rows=1 loops=1)
-> Gather (cost=3766.65..683085.55 rows=17450 width=27) (actual time=641.073..1656.086 rows=533 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Hash Join (cost=2766.65..680340.55 rows=7271 width=27) (actual time=617.096..1635.203 rows=178 loops=3)
Hash Cond: ((posts.rootid)::text = (threadmemberships.postid)::text)
Join Filter: (posts.createat > threadmemberships.lastviewed)
Rows Removed by Join Filter: 6
-> Hash Join (cost=1880.28..679334.08 rows=45742 width=16) (actual time=15.196..1242.832 rows=1866781 loops=3)
Hash Cond: ((posts.channelid)::text = (channels.id)::text)
-> Parallel Seq Scan on posts (cost=0.00..662980.29 rows=5513543 width=43) (actual time=0.028..775.118 rows=4410819 loops=3)
Filter: (deleteat = 0)
-> Hash (cost=1866.60..1866.60 rows=1094 width=27) (actual time=1.572..1.573 rows=1002 loops=3)
Buckets: 2048 Batches: 1 Memory Usage: 74kB
-> Index Scan using idx_channels_team_id_type on channels (cost=0.42..1866.60 rows=1094 width=27) (actual time=0.025..1.372 rows=1002 loops=3)
Index Cond: ((teamid)::text = '8ywxyw9ocp8smxrmjzrkqhrdwe'::text)
-> Hash (cost=823.41..823.41 rows=5037 width=35) (actual time=256.240..256.241 rows=5007 loops=3)
Buckets: 8192 Batches: 1 Memory Usage: 417kB
-> Bitmap Heap Scan on threadmemberships (cost=159.45..823.41 rows=5037 width=35) (actual time=253.011..255.255 rows=5007 loops=3)
Recheck Cond: ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text)
Filter: following
Heap Blocks: exact=601
-> Bitmap Index Scan on idx_thread_memberships_user_id (cost=0.00..158.19 rows=5037 width=0) (actual time=0.627..0.627 rows=5037 loops=3)
Index Cond: ((userid)::text = 'tc3p1yqw67d8idcp3g98awexqe'::text)
Planning Time: 1.952 ms
JIT:
Functions: 83
Options: Inlining true, Optimization true, Expressions true, Deforming true
Timing: Generation 10.148 ms, Inlining 115.819 ms, Optimization 395.923 ms, Emission 244.130 ms, Total 766.021 ms
Execution Time: 1661.791 ms
```
No special test has been done on MySQL since these are pretty
basic optimizations and should apply to both equally.
https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=c9aa17f3-b918-4a78-86aa-01562e418634
```release-note
NONE
```
2021-10-26 08:56:38 +05:30
Agniva De Sarker
6bc6243131
Move some more atomic values under Channels ( #18837 )
...
* Move some more atomic values under Channels
The following fields were moved:
```
asymmetricSigningKey atomic.Value
clientConfig atomic.Value
clientConfigHash atomic.Value
limitedClientConfig atomic.Value
```
And also moved the initialization order from NewServer
to Channels.Start to better reflect the order of things.
Removed AsymmetricSigningKey from ConfigService
as it was no longer used.
Removed calling regenerateClientConfig during startup explicitly
because it was anyways called from ensureAsymmetricSigningKey.
https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=87df1e15-588e-49ff-8bd1-ffa9651b8c82
```release-note
NONE
```
* Fix lint error
```release-note
NONE
```
2021-10-26 00:05:11 +05:30
Tom De Moor
a499d2f378
Translated using Weblate (Dutch)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/
2021-10-25 11:48:29 -05:00
Audrey Kon
3c520414f7
Translated using Weblate (Chinese (Simplified))
...
Currently translated at 99.9% (2309 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/
2021-10-25 11:48:29 -05:00
Chang Park
6f2f4aba65
Translated using Weblate (Korean)
...
Currently translated at 78.6% (1817 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ko/
2021-10-25 11:48:29 -05:00
Matthew Williams
1250183f76
Translated using Weblate (English (Australia))
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
2021-10-25 11:48:29 -05:00
Tóth Csaba // Online ERP Hungary Kft
045351e787
Translated using Weblate (Hungarian)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
2021-10-25 11:48:29 -05:00
MArtin Johnson
c2e80c6982
Translated using Weblate (Swedish)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/
2021-10-25 11:48:29 -05:00
Kaya Zeren
02852133d0
Translated using Weblate (Turkish)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
2021-10-25 11:48:29 -05:00
master7
0f78df4674
Translated using Weblate (Polish)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2021-10-25 11:48:29 -05:00
yeongeun.seo
fffd40dc4c
Translated using Weblate (Korean)
...
Currently translated at 78.6% (1817 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ko/
2021-10-25 11:48:29 -05:00
maruTA-bis5
ee480db173
Translated using Weblate (Japanese)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
2021-10-25 11:48:29 -05:00
kaakaa
f520247ce4
Translated using Weblate (Japanese)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
2021-10-25 11:48:29 -05:00
Anne-Laure Gaillard
f7a8147b82
Translated using Weblate (French)
...
Currently translated at 95.8% (2214 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/
2021-10-25 11:48:29 -05:00
Scott Bishel
7521d8e9e4
update boards version to 0.9.4 ( #18831 )
...
Automatic Merge
2021-10-22 23:25:26 +02:00
Scott Bishel
a6cca93ba3
Add Feature flag for Boards ( #18798 )
...
* add BoardsFeatureFlag
* linter fix
2021-10-22 08:27:30 -06:00
Kyriakos Z
e9308640ec
MM-35847: fixes email templates ( #18634 )
...
Some email clients don't support style tags which results in CTA buttons
not being visible, and other styling being "broken".
This commit tries to fix that issue by both including style tags and
inlining the same CSS.
2021-10-22 11:13:06 +03:00
Claudio Costa
deac72d2be
Implement auditUserPatch ( #18794 )
2021-10-21 20:29:17 +02:00
Allan Guwatudde
246a0c297e
[MM-39053] - A/B test for default notification settings ( #18655 )
...
* [MM-39053] - A/B test for default notification settings
* fix tests
* first name notifications on
* update
* Fix bad merge alignment
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com >
2021-10-21 14:00:25 +03:00
Joremy Sh
ff4df47cb1
Migrated from gorp to sqlx in store/sqlstore/plugin_store.go ( #18729 )
...
* Migrated from gorp to sqlx in store/sqlstore/plugin_store.go
* fixed lint
* updated QueryRowx and keys type
* used QueryRowX
* Fix query
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in >
2021-10-21 09:57:49 +05:30
Shobhit Gupta
e36d0576a6
Migrate from gorp to sqlx in store/sqlstore/command_store.go ( #18728 )
2021-10-21 09:57:33 +05:30
Anusha Bhat
f5bcb12aab
[MM-39232] Migrate from gorp to sqlx in store/sqlstore/reaction_store.go ( #18657 )
...
* [MM-39232] Migrate from gorp to sqlx in store/sqlstore/reaction_store.go
* Fix failing mysql tests
* Fix failing postgres specs
* Use struct instead of params
2021-10-21 09:55:49 +05:30
Nathaniel Allred
176f8d5511
set default feature flag values ( #18784 )
2021-10-20 14:23:47 -05:00
Nathaniel Allred
3365f56584
support auto tour ab test ( #18695 )
2021-10-20 12:48:08 -05:00
Carlos Tadeu Panato Junior
3e0ab2d386
ci: remove image push to the official image repository and use the test instead ( #18738 )
2021-10-20 16:54:23 +02:00
Mattermod
d4e08e26fd
Update minor version to 6.1.0 ( #18658 )
...
Co-authored-by: Mmbot <mmbot@mattermost>
2021-10-20 16:29:15 +02:00
Claudio Costa
01f2b2089b
Explicitly handle values in audit type conversion ( #18768 )
2021-10-20 14:52:48 +02:00
Joe
dea8610f1e
[MM-35863] Add IsEnterpriseReady Plugin API ( #18676 )
...
Automatic Merge
2021-10-20 12:12:58 +02:00
Daniel Espino García
5928e4f9e0
Fix race condition in telemetry ( #18734 )
...
* Fix race condition in telemetry
* Fix tests
2021-10-20 09:58:25 +02:00
Maria A Nunez
c75058d4bc
Added sales-serve billing scheme ( #18697 )
2021-10-19 16:04:24 -04:00
Archit Mathur
8ac9a3a5b6
[MM-39157] Thread participant removal with just one query using DB's JSON functions ( #18725 )
...
* feat: removes thread participant with just one query using DB's native JSON functions
* fix: corrects syntax post test failure
2021-10-19 14:07:17 -04:00
Agniva De Sarker
acd08f0a48
Fix migration scripts ( #18756 )
...
* Fix migration scripts
Set the DB schema version in DB prior to running migration
https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=c2525dbb-23eb-4fe7-8fb4-e9a5f503dc8c
```release-note
NONE
```
* Revert schema to 6.0.0 and update CI scripts
* Fix typo
* Add missing default
* Fix extra comma
Co-authored-by: Claudio Costa <cstcld91@gmail.com >
2021-10-19 19:56:09 +05:30
Penthaa Patel
078fdd8422
[MM-39229] - Migrate from gorp to sqlx in store/sqlstore/link_metadata_store.go ( #18702 )
...
* migrate from gorp to sqlx
Signed-off-by: Penthaa Patel <penthaapatel@gmail.com >
* fix INSERT query
Signed-off-by: Penthaa Patel <penthaapatel@gmail.com >
* fixes
Signed-off-by: Penthaa Patel <penthaapatel@gmail.com >
* fix Get function
Signed-off-by: Penthaa Patel <penthaapatel@gmail.com >
* fixes - serialize metadata_Data to JSON
Signed-off-by: Penthaa Patel <penthaapatel@gmail.com >
* fixes - wrap metadataBytes with string
Signed-off-by: Penthaa Patel <penthaapatel@gmail.com >
2021-10-19 19:49:45 +05:30
Shobhit Gupta
e12e0df447
Migrate from gorp to sqlx in store/sqlstore/job_store.go ( #18518 )
2021-10-19 19:29:24 +05:30
Igor German
93f956e478
[GH-18504] Migrate from gorp to sqlx in store/sqlstore/file_info_store.go ( #18637 )
...
* Migrate from gorp to sqlx in store/sqlstore/file_info_store.go
Signed-off-by: Igor German <germanenak@gmail.com >
* Use separate structs for FileInfo
Signed-off-by: Igor German <germanenak@gmail.com >
* Fix CR comments
Signed-off-by: Igor German <germanenak@gmail.com >
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-10-19 19:29:10 +05:30
Puerco
bc19bb33b0
Merge pull request #18759 from weblate/weblate-mattermost-mattermost-server_master
...
Translations update from Weblate
2021-10-19 08:57:03 -05:00
Agniva De Sarker
fdf1afadf3
Fix Flaky test UpdateUserEmail ( #18750 )
...
Since the email sending would run in a separate goroutine,
it was possible that during the second th.App.UpdateUser call
the goroutine would run much later.
So the secondToken would be the same as the firstToken,
and the test would fail.
The fix is to ensure that the token received is different
from the firstToken.
https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=254a9782-a59b-4d38-8886-4927f593e715
```release-note
NONE
```
2021-10-19 19:17:08 +05:30
jprusch
709f3e783e
Translated using Weblate (German)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
2021-10-19 15:27:38 +02:00
Tom De Moor
d03c566853
Translated using Weblate (Dutch)
...
Currently translated at 100.0% (2311 of 2311 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/
2021-10-19 15:27:37 +02:00