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

12155 Коммитов

Автор SHA1 Сообщение Дата
Rajat Varyani
fdb339fbd7 [MM-20941] Parallelize plugin loading on startup (#13617)
* [MM-20941] Parallelize plugin loading on startup

* [MM-20941] Parallelize plugin SyncPlugins

* [MM-20941] Make activation and deactivation of plugin concurrent

* [MM-20941] Remove uncessary optimization

This reverts commit aad2680aec843125bf72d8d2406869f4948dba42.

[MM-20941] Remove uncessary wait in SyncPlugins

[MM-20941] Parallelize processing of prepackaged plugins

* [MM-20941] Fix lint issue

* [MM-20941] Fix bug for getting the number of plugins to process

* [MM-20941] Use buffered channel and fix return issue in prepackaged plugin processing

* [MM-20941] Implement feedback

* [MM-20941] Fix looping over channel for plugins

* [MM-20941] Retain signature of process plugin

* [MM-20941] Fix function documentation

* [MM-20941] Fix bug to pass the plugin path in anonymous function

* [MM-20941] Rename variable

* [MM-20941] Make minor changes in variable naming

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-17 18:30:48 -04:00
Doug Clark
6377bfef35 GH-12936 Add KVListWithOptions function to plugin.Helpers (#13576)
Automatic Merge
2020-02-17 15:44:34 -05:00
Eli Yukelzon
53e07a68f5 fixing a screwup (#13906)
Automatic Merge
2020-02-17 03:44:34 -05:00
Martin Kraft
0564cc4271 MM-21150: Re-create the workers so that the EE workers are non-nil up… (#13523)
* MM-21150: Re-create the workers so that the EE workers are non-nil upon uploading a license.

* MM-21150: Updates from Srv field to method.

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-16 11:07:25 -05:00
Jesse Hallam
9a51c73f64 MM-22619: check for nil plugins environment (#13901)
* MM-22619: check for nil plugins environment

Check if plugins were disabled before attempting to collect metrics and emit telemetry for same.

Fixes: https://mattermost.atlassian.net/browse/MM-22619

* Update app/diagnostics_test.go
2020-02-15 17:46:26 -05:00
Agniva De Sarker
bd487418f7 golangci: bring back the unused linter (#13826)
https://github.com/golangci/golangci-lint/issues/885 is fixed wth 1.23.3.
We can now bring back unused.
2020-02-15 10:53:16 -05:00
Ali Farooq
bd9d674006 Fixing master (#13900)
* updating api_timer_layer_generated.go

* Fixing GetFileInfos

* Fixing TestPluginAPIGetFileInfos

* Remove file.go.orig
2020-02-14 18:08:00 -05:00
Ali Farooq
e4fb5791b0 MM-21626, MM-21627 - Plugin API/Hooks Prometheus instrumentati… (#13825)
* MM-21626,MM-21627 - Plugin API/Hooks Prometheus instrumentation

* Updated einterface mocks

* Fixed supervisor tests

* ignoring golint errors for plugin metrics wrappers

* Making golangci happy

* Using variadic form when generating wrapper code

* Removed artificial delay

* Removed comments from tests

* Renaming plugin wrappers to api/hooks_timer_layer

* updating vendor dir and mod files

* Recording plugin api/hook responses in prometheus

* Updated einterfaces-mocks

* Updating go sum

* Updating go sum

* Fixing conflicts

* More conflicts fixing

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-14 15:47:43 -05:00
Jesse Hallam
7da85922af fix bin/mmctl detection using printf (#13898)
The behaviour of `echo` [varies](https://stackoverflow.com/questions/8467424/echo-newline-in-bash-prints-literal-n) between operating systems. Use `printf` for maximum compatibility.
2020-02-14 15:45:32 -05:00
Ashish Bhate
3fc5287f6b MM-17912: Allow searching for files through plugin API (#13647)
* constants and options for getting files

* Method to get files with options

* Add i18n strings for en

* Add API methods for getting files with options

* gofmt -s file

* explicitly set create at in tests

* use greater than nanosecond time difference for tests

* use gte instead of gt for getting files by created time

* use created at time as default sort order for getting file infos

* use explicit inline strings instead of format strings

* join tables only when required

* use if as secondary sort, and update tests

* update field docs to reflect previous changes

* make page and perPage get options as required

* add json struct tags to GetFileOptions

* bump minimum server versioni

* remove sorting by username and channelname

* use bool for sort order type

* use FileInfo prefix instead of just File

* clearer comments

* use zero-based page numbering

* test filtering by user and channel

* remove unnecessary whitespace

* use int instead of uint for page and perPage arguments

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-14 16:21:54 -04:00
catalintomai
ed52acd89c MM-18062 - add support for Office365Settings Directory (tenant) Id (#13737)
* MM-18062 add directory id field to O365 settings
2020-02-14 09:55:40 -08:00
Joram Wilander
dd1c8c22dc Fix panic when receiving a config to update to if some settings are not set (#13889) 2020-02-13 14:26:57 -05:00
Miguel de la Cruz
5f7b5686a8 Adds tFatal custom govet check (#13886)
Automatic Merge
2020-02-13 12:51:36 -05:00
Miguel de la Cruz
84f45634a8 Remove remaining t.Fatal from the codebase (#13876)
* Remove remaining t.Fatal from the codebase

* Fix job_store test

* Address review comments

* Remove comments
2020-02-13 17:53:23 +01:00
Eli Yukelzon
17523fa5d9 MM-21898 - Part 1: Generate and use an interface instead of *A… (#13840)
* Generate and use an interface instead of *App
2020-02-13 13:26:58 +01:00
Jesús Espino
66fc096768 MM-22340: Fixing flaky tests around Team name validation (#13875)
* MM-22340: Fixing flaky tests around Team name validation

* Fixing other cases where can happend the flaky tests
2020-02-13 09:36:21 +01:00
Jason Blais
35ac2629e2 Add missing "AutomaticPrepackagedPlugins" to diagnostics.go (#13868) 2020-02-12 17:52:15 -04:00
Jason Frerich
0a80e63668 Bump zoom plugin version to v1.3.0 (#13836)
Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-12 11:46:39 -06:00
Farhan Munshi
897715f883 [MM-21919] Add use_channel_mentions permission (#13781)
* MM-21919 Add channel_mention permission

* MM-21919 Fix emojis migration test

* Enforce Channel Mentions on the in the posts api

* MM-21919 Rename permission to use_channel_mentions

Allow posts with channel mentions to still be posted without the permission just don't send notifications to users

* MM-21919 Add tests for a post with @all and @here

* MM-21919 Add use channel mentions to all roles that have create post

* MM-21919 Update app_test to include use_channel_mentions permission in default permissions
2020-02-12 21:15:34 +05:30
Shota Gvinepadze
a7854f1b97 [MM-22037] Enable uppercase letters in the email (#13794)
* Enable uppercase letters in the email

* Lowercase email on every input

* Remove invalid test
2020-02-12 08:51:45 -05:00
Jason Paul Deland
28ef877876 (IS-302) Streamling process to download pre-built binaries (#13830)
* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir

* Streamlined script to find the correct latest version of an externally built binary from a GitHub Release

* Updated variable names to match

* Updating vars to match

* Updating parameters to named variables for clarity

* Update scripts/get_latest_release.sh

Co-Authored-By: Elisabeth Kulzer <elikul@elikul.de>

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
2020-02-11 12:29:38 -05:00
Eli Yukelzon
fb4d27d596 MM-22265 - Restrict the WS "update_team" event broadcast (#13848)
Automatic Merge
2020-02-11 03:41:55 -05:00
Maria A Nunez
c6e7030e03 MM-19445 - Fix conditional for plugin version diagnostics (#13844)
* Merge upstream

* Adding plugin version data if no error

* linting

Co-authored-by: Jason Paul Deland <9366595+jaydeland@users.noreply.github.com>
2020-02-10 14:45:19 -05:00
Jesús Espino
1d1ab03c38 Passing t to all tests setup functions (#13841)
* Passing t to all tests setup functions

* Fixing build
2020-02-10 19:31:41 +01:00
Claudio Costa
3b732fe257 Terminate WebSocketClient.pingWatchdog goroutine when closing the connection (#13655)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-10 14:15:24 +01:00
Eli Yukelzon
b98bb1624f MM-22188 Minor grammatical error in Guest User restriction text (#13847)
* fixed wording

* fixed wording
2020-02-10 20:43:13 +08:00
Agniva De Sarker
73ce92400b MM-22057: Limit incoming request bodies (#13827)
* MM-22057: Limit incoming request bodies

Set the max request body size to be equal to MaxFileSize.
Ideally, non-file request bodies should be smaller than file request bodies,
but we don't have a clean way to identify all file upload handlers.

There shouldn't be any valid request which exceeds the max file upload size.
So this is a safe global limit to apply.

* Fix tests

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-07 14:59:59 -05:00
Carlos Tadeu Panato Junior
94af9cc92c update db to 5.20 (#13820) 2020-02-06 17:25:27 +01:00
Jesús Espino
560b4b7c7e MM-21882: Remove the license requirement to promote guests to regular users (#13790)
* MM-21882: Remove the license requirement to promote guests to regular users

* Removing unneded translation keys

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-06 15:55:38 +01:00
Martin Kraft
240e57d581 MM-21199: Adds groups diagnostics. (#13736) 2020-02-06 09:25:36 -05:00
Jesús Espino
596f986755 Switch to Postgres when running tests and turn off the fsync setting (#13678)
* Run all tests fasts in postgres

* Moving postgres config to a file

* Addressing PR review comments

* Testing against mysql in the CI to keep things less changed

* Revert "Testing against mysql in the CI to keep things less changed"

This reverts commit fc940c111db269a821c54e005d76df87cb70e031.

* Fixing a test broken in postgres but working in mysql

* Fixing some tests

* Fixing some config tests with postgres

* Fixing the rest of config tests

* Fixing govet error

* Fixing search tests for postgres
2020-02-06 15:15:18 +01:00
Carlos Tadeu Panato Junior
55b646ecf8 retain the logs for more builds (#13645) 2020-02-06 13:26:36 +01:00
Nick Malcev
35102b081e GH-13421 Autoresponder should not reply to bot DMs (#13583) 2020-02-06 12:49:58 +01:00
Andrei Avram
e965d21359 Log error of OnConfigurationChange hook. (#13426) 2020-02-06 07:53:14 +01:00
Joram Wilander
eb29750f19 Revert "MM-21209: Use the LRU cache for UserStore.Get call too (#13456)" (#13824)
This reverts commit 1e28ad4a73.
2020-02-05 09:42:36 -05:00
Eli Yukelzon
597a2b77cd MM-17468 - Improve thread fetching (#13653)
* Revert "Thread fetching revert (#13616)"

This reverts commit 8e0fe90897.

* renamed query param for clarity

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-05 13:27:35 +01:00
Ben Schumacher
57717a23af Allow placeholder for types number and longtext (#13809) 2020-02-05 10:46:58 +01:00
Agniva De Sarker
435d43049f MM-22049: Add idle timeout to the HTTP server (#13788)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-05 11:32:04 +05:30
Agniva De Sarker
bfaf4fa5dc MM-22105: Revert "MM-21210: Add LRU cache for ChannelStore.GetMembersForUser (#13593)" (#13784)
This reverts commit 0361e8b97e.

The new cache ultimately did not give much benefit because the hit rate
was pretty low and it did not lead to any reduction in store timings.

So the increase in cluster messages was not worth it.

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-05 11:31:39 +05:30
Agniva De Sarker
a986aeb401 Remove explicit application/wasm mimetype (#13804)
Go mime sniffer supports the application/wasm mimetype natively
now. So there is no need to set this explicitly.
2020-02-05 09:06:17 +05:30
Jason Deland
720de2bec3 mmctl should always be in the server bin directory 2020-02-04 16:40:09 -05:00
Jason Paul Deland
051fe3cd71 Updating process for mmctl to use DIST_PATH/bin (#13822) 2020-02-04 16:01:01 -05:00
Carlos Tadeu Panato Junior
81e3cd2bba remove depth (#13666)
Automatic Merge
2020-02-04 14:35:07 -05:00
Jesús Espino
7afafd7767 Fixing key value duplication race condition in postgres (#13753)
Automatic Merge
2020-02-04 14:05:08 -05:00
Jason Paul Deland
acce0da068 Adding target to get the latest mmctl release from GitHub (#13770)
* Updating build and release process to include externally built mmctl

* Missed last commit before reset

* rename script to align with purpose

* Moving get release script to scripts dir
2020-02-03 16:58:15 -05:00
George Goldberg
d7206d2ede Update dependencies. (#13778) 2020-02-03 08:19:38 -08:00
Ben Schumacher
1a82e3e575 Add documentation for number field for plugins (#13800)
* Add example for release_notes_url

* Add number field
2020-01-31 21:36:14 +01:00
Jesse Hallam
918307e4fa delete kv on setting nil (#13769)
Setting a `nil` value should actually delete the row instead of preserve it with a `nil` value.

The existing tests passed because they only checked the return value of `nil`. When running the tests on Postgres, this value is returned as an empty `[]byte{}` instead of `nil`, so update the test to reflect this semantically equivalent behaviour.
2020-01-31 09:58:48 -04:00
Shobhit Gupta
2732a0c966 Ignore empty fields, change method name (#13773) 2020-01-31 14:17:26 +01:00
Jesús Espino
d66a2f90c6 Removing unused param and unneeded query (#13792) 2020-01-30 16:12:37 +01:00