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

983 Коммитов

Автор SHA1 Сообщение Дата
Agniva De Sarker
dc3e5b9269 MM-57532: Improve timeouts for some tests (#26642)
- Bump timeouts for some cases
- Improve sleep with require/assert.EventuallyT
for better performance and reliability.

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

```release-note
NONE
```
2024-04-05 19:28:49 +05:30
Claudio Costa
bc6182229b Make S3 upload part size configurable (#26533) 2024-04-05 07:20:48 -06:00
Harshil Sharma
931abcb24e Increased default payload limit from 100 kB to 300 kB (#26651) 2024-04-05 09:42:57 +05:30
Ben Cooke
3a012d709f [MM-57078] Adding progress logs for attachments to bulk export job (#26396)
* adding progress logs to export job
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-04 15:46:52 -04:00
Ben Schumacher
6de38842f7 [MM-57380] Fix running Support Packet tests locally (#26540) 2024-04-04 15:38:45 +02:00
Ben Schumacher
1e0de8f559 [MM-57356] Make use of go1.21 features (#26620) 2024-04-04 13:44:03 +02:00
unified-ci-app[bot]
3c45c44cb1 Update latest minor version to 9.8.0 (#26655)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-04 12:29:31 +03:00
Ben Schumacher
e3d86984cd [MM-54994] Use local requests instead of HTTP requests in the flow library (#26471) 2024-04-04 10:28:31 +02:00
Ben Schumacher
3efb25667d [MM-57298] Fix context cancellation for integration requests (#26516) 2024-04-04 10:25:16 +02:00
Elton Goh Jun Hao
4bbcfd74ad [MM-49243] - Use paged requests to request the list of teams (#26278)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-04 10:09:15 +02:00
Devin Binnie
087c993bed Remove very noisy log entry (#26660) 2024-04-04 09:45:16 +05:30
Ben Cooke
b0feeb5ec7 [MM-56732] Update keycloak docker configs and add make command (#26313)
* updating keycloak image
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-04-03 15:01:33 -04:00
Doug Lauder
f45fec784b Improvements to logging start-up. (#26649)
Improvements to logging start-up.
- comments have been added
- order of configuration is adjusted to allow the main logger to capture errors in notification logger
- redundant logger initialization removed; no need to configure the logger just to replace the configuration immediately after
2024-04-03 11:49:26 -04:00
Ibrahim Serdar Acikgoz
1f3bc992ea Update default.conf (#26645) 2024-04-03 12:05:31 +02:00
Agniva De Sarker
273d4432b4 MM-57512: Disable content extraction during import (#26619)
https://mattermost.atlassian.net/browse/MM-57512
```release-note
NONE
```
2024-04-03 09:04:33 +05:30
Agniva De Sarker
fc8e537288 Add context to post reminder error logs (#26633)
Previous log lines just had generic errors
which made things difficult to debug because
if a system bot is disabled, it's hard to know
whether the error is coming while trying to send
post reminders or from some other part of the system.
```release-note
NONE
```
2024-04-03 09:03:43 +05:30
Ben Schumacher
d2ce70b4b1 [MM-57415] Removed unused IsOAuth field from AppError (#26578) 2024-04-02 17:43:23 +02:00
Colton Shaw
d447a663df removed unused compliance job from packet (#26456)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-02 00:13:09 +02:00
Weblate (bot)
7def25526c Translations update from Mattermost Weblate (#26634)
* Translated using Weblate (German)

Currently translated at 100.0% (2583 of 2583 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2583 of 2583 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/

* Translated using Weblate (German)

Currently translated at 100.0% (5939 of 5939 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (5939 of 5939 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sv/

* Translated using Weblate (Japanese)

Currently translated at 99.9% (2581 of 2583 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/ja/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (5939 of 5939 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/ja/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2583 of 2583 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (5939 of 5939 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2583 of 2583 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/ja/

* Translated using Weblate (Dutch)

Currently translated at 99.6% (5921 of 5939 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/

---------

Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: ThrRip <coding@thrrip.space>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
2024-04-01 17:55:52 +00:00
Christopher Speller
10fa465d6f Update AI Plugin prepackaged version (#26580) 2024-04-01 07:47:26 -07:00
Christopher Speller
69d7a9d59b Update playbooks to v1.39.2 (#26623) 2024-04-01 07:07:45 -07:00
Jesse Hallam
acbaf4c283 add UpdateUserRoles to plugin api (#26615)
* ProfileImageBytes for EnsureBotOptions

* leverage plugintest.NewAPI

* fix linting

* add UpdateUserRoles to plugin api
2024-03-29 19:22:54 -03:00
Jesse Hallam
22c978e223 Profile image from bytes (#26610)
* ProfileImageBytes for EnsureBotOptions

* leverage plugintest.NewAPI

* fix linting

* clarify ProfileImage* godoc
2024-03-28 10:56:55 +00:00
mattermod
b6da56e44d Update latest version to 9.6.1 2024-03-27 18:37:17 +00:00
Weblate (bot)
eb0d137d14 Translations update from Mattermost Weblate (#26577)
* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/

* Translated using Weblate (German)

Currently translated at 100.0% (2577 of 2577 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (German)

Currently translated at 100.0% (5945 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

* Translated using Weblate (Polish)

Currently translated at 100.0% (2577 of 2577 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (Polish)

Currently translated at 100.0% (5945 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Czech)

Currently translated at 94.2% (5605 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/cs/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2577 of 2577 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/

* Translated using Weblate (Polish)

Currently translated at 100.0% (5945 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (5945 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/

* Translated using Weblate (Thai)

Currently translated at 0.9% (24 of 2577 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/th/

* Translated using Weblate (Thai)

Currently translated at 1.5% (94 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/th/

* Translated using Weblate (Polish)

Currently translated at 100.0% (5945 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Dutch)

Currently translated at 99.9% (2575 of 2577 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/

* Translated using Weblate (Dutch)

Currently translated at 99.9% (5943 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/

* Translated using Weblate (Swedish)

Currently translated at 97.4% (5793 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sv/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2577 of 2577 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/

* Translated using Weblate (Spanish)

Currently translated at 81.3% (4834 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/es/

* Translated using Weblate (Swedish)

Currently translated at 98.0% (5831 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sv/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2577 of 2577 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/en_AU/

* Translated using Weblate (Spanish)

Currently translated at 90.1% (2324 of 2577 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/es/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (5945 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/en_AU/

* Translated using Weblate (Spanish)

Currently translated at 81.3% (4835 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/es/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (5945 of 5945 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sv/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/

---------

Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Ladislav Urbánek <urbanek@upfilm.cz>
Co-authored-by: ThrRip <coding@thrrip.space>
Co-authored-by: RyoKub <ryo.sakhu@gmail.com>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Angel Mendez Cano <amendez1988@gmail.com>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
2024-03-27 10:31:48 -03:00
Claudio Costa
4d6602aff0 [MM-57295] Bulk export: add roles and permission schemes (#26523)
* Bulk export: add roles and permission schemes

* Update mmctl docs

* Fix log

* Update mmctl tests

* Update mmctl unit tests

* Refactor to avoid extra calls

* Update translations

* Add test case

* Fix test

* Fix test
2024-03-26 08:43:25 -06:00
Maria A Nunez
c7da6b4741 Added error code in safety limit error (#26585)
* Update error text

* Typo

* Update server/i18n/en.json

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2024-03-25 21:46:42 -04:00
Nick Misasi
408608d494 [CLD-7373] Always overwrite CloudSettings based on service environment when in production (#26581)
* Always overwrite CloudSettings based on service environment

* Only override the CWSURL, leave CWSAPIURL

* Update to allow tests to pass

* Undo unintentional changes
2024-03-25 15:43:26 -04:00
Anna Os
00d48b04ed [GH-21216] Function removeUserFromChannel return error (#26428) 2024-03-25 12:53:22 +01:00
Anna Os
1021e51270 [GH-26382] format command mmctl auth list (#26423) 2024-03-25 09:20:16 +01:00
Ben Schumacher
6c470f6210 [MM-57392] Skip flaky TestEditChannelBookmark test (#26565) 2024-03-25 08:48:44 +01:00
mattermod
52a900aeea Update latest version to 9.6.0 2024-03-22 19:17:26 +00:00
Christopher Poile
236bcf613c update prepackaged calls to v0.25.1 (#26557)
Automatic Merge
2024-03-22 15:00:37 +02:00
FutureFoodBanker
46bd4599f0 [MM-47824] fix promoteGuestToUserCmdF to handle the proper errors (#26397)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-22 13:42:37 +01:00
Ben Schumacher
7337c384a8 [MM-57106] Remove unused cluster settings (#26490) 2024-03-22 10:44:38 +01:00
Harshil Sharma
2e96a3f1e7 Fixded go modules by modules-tidy (#26558) 2024-03-22 11:59:54 +05:30
Agniva De Sarker
9431239b2e MM-57378: Bump up golangci version (#26535)
https://mattermost.atlassian.net/browse/MM-57378
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-22 10:23:21 +05:30
Harshil Sharma
b02d634916 User limit enforcement (#26511)
* Added hard limits when creating user

* Added check to user activation

* Added missing check for licensed servers

* Fix i18n

* Fixed style order

* Added a separate hard limit along with existing 10k user soft limit

* For CI

* Fixing flaky test, hopefully

* Added tests
2024-03-21 19:41:53 +05:30
Ben Schumacher
2c2dbba72c [MM-56853] Add mmctl shell completion for commands (#26214) 2024-03-21 14:50:44 +01:00
Christopher Poile
17d11db395 MM-55320 - Limit length of browser user agent version; ratelimit the /sessions endpoint (#25900)
* add ratelimit to /sessions; cap userAgent version length; tests

* add MaxSessionsLimit; remove oldest session first; tests

* can't use slices in 1.20; improve test

* nits

* add GetLRUSessions; move limiting to CreateSession; remove rate limiting

* use queryBuilder

* mysql needs a limit when using offset

* update i18n

* refactor into limitNumberOfSessions; protect createSessionForUserAccessToken

* add comment to GetLRUSessions

* add limit to oauth path; PR comments
2024-03-21 08:48:24 -04:00
Alejandro García Montoro
9a2d96073e MM-57344: Improve ElasticSearch indexing query performance (#26517)
* Use a row constructor comparison to avoid a filter

The original query had a WHERE condition that looked like:

    (x > a) OR (x = a AND y < b)

This commit changes it to a compound comparison that, given the
lexicographical order it uses, is semantically the same:

    (x, y) > (a, b)

This makes the plan in Postgres use an Index Cond instead of a Filter,
having two main performance improvements:
1. The query's time is more or less constant, not increasing every time
this query is executed. This is important because the query is executed
repeatedly until all posts are indexed.
2. The query's time is much shorter: while the original query eventually
takes 30s, hitting the timeout, the new one takes ~30ms.

Notice the difference in the plans below:
- the original query uses a `Filter` step, while the new one uses an
`IndexCond` + `Filter` step.
- the original query has a shared hit count of 40557115 (109GiB), while
the new one has a shared hit count of 13951 (109MiBA). This does not
show exactly how much data is read from disk, given it's a nested loop
node, but it gives us an idea of the amount of data processed in the
server.

Original plan:

agnivaltdb=> EXPLAIN (ANALYZE, BUFFERS) SELECT Posts.*, Channels.TeamId FROM Posts LEFT JOIN Channels ON Posts.ChannelId = Channels.Id WHERE Posts.CreateAt > '1687424888405' OR (Posts.CreateAt = '1687424888405' AND Posts.Id > 'tpomh9yu1tffmdp6dopobwuc9h') ORDER BY Posts.CreateAt ASC, Posts.Id ASC LIMIT 10000;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=1.22..2287.94 rows=10000 width=464) (actual time=23921.236..23954.229 rows=10000 loops=1)
   Buffers: shared hit=40557115
   ->  Incremental Sort  (cost=1.22..13998881.93 rows=61217938 width=464) (actual time=23921.235..23953.205 rows=10000 loops=1)
         Sort Key: posts.createat, posts.id
         Presorted Key: posts.createat
         Full-sort Groups: 311  Sort Method: quicksort  Average Memory: 45kB  Peak Memory: 45kB
         Buffers: shared hit=40557115
         ->  Nested Loop Left Join  (cost=1.00..11421751.31 rows=61217938 width=464) (actual time=23920.970..23947.067 rows=10001 loops=1)
               Buffers: shared hit=40557115
               ->  Index Scan using idx_posts_create_at on posts  (cost=0.57..9889434.54 rows=61217938 width=461) (actual time=23920.930..23931.063 rows=10001 loops=1)
                     Filter: ((createat > '1687424888405'::bigint) OR ((createat = '1687424888405'::bigint) AND ((id)::text > 'tpomh9yu1tffmdp6dopobwuc9h'::text)))
                     Rows Removed by Filter: 40920000
                     Buffers: shared hit=40553119
               ->  Memoize  (cost=0.43..0.70 rows=1 width=30) (actual time=0.001..0.001 rows=1 loops=10001)
                     Cache Key: posts.channelid
                     Cache Mode: logical
                     Hits: 9002  Misses: 999  Evictions: 0  Overflows: 0  Memory Usage: 151kB
                     Buffers: shared hit=3996
                     ->  Index Scan using channels_pkey on channels  (cost=0.42..0.69 rows=1 width=30) (actual time=0.007..0.007 rows=1 loops=999)
                           Index Cond: ((id)::text = (posts.channelid)::text)
                           Buffers: shared hit=3996
 Planning:
   Buffers: shared hit=112
 Planning Time: 0.501 ms
 Execution Time: 23954.974 ms
(25 rows)

New plan:

agnivaltdb=> EXPLAIN (ANALYZE, BUFFERS) SELECT Posts.*, Channels.TeamId FROM Posts LEFT JOIN Channels ON Posts.ChannelId = Channels.Id WHERE (Posts.CreateAt, Posts.Id) > ('1687424888405', 'tpomh9yu1tffmdp6dopobwuc9h') ORDER BY Posts.CreateAt ASC, Posts.Id ASC LIMIT 10000;
                                                                           QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=1.15..1666.83 rows=10000 width=464) (actual time=0.366..34.053 rows=10000 loops=1)
   Buffers: shared hit=13951
   ->  Incremental Sort  (cost=1.15..10196977.36 rows=61217938 width=464) (actual time=0.365..33.031 rows=10000 loops=1)
         Sort Key: posts.createat, posts.id
         Presorted Key: posts.createat
         Full-sort Groups: 311  Sort Method: quicksort  Average Memory: 45kB  Peak Memory: 45kB
         Buffers: shared hit=13951
         ->  Nested Loop Left Join  (cost=1.00..7619846.74 rows=61217938 width=464) (actual time=0.059..26.840 rows=10001 loops=1)
               Buffers: shared hit=13951
               ->  Index Scan using idx_posts_create_at on posts  (cost=0.57..6087529.97 rows=61217938 width=461) (actual time=0.040..10.548 rows=10001 loops=1)
                     Index Cond: (createat >= '1687424888405'::bigint)
                     Filter: (ROW(createat, (id)::text) > ROW('1687424888405'::bigint, 'tpomh9yu1tffmdp6dopobwuc9h'::text))
                     Rows Removed by Filter: 2
                     Buffers: shared hit=9955
               ->  Memoize  (cost=0.43..0.70 rows=1 width=30) (actual time=0.001..0.001 rows=1 loops=10001)
                     Cache Key: posts.channelid
                     Cache Mode: logical
                     Hits: 9002  Misses: 999  Evictions: 0  Overflows: 0  Memory Usage: 151kB
                     Buffers: shared hit=3996
                     ->  Index Scan using channels_pkey on channels  (cost=0.42..0.69 rows=1 width=30) (actual time=0.007..0.007 rows=1 loops=999)
                           Index Cond: ((id)::text = (posts.channelid)::text)
                           Buffers: shared hit=3996
 Planning:
   Buffers: shared hit=112
 Planning Time: 0.471 ms
 Execution Time: 34.716 ms
(26 rows)

* Go back to the old query for MySQL

As one could expect, the two databases have completely opposite
behaviours, and for MySQL, the old query is significantly faster than
the new one, exactly for the same reason than in Postgres, but the other
way around: the old query uses an Index range scan while the new one
would use a Filter.

Old query (0.18s):

mysql> EXPLAIN ANALYZE SELECT Posts.*, Channels.TeamId FROM Posts USE INDEX(idx_posts_create_at_id) LEFT JOIN Channels ON Posts.ChannelId = Channels.Id WHERE Posts.CreateAt > 1557752415221 OR (Posts.CreateAt = 1557752415221 AND Posts.Id > 'ad59ire57tfwmjr5r8xqxc75qw') ORDER BY Posts.CreateAt ASC, Posts.Id ASC LIMIT 10000;
--------------
EXPLAIN ANALYZE SELECT Posts.*, Channels.TeamId FROM Posts USE INDEX(idx_posts_create_at_id) LEFT JOIN Channels ON Posts.ChannelId = Channels.Id WHERE Posts.CreateAt > 1557752415221 OR (Posts.CreateAt = 1557752415221 AND Posts.Id > 'ad59ire57tfwmjr5r8xqxc75qw') ORDER BY Posts.CreateAt ASC, Posts.Id ASC LIMIT 10000
--------------

+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 10000 row(s)  (cost=7472068.91 rows=10000) (actual time=0.063..164.174 rows=10000 loops=1)
    -> Nested loop left join  (cost=7472068.91 rows=5559093) (actual time=0.062..163.450 rows=10000 loops=1)
        -> Index range scan on Posts using idx_posts_create_at_id over (CreateAt = 1557752415221 AND 'ad59ire57tfwmjr5r8xqxc75qw' < Id) OR (1557752415221 < CreateAt), with index condition: ((Posts.CreateAt > 1557752415221) or ((Posts.CreateAt = 1557752415221) and (Posts.Id > 'ad59ire57tfwmjr5r8xqxc75qw')))  (cost=1357066.29 rows=5559093) (actual time=0.043..97.358 rows=10000 loops=1)
        -> Single-row index lookup on Channels using PRIMARY (Id=Posts.ChannelId)  (cost=1.00 rows=1) (actual time=0.006..0.006 rows=1 loops=10000)
 |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.18 sec)

New query (5s):

mysql> EXPLAIN ANALYZE SELECT Posts.*, Channels.TeamId FROM Posts USE INDEX(idx_posts_create_at_id) LEFT JOIN Channels ON Posts.ChannelId = Channels.Id WHERE (Posts.CreateAt, Posts.Id) > (1557752415221, 'ad
59ire57tfwmjr5r8xqxc75qw') ORDER BY Posts.CreateAt ASC, Posts.Id ASC LIMIT 10000;
--------------
EXPLAIN ANALYZE SELECT Posts.*, Channels.TeamId FROM Posts USE INDEX(idx_posts_create_at_id) LEFT JOIN Channels ON Posts.ChannelId = Channels.Id WHERE (Posts.CreateAt, Posts.Id) > (1557752415221, 'ad59ire57tfwmjr5r8xqxc75qw') ORDER BY Posts.CreateAt ASC, Posts.Id ASC LIMIT 10000
--------------

+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 10000 row(s)  (cost=11119405.48 rows=10000) (actual time=5295.106..5455.285 rows=10000 loops=1)
    -> Nested loop left join  (cost=11119405.48 rows=10000) (actual time=5295.105..5454.572 rows=10000 loops=1)
        -> Filter: ((Posts.CreateAt,Posts.Id) > (1557752415221,'ad59ire57tfwmjr5r8xqxc75qw'))  (cost=221.48 rows=10000) (actual time=5295.078..5388.668 rows=10000 loops=1)
            -> Index scan on Posts using idx_posts_create_at_id  (cost=221.48 rows=10000) (actual time=0.055..5314.753 rows=600000 loops=1)
        -> Single-row index lookup on Channels using PRIMARY (Id=Posts.ChannelId)  (cost=1.00 rows=1) (actual time=0.006..0.006 rows=1 loops=10000)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (5.46 sec)
```

* Add comment explaining the difference between DBs

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-21 12:57:29 +01:00
Agniva De Sarker
5a97ba09d5 MM-57377: Skip racy test (#26534)
https://mattermost.atlassian.net/browse/MM-57377
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-21 14:22:21 +05:30
Ben Schumacher
1383d51436 [MM-57071] Use bool for license_is_trial in Support Packet (#26378) 2024-03-21 08:55:32 +01:00
Agniva De Sarker
5e851f708b MM-57245: Bump up Go version to 1.21 (#26512)
* MM-57245: Bump up Go version to 1.21

https://mattermost.atlassian.net/browse/MM-57245
```release-note
NONE
```
2024-03-21 09:12:35 +05:30
yasserfaraazkhan
9e5d486a5b Fix Cypress tests on master (#26500) 2024-03-20 23:09:45 +05:30
Christopher Poile
6ea363e260 [MM-57070] Remove detailed_error from errors when not in dev mode (#26414)
* remove detailed error from appErr.ToJSON

* Revert "remove detailed error from appErr.ToJSON"

This reverts commit 3c2fa7352d7a3bc7216b8e073179161779169d4b.

* use WipeDetailed instead of err.DetailedError = ""

* fix tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-20 13:30:14 -04:00
Claudio Costa
9e6c06186b Use specified GO var to generate go.work (#26508)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-19 10:53:26 -06:00
Weblate (bot)
969096a403 Translations update from Mattermost Weblate (#26499)
* Translated using Weblate (Swedish)

Currently translated at 100.0% (2572 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/

* Translated using Weblate (Swedish)

Currently translated at 96.3% (5721 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sv/

* Translated using Weblate (Turkish)

Currently translated at 97.1% (5770 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/tr/

* Translated using Weblate (Turkish)

Currently translated at 94.0% (2418 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/tr/

* Translated using Weblate (Turkish)

Currently translated at 97.9% (5820 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/tr/

* Translated using Weblate (German)

Currently translated at 100.0% (2572 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (Polish)

Currently translated at 100.0% (2572 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (German)

Currently translated at 100.0% (5940 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

* Translated using Weblate (Dutch)

Currently translated at 99.8% (5930 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/

* Translated using Weblate (Polish)

Currently translated at 100.0% (5940 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Dutch)

Currently translated at 99.9% (5938 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/

* Translated using Weblate (Turkish)

Currently translated at 94.0% (2420 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/tr/

* Translated using Weblate (Polish)

Currently translated at 100.0% (5940 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Turkish)

Currently translated at 98.3% (5840 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/tr/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 99.8% (5932 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/

* Translated using Weblate (Dutch)

Currently translated at 99.0% (2547 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/

* Translated using Weblate (Polish)

Currently translated at 100.0% (5940 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Dutch)

Currently translated at 99.3% (2554 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/

* Translated using Weblate (Swedish)

Currently translated at 97.4% (5791 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sv/

* Translated using Weblate (Russian)

Currently translated at 100.0% (2572 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/ru/

* Translated using Weblate (Russian)

Currently translated at 98.4% (5847 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/ru/

* Translated using Weblate (Dutch)

Currently translated at 99.5% (2560 of 2572 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/

* Translated using Weblate (Polish)

Currently translated at 100.0% (5940 of 5940 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/

---------

Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Sharuru <mave@foxmail.com>
Co-authored-by: Konstantin <eleferen@gmail.com>
2024-03-19 11:04:28 -03:00
Agniva De Sarker
7679f51e3e MM-57193: Standardize the cache names (#26441)
We use the same name for hit/miss/invalidation metrics.

The downside is that now we have conflated a full cache purge
and a single cache key invalidation into a single label, but
the advantage is that it's easier to monitor the usage of a single
cache.

And moreover, duplicating the same string across multiple places
increases the chances of making a mistake. Centralizing the cache
name only at instantiation simplifies the code.

After this, we would be ready to use Redis.

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

```release-note
NONE
```
2024-03-19 09:59:00 +05:30
Doug Lauder
1cb936b0b7 Create propery SC when InviteRemoteToChannel and channel should be shared. (#26469) 2024-03-18 10:54:23 -04:00