Commit Graph

11324 Commits

Author SHA1 Message Date
Harrison Healey
2bbfb1026d MM-16825 Update NPS plugin to 1.0.3 (#11664) 2019-07-19 08:55:40 +02:00
Harrison Healey
f1d83eaf81 MM-17043 Downgrade OpenGraph logging to debug level (#11649) 2019-07-18 15:46:54 -04:00
Jesse Hallam
98ff5fab32 MM-16261: Synchronize plugins in HA (#11657)
* MM-16272 - Synchronize plugins across cluster (#11611)

* MM-16272 - Synchronize plugins across cluster

* Adding a test

* MM-16272 - Fixed tests

* MM-16272 - PR feedback

* MM-16270 - Plugin Sync (#11615)

* Initial implementation for plugin synch with file store. WIP

* Removed ListAll implementation. Used ListDirectory and change localstore to be consistent and return all items (files and folders) from directory

* Refactored plugin filestore operations out of main install/remove plugin

* Fixing error handling details

* Changes to use structured logging

* More logging fixes

* Wording and comments improvements

* Error handling and control flow improvements

* Changed managed flag check to use os.stat

* Added file store plugin dir and filename consts

* Replaced FileRead to use a the FileReader in PluginSync

* Minor styling and PR feedback changes

* Minor error handling improvements

* Added unit test for SyncPlugins. Changed SyncPlugins to use plugins environment to list available plugins

* PR Feedback improvements

* Minor err handling fix

* Removing FileStorePath from PluginEventData (#11644)

* Fix plugin path (#11654)

* tweak path, logging

Fix an issue not finding the plugins folder in S3. Tweak logging messages to add additional clarity.

* Removing FileExists check when Syncing plugins. Updated localstore to not return an error when directory does not exist

* PR Feedback

* Install prepackaged plugins locally only (#11656)

* s/uninstall/remove

* Updated ClusterMessage comment

* Updated PluginSync to test against s3 + local storage
2019-07-18 15:05:53 -03:00
Gabe Jackson
20f03f7656 Improve DB performance on getPostsAround() (#11662)
This change modifies the database query used by the getPostsAround()
method in order to improve the performance of loading posts when
scrolling through a channel.
2019-07-18 12:16:45 -04:00
Max Vovshin
5f61047d02 [16331] Migrated Channel.SaveMember to sync by default (#11158) (#11624)
* Added - golang version validation.

* Updated error message to include the minor version that is supported.

* Fixed issue with variable.

* Renamed variable.

* Added - golang version validation.

Added validation for major and minor versions of go.

* Fixed the way the validation is performed.

* Changed function declaration (define validate_go_version) to a target (validate_go_version).

* remove unneeded call to validate_go_version

* [16331] Migrated Channel.SaveMember to sync by default (#10613)

* Used require.Nil to check for err variable instaed of using panic with if statement.

* Used require.Nil to check for err variable instaed of using panic with if statement in user_store

* fixed errors about shadowing with err variable.

* Fixed issue with vet tool validation.

* Fixed go fmt tool validation.
2019-07-18 16:26:22 +02:00
krjn
4ada8aacd4 MM-16389 - complement for emoji_icon issue (#11650) 2019-07-18 14:54:01 +02:00
cpanato
3b9da417a9 add agent to build in the correct node 2019-07-18 11:27:53 +02:00
jfrerich
a35adb3ae1 Filter bots out of notifications for members not in channel (#11655) 2019-07-17 21:12:29 -04:00
Saturnino Abril
aef5ef4ed0 MM-16949 Fix posts returned from unread API when the two different list contains parent post and comments (#11617)
* fix posts returned from unread API when the list contains parent post/s

* add ExtendAll to PostList and update test per feedback

* revert unintentional change to the other test and fix comment

* update the existing postlist.Extend, filter unique values and update unit tests
2019-07-18 02:05:43 +08:00
Harrison Healey
d4727ec649 Update NPS plugin to v1.0.2 (#11648) 2019-07-17 10:00:31 -07:00
cpanato
262ccca15f fix jenkinsfile for branch build 2019-07-17 18:30:28 +02:00
Claudio Costa
dac7014b48 MM-11931 Add support for AllowedUntrustedInternalConnections to be comma-separated (#11614)
* Add support for AllowedUntrustedInternalConnections to be comma-separated

* Add comprehensive test cases for fields splitting function
2019-07-17 10:04:09 -04:00
Daniel Schalla
cb534c704e Enhance logging of CSRF Warning (#11630) 2019-07-17 09:08:58 -04:00
Carlos Tadeu Panato Junior
0fec6db7fc move dockerfile to server repo (#11374)
* move dockerfile to server and simplify

* add harcoded-mmpackage

* build docker image EE

* update jenkins file for branches
2019-07-17 15:02:10 +02:00
Eli Yukelzon
f32679393b Added debug-server-headless to Makefile (#11625) 2019-07-17 14:36:58 +03:00
Tim Scheuermann
7070b3596b Use a strings.Builder to create the idQuery string (#11600)
* Use a strings.Builder to create the idQuery string

* Use the query builder
2019-07-17 12:10:53 +01:00
Joshua Bezaleel Abednego
c49f755a14 Create CLI command "team modify" to modify team's privacy setting. (#10898) 2019-07-17 11:49:12 +02:00
krjn
dd30488a09 [MM-16389] Add icon_emoji parameter to webhooks (#11586)
[MM-16389] Add icon_emoji field to posts from incoming webhooks

To be used to substitute the profile picture on posts.
2019-07-17 11:01:18 +02:00
Tim Scheuermann
1da858ac4c MM-16780 Migrate "Team.AnalyticsGetTeamCountForScheme" to Sync by default (#11588)
* Changed the implementation of AnalyticsGetTeamCountForScheme to sync

* Updated the Store interface

* Updated the AnalyticsGetTeamCountForScheme tests

* Updated the autogenerated mocks

* Updated trackPermissions to use the modified method
2019-07-17 01:10:30 +02:00
Phillip Ahereza
1cb32b2331 [MM-16791] Migrate Plugin.Delete to Sync by default (#11580)
* Migrate Plugin.Delete to Sync by default

* remove unused import
2019-07-16 09:10:17 -04:00
Max Vovshin
5015550f23 GH-11530 - Go major and minor version validation. (#11531)
* Added - golang version validation.

* Updated error message to include the minor version that is supported.

* Fixed issue with variable.

* Renamed variable.

* Added - golang version validation.

Added validation for major and minor versions of go.

* Fixed the way the validation is performed.

* Changed function declaration (define validate_go_version) to a target (validate_go_version).

* remove unneeded call to validate_go_version
2019-07-16 09:08:31 -04:00
Harrison Healey
767a506889 MM-16921 Fix getPostsSince caching invalid data (#11618)
* MM-16921 Fix getPostsSince caching invalid data

* Remove workaround for invalid caching
2019-07-15 11:26:21 -04:00
Miguel de la Cruz
8f4e03a52b [MM-15925] Add includeDeleted flag to GetForPost in FileInfoStore (#11585) 2019-07-15 08:54:30 +02:00
Rajat Varyani
c1f3c83d38 Config migrate SAML keys and certificates (#11596) 2019-07-14 09:19:51 +02:00
Dave Lunny
53f1cf1cb2 Migrate "User.GetProfilesWithoutTeam" to Sync by default (#11612)
* 👤 Migrates GetProfilesWithoutTeam to Sync

* 🔬 Fix tests

* 🗣 Address CR feedback

* 🏃‍♂️ Run `make store-mocks`
2019-07-13 08:11:59 +02:00
Gabe Jackson
48e06e9bc4 Fix issue with setting mention count (#11610)
This change does the following:
 - Fixes a bug where mention counts could be set incorrectly for
   users in the database.
 - Updates the original notification unit test to check for more
   possible notification issues.
 - Adds a new unit test that performs mention count checking to
   prevent a regression to this fix.
2019-07-11 18:35:02 -04:00
Ali Farooq
5ed40a48c8 MM-16872 - Extend Plugin API to set LHS bot icon (#11601)
* MM-16872 - Extend Plugin API to set LHS bot icon

* MM-16872 - Using ReadSeeker as opposed to Reader for reading svg image file

* MM-16872 - PR feedback

* MM-16872 - Using userId rather than bot.UserId

* MM-16872 - Minor stylistic changes

* MM-16872 - Removing DriverName check
2019-07-11 12:00:12 -04:00
Rajiv Kushwaha
76f4fccf8a Migrate "Team.ClearAllCustomRoleAssignments" to Sync by default (#11587) 2019-07-11 14:54:56 +01:00
Allan Guwatudde
e8f77daa8a [MM-16562] Migrate User.GetUnreadCountForChannel to Sync by default (#11604)
* Migrate User.GetUnreadCountForChannel to Sync by default

* Remove else block from GetUnreadCountChannel in user_store.go

* Return nil value for count when an error occurs in GetUnreadCountForChannel

* Fix linting issue in user_store.go
2019-07-11 08:52:56 -04:00
Sven Hüster
5690df9d95 add support for new slack post format and multiple attachments in slack importer (#11415)
* add support for new slack post format and multiple attachments

* add test for multiple attachments in imported slack posts
2019-07-11 10:47:51 +01:00
Maria A Nunez
859c571558 MM-16261 - Store Plugin in File Store (#11511)
* Implemneted saving the plugin bundle on the file store upon plugin upload

* Fixed compilation error

* Fixed compilation issue

* Added deletion from file store upon plugin uninstall

* Added condition to delete from store only when exists. Added case of saving the bundle to the store when uploading from url. Added checks in plugin tests

* Fixed compilation error

* Moved storage of plugin bundle within app/installPlugin

* Moved storing to filestore before enabling the plugin

* Fixed error handling

* Code styling improvements

* Minor styling fix
2019-07-10 17:05:33 -03:00
Jesper Hansen
b464f31b38 Add progressive backoff function (#11497)
* [MM-15267] Utils: add backoff function to allow retries (#10958)

* [MM-15267] Utils: add unit test and update retry logic (#10958)

* [MM-15267] Utils: Add three retries to ProgressiveRetry (#10958)

* [MM-15267] Utils: add comments for progressive retry (#10958)

* [MM-15267] Utils: add license header to newly added file (#10958)

* [MM-15267] Utils: fix typo (#10958)

* [MM-15267] Utils: inline callback in function call (#10958)

* [MM-15267] Utils: remove type definition for backoff callback function (#10958)

* [MM-15267] Utils: use lookup table for timeout duration (#10958)

* [MM-15267] Utils: table driven unit tests for Progressive Backoff (#10958)

* [MM-15267] Utils: simplify retry function (#10958)

* [MM-15267] Utils: add assert and require packages to test file (#10958)

* [MM-15267] Utils: revert changes in go.mod and go.sum (#10958)
2019-07-10 15:59:18 -03:00
Micah Thompson
903085feb8 Migrate "User.UpdateMfaActive" to Sync by default (#11566) 2019-07-10 14:55:17 -04:00
Phillip Ahereza
e9b82bc1ce Migrate Plugin.DeleteAllForPlugin to Sync by default (#11597) 2019-07-10 14:54:38 -04:00
Claudio Costa
70fd0e0d6f Fix mixup between stdout and stderr in CLI (#11529) 2019-07-10 14:36:49 +02:00
Allan Guwatudde
15be0c6c79 [MM-16777] Migrate Team.MigrateTeamMembers to Sync by default (#11584)
* Migrate Team.MigrateTeamMembers to Sync by default

* Remove commented out MigrateTeamMembers function

* Remove return nil when no team members in query

* Return nil when no more team members in query

* Remove commented out code lines

* Format MigrateTeamMembers code

* Return some data from MigrateTeamMembers function

* Return data and error from MigrateTeamMembers

* Use result for consistency

* Control loop to allow loop to break in storetest/team_store.go

* Fix test MigrateTeamMembers test in storetest/team_store.go

* Change err to e in storetest/team_store.go
2019-07-10 12:39:24 +02:00
Taufiq Rahman
9ce5b28c63 [MM-16667] Migrate User.GetByUsername to Sync by default #11453 (#11520)
* Migrate User.GetByUsername to Sync by default #11453

* fix app errors #11453

* fix app errors #11453

* fix cmd error #11453

* fix shadow var #11453

* fix shadow user var #11453

* fix test error

* fix test error #11453
2019-07-10 10:46:03 +02:00
Rodrigo Villablanca Vásquez
678c8f4f84 Migrate CommandWebhook.TryUse to sync by default (#11593) 2019-07-09 22:57:05 +02:00
Mounica Paladugu
ff89b2c8e1 [MM-16170] Migrate Team.GetTeamsByUserId to Sync by default (#11100)
* [MM-16170] Migrate Team.GetTeamsByUserId to Sync by default

* Fixing comments
2019-07-09 12:21:18 -04:00
Rodrigo Villablanca Vásquez
0ec609d159 Migrate CommandWebhook.Get to sync by default (#11594) 2019-07-09 11:54:25 -04:00
Rodrigo Villablanca Vásquez
0d5ef4a1ff Migrate User.GetProfilesNotInChannel to sync by default (#11514) 2019-07-09 17:27:37 +02:00
Mounica Paladugu
6fc0ec06b2 [MM-16168] Migrate Team.GetAllTeamListing to Sync by default (#11102)
* [MM-16168] Migrate Team.GetAllTeamListing to Sync by default

* reverting GetAllTeamPageListing modification

* Modifying app/team.go

* Simplifying code
2019-07-09 17:19:18 +02:00
Phillip Ahereza
eb0268f108 Migrate Plugin.DeleteAllExpired to Sync by default (#11583) 2019-07-09 17:15:35 +02:00
Rodrigo Villablanca Vásquez
25a2e7e981 Migrate CommandWebhook.Save to sync by default (#11595) 2019-07-09 09:42:10 -05:00
Rodrigo Villablanca Vásquez
ce61681c92 Migrate Plugin.SaveOrUpdate to sync by default (#11592) 2019-07-09 15:08:28 +02:00
Marc Argent
e209a7acb4 GH-11466 Migrate User.UpdatePassword to Sync by default (#11495)
* GH-11466 Migrate User.UpdatePassword to Sync by default

* GH-11466 format fix
2019-07-09 04:50:01 -07:00
George Goldberg
38aa14a5bf Migrate Team.RemoveAllMembersByTeam to Sync by default
commit 5cc7051ca2c5f0f665eda79b22a46b8ad0c17398
Author: phillipahereza <pahereza@gmail..com>
Date:   Sat Jul 6 15:01:18 2019 +0300
2019-07-09 11:46:59 +01:00
Allan Guwatudde
32616a989b [MM-16772] Migrate Team.RemoveMember to Sync by default (#11565)
* Migrate Team.RemoveMember to Sync by default

* Fixed typo in user_store.go

* Resolved merge conflicts in storetest/user_store.go
2019-07-08 15:40:02 -07:00
Tim Scheuermann
902521f7d3 MM-16783 Migrate "Team.UserBelongsToTeams" to Sync by default (#11589)
* Migrated UserBelongsToTeams to a syncronous method

* Updated the Store interface

* Updated calls and removed now obsolete wrapper

* Regenerated store mocks

* Reverted wrong method call
2019-07-08 23:03:23 +02:00
Keaton Neville
1640702d5e GH-11550 Migrate "Team.ResetAllTeamSchemes" to Sync by default (#11564)
* Refactor as per #11550

* Remove trailing semicolon
2019-07-08 18:01:39 -03:00