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

692 Коммитов

Автор SHA1 Сообщение Дата
larkox
d8f5b2a4da [GH-13099] Migrate lastPostTimeCache cache from store/sqlstore/post_store.go to the new store/localcachelayer (#13134)
Automatic Merge
2019-12-11 06:42:00 -05:00
Carlos Tadeu Panato Junior
d3a1a37f93 upgrade DB to 5.18 (#13315) 2019-12-05 23:06:50 +01:00
Ali Farooq
186524bba4 Revert "MM-20105: Migrate channelByNameCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer (#13189)" (#13329)
Automatic Merge
2019-12-05 16:15:07 -05:00
Christopher Poile
6e6a44764c [MM-19892] Fix failing test TestImportBulkImport (#13003)
Automatic Merge
2019-12-04 11:31:52 -05:00
Claudio Costa
72f3bb10c7 [MM-20761] Fix and improve integrity check tool (#13246)
* Fix query and add tests

* Support NULL values and improve output
2019-12-04 16:56:08 +01:00
Igor Gomonov
dc610d201d GH-12781: Migrate tests to use testify (#13203) 2019-12-04 16:49:06 +01:00
Allen Lai
223db0c05c MM-20105: Migrate channelByNameCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer (#13189)
* migrate

* add unit test

* change syntax

* delete comments

* remove includedeleted search method

* remove include search method in correct file

* change constant

* add Mock.On

* change to &channel

* fix type for Mock.on().return()

* remove inc counter

* suggestions takened

* get rid of unneeded concat

* go fmt

* import v5
2019-12-04 06:55:02 +01:00
Harrison Healey
4a23d4b282 MM-20681 Fix custom post types not marking channel unread when using Mark as Unread (#13247)
* MM-20681 Fix custom post types not marking channel unread when using Mark as Unread

* Fix inverted if statements
2019-12-03 14:51:50 -05:00
Ben Schumacher
d0d6ce0a70 [MM-20353] Change KVSetWithOptions to accept a byte slice (#13213)
* Drop EncodeJSON from PluginKVSetOptions

* Add unit tests for KVSetWithOptions with nil values
2019-12-03 10:46:15 +01:00
Harrison Healey
a0130b86d7 MM-20649 Fix incorrect mention count when marking a DM channel as unread (#13245)
* MM-20649 Fix incorrect mention count when marking a DM channel as unread

* Satisfy govet

* Update missed test
2019-12-02 09:30:08 -05:00
Eli Yukelzon
4e5369e759 MM-19957 - Deactivating a user should increment the Daily and… (#13232)
* corrected active count function
2019-12-02 15:48:36 +02:00
Jesús Espino
a63684fcb5 Consistent license message for all the go files (#13235)
* Consistent license message for all the go files

* Fixing the last set of unconsistencies with the license headers

* Addressing PR review comments

* Fixing busy.go and busy_test.go license header
2019-11-29 12:59:40 +01:00
Rodrigo Villablanca Vásquez
e03411795c Migrating team store cache to cache layer (#13075)
Automatic Merge
2019-11-29 05:56:50 -05:00
larkox
d2e78e28a9 [GH-13105] Migrate channelPinnedPostCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer (#13164)
* Migrate channelPinnedPostCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer

* Remove GetPinnedPostCountFromCache

* Rearrange test to avoid undeclared variable
2019-11-28 15:21:42 -05:00
Miguel de la Cruz
2259b7f2a8 [MM-19948] Set version on module file and internal paths (#13186)
* [MM-19948] Set version on module file and internal paths

* Fixes after merge

* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Martin Kraft
14bcd1f0a1 MM-18357: Adds pagination to team search. (#12910)
* MM-18357: Adds pagination to team search.

* MM-18357: Adds new client method for paginated requests.

* MM-18357: Adds feedback about non-supported pagination-permissions combo.

* MM-18357: Removes unnecessary conversion.

* MM-18357: Removes paginate parameter and uses nil on page and perpage instead.
2019-11-28 08:11:02 -05:00
Allen Lai
fdec1ef1f5 MM-20100: Migrate channelGuestCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer (#13135)
* init

* migrate

* add test

* fix channel store

* ...

* missing ')'

* change function interface

* fix build

* fix format

* Update store/localcachelayer/layer.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Update store/localcachelayer/channel_guest_layer_test.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* im so confused why my builds are failing

* fix build

* format

* fix format

* add license header

* resolve some conflicts

* add test

* fix constant names

* fix more constants

* fix bugs

* delete unused constants

* Update store/localcachelayer/channel_layer.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* typo

* another typo

* get guest

* change test

* go fmt format

* change test

* remove getcountcache

* delete method from interface

* delete method

* update test

* rerun GoLang CI
2019-11-27 09:14:40 -05:00
Martin Kraft
31ac88ef69 MM-20305: Adds ability to choose whether deleted teams are included in the count query. (#13181) 2019-11-27 07:50:15 -05:00
Rodrigo Villablanca Vásquez
27375cd081 Migrate profileByIdsCache cache to cache layer (#13133)
* Partial advances

* Small advances

* invalidating cache with doInvalidateCacheCluster

* Renamed cache

* Starting with tests (failing by now)

* Passing tests :)

* Passing tests

* Fix ineffectual assignment in tests

* Revert of backward incompatible change

* Removed unused var
2019-11-25 21:18:01 +01:00
larkox
22b495b2df [GH-13058] Migrate webhookCache from store/sqlstore/webhook_st… (#13091)
* Migrate webhookCache from store/sqlstore/webhook_store.go to the new store/localcachelayer

* Remove duplicated statistics and move several functions to the layer

* Put cache size in format minutes * 60seconds

* Move cache functions to layer functions over the caches

* Directly remove and purge caches in handleClusterInvalidate to avoid loops
2019-11-25 20:44:52 +01:00
Martin Kraft
906f8dccef MM-19917: Removes use of unindexed Posts.EditAt field in compliance query. (#13078) 2019-11-22 08:12:41 -05:00
Rodrigo Villablanca Vásquez
3a8fb53f3e Migrates the lastPostsCache from PostStore into cache layer (#13141)
* Some advances

* Partial advances

* Cache moved

* Tests finished

* Removed all test for PostStore (store/sqlstore) related with Cache. This is tested in the cache layer now
2019-11-20 15:03:08 +01:00
Martin Kraft
0212845385 MM-18356: Adds ability to paginate channel search. (#12830)
* MM-18356: Adds ability to paginate channel search.

* MM-18356: Minor refactor.

* MM-18356: Adds doc.

* MM-18356: Fixes doc.

* MM-18356: Some commentary, adds the total count to non-paginated responses, and removes a stray fmt.

* MM-18356: Fixes shadowed variable.

* MM-18356: Removes paginate field and API parameter.

* MM-18356: Adds method to check if channel search is a paginated request.

* MM-18356: Vet fix.
2019-11-19 11:38:49 -05:00
Harrison Healey
de913e7537 Merge branch 'master' into mark-as-unread 2019-11-19 09:45:03 -05:00
larkox
c40f0a4aea [GH-13070] Migrate emojiIdCacheByName cache from store/sqlstore/emoji_store.go to the new store/localcachelayer (#13125)
Automatic Merge
2019-11-19 05:26:52 -05:00
catalintomai
1aca43d401 MM 17466 : Add custom post types to compliance exports (#13149)
Automatic Merge
2019-11-19 03:56:52 -05:00
larkox
2b52e1af0d [GH-13106] Migrate channelMemberCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer (#13128)
* Migrate channelMemberCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer

* Move cache functions to layer functions over the caches

* Directly remove and purge caches in handleClusterInvalidate to avoid loops and prepare details for layer with multiple caches
2019-11-19 09:55:01 +01:00
Jesús Espino
7031f51b41 Deactivating and invalidating sessions of guest users on guest disable (#13007)
Automatic Merge
2019-11-15 09:43:52 -05:00
Carlos Tadeu Panato Junior
5ea8017db5 upgrade db to 5.17 (#13060)
Automatic Merge
2019-11-14 06:23:36 -05:00
Harrison Healey
df7cbcb440 Merge branch 'master' into mark-as-unread 2019-11-12 14:20:50 -05:00
Valentijn Nieman
36f3b14420 MM-19337 Enable users to view archived channels (#12995)
* First pass at searching archived channels

* Create endpoint for archived channels

* Update test for GetPublicChannelsForTeam

* Fix unit test for archived channels

* Rename includeDeleted to onlyDeleted

* Remove new /archived endpoint in favour of existing /deleted endpoint

* Fix broken test

* Remove manage team permission from /deleted endpoint

* Fix deletedChannels test

* Test for searching archived channels

* Only return private deleted channels user was a member of

* SearchArchivedChannels also searches private channels (user is a member of)

* Remove for loop to simplify append

* Remove userId from Client4 searcArchivedChannels
2019-11-12 06:15:19 +08:00
Jesús Espino
9557bcf329 Making private the sqlstore upgrade functions because nobody needs to call them from the outside (#13023) 2019-11-11 12:11:50 +00:00
Harrison Healey
6e6174a9ee Merge branch 'master' into mark-as-unread 2019-11-07 10:58:09 -05:00
Jesús Espino
8febdcf2b8 Removing unnecesary unnused old layered store (#12999) 2019-11-06 12:43:41 +01:00
Harrison Healey
47409aaa4b Merge branch 'master' into mark-as-unread 2019-11-04 15:04:28 -05:00
Gervasio Marchand
1db045bce3 MM-16822 - Implement KVSetWithOptions (#11818)
* Add SetWithOptions

* Avoid passing two structs to the functions

* Rename ExpiryInSeconds -> ExpireInSeconds

* Use t.Run for the tests

* Fix build

* Address feedback

* Update log message

* Update docs and use KVSetWithOptions in KVCompareAndSetJSON

* Improve code style

* Use struct instead of pointer to struct

* Fix minimum server versions

* Update documentation

* Address feedback

* Revert new implemention of kv helpers

* Adress feedback
2019-11-04 13:49:54 +01:00
Ben Schumacher
812c40a307 Adjust govet settings and fix issues found by it (#12947) 2019-11-04 13:47:59 +01:00
catalintomai
7c658a98f0 MM-18060: Include deleted posts in compliance export. (#12957) 2019-10-31 09:31:18 -07:00
Harrison Healey
eb36329e8d Merge branch 'master' into mark-as-unread 2019-10-29 10:11:41 -04:00
Ben Schumacher
38c0bde7f8 Run ineffassign against codebase (#12925) 2019-10-29 15:04:28 +01:00
Ben Schumacher
7a665aacdd Run gosimple against codebase (#12928) 2019-10-29 07:45:09 +01:00
Ben Schumacher
fdcda20fe4 Cleanup dead code (#12929)
* Cleanup dead code

* Remove unneeded translation string
2019-10-28 19:12:50 +01:00
Ben Schumacher
e61340c54e Run gofmt -s against codebase (#12943) 2019-10-28 06:08:08 -07:00
Hossein Ahmadian-Yazdi
b9329d1984 [MM-13704] Updated CLI "deleter user" to also permanently delete GroupMembers associated to user (#12858)
* [MM-13704] Updated CLI to set DeleteAt in groupmemebrs

* [MM-13704] Updated Mock Test

* [MM-13704] Refactored to use current pattern to write function

* [MM-13704] Small text change

* [MM-13704] updated translation

* [MM-13704] Updated params of error function

* [MM-13704] Fixed confusion between channel and group store

* [MM-13704] Addressed PR comments

* [MM-13704] Added test case

* [MM-13704] Fixed err declaration
2019-10-24 17:31:17 -04:00
Joram Wilander
9307f75fe9 Add some group plugin APIs (#12180)
* Add group store GetByUser

* Add group store GetByName

* Add group plugin APIs

* Minor naming fixes

* Add minimum version comments
2019-10-22 14:38:08 -04:00
Harrison Healey
6ee681e50b Merge branch 'master' into mark-as-unread 2019-10-18 16:07:41 -04:00
aqche
54181e4015 Migrate tests from 'store/sqlstore/utils_test.go' to use testify (#12815) 2019-10-17 07:24:06 -07:00
Harrison Healey
e5dbd45f94 Merge branch 'master' into mark-as-unread 2019-10-17 09:44:32 -04:00
Eli Yukelzon
66c66eef0d MM-19371 - Reply count disappears from pinned and flagged conv… (#12753) 2019-10-17 11:10:49 +03:00
Jesse Hallam
5d45aa81e0 MM-16888: fix missing indexes (#12746)
* MM-16888: fix missing indexes

As part of https://mattermost.atlassian.net/browse/MM-16888, we discovered and fixed a number of column and index mismatches between the canonical (i.e. created from scratch) and migrated schemas (i.e migrated from 5.0 through 5.16).

Unfortunately, the migration to fix same was added to `UpgradeDatabaseToVersion514` but never cherry picked to the pending v5.14 release at the time. Customers who upgraded to v5.14 or v5.15 and then get this code as part of v5.16 will never run that migration. Copy it to the UpgradeDatabaseToVersion516 accordingly.

* avoid fixing ChannelMembers.SchemeGuest on MySQL

* synchronize .circleci/config.yml with scripts/mysql-migration-test.sh

* fix circleci invocation

* additional logging on diff

* update build/Jenkinsfile.pr too!
2019-10-15 15:47:09 -03:00