Commit Graph

67 Commits

Author SHA1 Message Date
Jesse Hallam
2c3a2e9235 Query builder (#10104)
* add query builder to facilitate dynamic SQL construction

* leverage query builder to refactor user store

This is partially setup work for MM-13120, but merged to master to avoid
further conflicts.

* fix unrelated unit test breakage

* documentation tweaks

* Apply suggestions from code review

Co-Authored-By: lieut-data <jesse.hallam@gmail.com>

* prefer comma separated case options to fallthrough

* vendor github.com/Masterminds/squirrel and deps

* switch to using github.com/Masterminds/squirrel

* rm querybuilder
2019-01-29 15:24:57 -05:00
Christopher Speller
9168482623 Update dependencies. (#10136) 2019-01-24 16:35:21 -08:00
Harrison Healey
ba5566d1a0 MM-10417 Add local image proxy and enable by default (#9967)
* MM-10417 Add local image proxy and enable by default

* Remove unused function

* Add dependencies for willnorris/imageproxy

* Fixed compilation errors

* Lock to the master version of willnorris/imageproxy

* Fix atmos/camo proxy when no SiteURL is specified

* Re-add default values for deprecated settings

* Fix unit tests added by merge

* Pass imageproxy to App struct

* Remove unneeded locking when creating the image proxy

* Remove empty test file
2019-01-24 16:11:32 -04:00
Christopher Speller
8abec4a785 Switching to maintained gomail fork. 2018-12-05 13:51:47 -08:00
Christopher Speller
260b107590 Updating dependencies. 2018-12-05 13:51:47 -08:00
Daniel Fiori
8d56fcf568 Add library and command for human-readable logs (#9809)
* Update logrus to 1.2 and add as a direct dependency

* Create an mlog/human package for pretty-printing logs

This package can read JSON logs from mattermost.log, and output the data to
either logrus or a custom formatter, to make the logs more human readable.

* Create a command for outputting human-readable logs

This command will read JSON data from mattermost.log or stdin, and
output in a human readable format. An optional argument can be used
to activate logrus output (which includes color support).

* Reorganize code in mlog/human and improve logrus timestamp formatting
2018-11-08 10:23:07 -08:00
Hanzei
789b2f72dd GH-9737: Allow setting min_server_version in plugin manifest (#9743)
* Add github.com/blang/semver as vendor

* Add MinServerVersion check for plugins

* Add tests for MinServerVersion in manifest

* Move logic to model/manifest.go & add tests
2018-11-05 08:29:25 -05:00
Christopher Speller
a8c01377bc Updating server dependancies. (#9498) 2018-09-28 12:40:17 -07:00
Christopher Speller
61e27beabc Updating dependancies. (#9303) 2018-08-28 10:05:26 -07:00
Christopher Speller
c8013d4982 Remove accidential dependency (#9203) 2018-08-01 15:38:56 -07:00
Christopher Speller
bae26ec268 MM-11160 Adding proper CORS support. (#9152)
* Adding proper CORS support.

* Better CORS tests.
2018-07-26 08:31:22 -07:00
Christopher Speller
bac3376278 Updating dependencies (#9139) 2018-07-22 20:14:05 -07:00
Joram Wilander
cbd3fa4b3b Lock go-hclog and go-plugin dependencies to a revision (#9128) 2018-07-18 15:31:35 -07:00
Christopher Speller
1e5c432e10 MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)
* Moving plugins to use hashicorp go-plugin.

* Tweaks from feedback.
2018-06-25 12:33:13 -07:00
Christopher Speller
8526739066 MM-10934 Update server dependencies. (#8981)
* Changing throttled import path.

* Upgrading dependencies.
2018-06-21 16:10:40 -04:00
Harrison Healey
07c785e294 MM-10730 Added support for empty environment variables to viper (#8973) 2018-06-21 16:30:20 +02:00
Carlos Tadeu Panato Junior
c8b99b97df Update html2text lib to use the original repo (#8900) 2018-06-14 19:27:21 +02:00
Harrison Healey
d0cda0500e MM-10769 Rename references to spf13/viper to mattermost/viper (#8948) 2018-06-14 08:15:02 -07:00
Christopher Speller
d5e1f7e298 Upgrading server dependency. (#8807) 2018-05-18 07:32:31 -07:00
Jesús Espino
baba8fa92f Upgrading minio-go library to 6.0.0 (#8651)
* Upgrading minio-go library to 6.0.0

* Removing unnecesary Gopkg constraint
2018-04-30 14:35:10 -07:00
Christopher Speller
686c2fbab7 Structured logging (#8673)
* Implementing structured logging

* Changes to en.json to allow refactor to run.

* Fixing global logger

* Structured logger initalization.

* Add caller.

* Do some log redirection.

* Auto refactor

* Cleaning up l4g reference and removing dependancy.

* Removing junk.

* Copyright headers.

* Fixing tests

* Revert "Changes to en.json to allow refactor to run."

This reverts commit fd8249e99b.

* Fixing some auto refactor strangeness and typo.

* Making keys more human readable.
2018-04-27 12:49:45 -07:00
Jesse Hallam
3a4c7603b3 MM-10020: avoid duplicating unique indexes (#8587)
* unit test TestGet(Search)Replica

This adds partial, testing-focused support for SQLite, as well as removing
some translated log messages that required initializing i18n just for
testing.

* avoid returning master twice when no replicas are configured

* remove duplicate indexes

* unit test GetAllConns
2018-04-16 18:23:20 -07:00
Christopher Speller
6e2cb00008 Depenancy upgrades and movign to dep. (#8630) 2018-04-16 08:37:14 -04:00
Jesús Espino
5856325c13 Merge remote-tracking branch 'origin/release-4.9' into merge-release-4.9 2018-04-10 11:29:03 +02:00
Harrison Healey
0a6b96cb40 MM-9849 Added tracking of which settings are set through environment variables (#8586)
* MM-9849 Added tracking of which settings are set through environment variables

* Removed old version of viper

* Added forked version of viper

* Fixed unit tests

* Fixed more unit tests

* Removed copy from App.GetEnvironmentConfig
2018-04-09 18:16:11 +02:00
Jesús Espino
be972fde28 Adding minio-go for to the dependencies to temporary fix 2 minio-go bugs (#8577) 2018-04-06 15:59:09 -04:00
Jesús Espino
9e6db178b0 Adding durafmt library and use it from enterprise global relay export (#8487)
* Adding durafmt library and use it from enterprise global relay export

* Allow to specify different server host and server name on smtp connections

* Fixing utils/smtp tests
2018-03-27 10:23:33 +02:00
Harrison Healey
4e26594fcb Removed mssola/user_agent library (#8417)
* Removed mssola/user_agent library

* Changed user agent tests to use t.Run
2018-03-12 10:21:20 -04:00
Jesús Espino
fd9ee780ed Readding uasurfer library (#8420) 2018-03-07 09:56:24 -08:00
Christopher Speller
6d8f122a51 Upgrading server dependancies (#8308) 2018-02-16 09:47:51 -05:00
Jesús Espino
aaccb1226e Fix sampledata (fake library) bug (#8198) 2018-02-05 12:37:22 -05:00
Christopher Speller
961c04cae9 Upgrading server dependancies (#8154) 2018-01-29 14:17:40 -08:00
Harrison Healey
2fa7c464f0 Updated dependencies and added avct/uasurfer (#8089)
* Updated dependencies and added avct/uasurfer

* Added uasurfer to NOTICE.txt
2018-01-16 12:03:31 -05:00
Jesús Espino
6990d052d5 [XYZ-6] Add sampledata platform command (#8027)
* Add fake dependency

* [XYZ-6] Add sampledata platform command

* Creating EMOJI_NAME_MAX_LENGTH as a constant and using it where needed
2018-01-11 10:57:47 -05:00
Christopher Speller
1329aa51b6 Updating server dependancies. (#7816) 2017-11-13 09:09:58 -08:00
Christopher Speller
b84736e9b6 Updating server dependancies. (#7538) 2017-09-29 12:46:30 -07:00
Christopher Speller
96eab12027 Updating server dependancies. (#7246) 2017-08-17 17:19:06 -07:00
Chris
6b741c4cea testify (#7116) 2017-08-08 17:40:46 -05:00
Christopher Speller
09b49c26dd PLT-5308 Caching layer part 2 (#6973)
* Adding Reaction store cache layer example

* Implementing reaction store in new caching system.

* Redis for reaction store

* Adding redis library

* Adding invalidation for DeleteAllWithEmojiName and other minor enhancements
2017-07-31 08:15:23 -07:00
Christopher Speller
58839cefb5 Upgrading server dependancies (#6984) 2017-07-20 15:22:49 -07:00
Joram Wilander
005dd0754b Update gorp to support query timeouts on postgres (#6730)
* Update gorp to support query timeouts on postgres

* Update help text to remove postgres exception

* Fix glide.lock
2017-06-28 07:34:00 -07:00
Christopher Speller
42f28ab8e3 Updating server dependancies (#6712) 2017-06-21 19:06:17 -07:00
Joram Wilander
860e5d483c PLT-6341/PLT-6342 Update gorp to mattermost fork and add connection timeout setting (#6410)
* Update gorp to mattermost fork and add connection timeout setting

* Add go dependency

* Rename from connection timeout to query timeout

* Properly add gorp dependency
2017-05-29 15:46:35 -04:00
Christopher Speller
d103ed6ca9 Upgrading server dependancies (#6431) 2017-05-17 16:51:25 -04:00
Christopher Speller
f5437632f4 Upgrading server dependancies (#6215) 2017-04-24 20:11:36 -04:00
Corey Hulen
6bf080393d Fixing race conditions in the code base (#5966)
* Adding initial race detector

* Remove setting of config twice

* Fixing config file watch and config reload on license save

* Fixing config file watch and config reload on license save

* Fixing build error

* Fixing locking issue

* Fixing makefile

* Fixing race in config

* Fixing race in status unit test

* Adding EE race tests

* Fixing race in cluster info

* Removing code that's isn't needed

* Fixing some more races

* Fixing govet issue
2017-04-04 14:42:07 -04:00
Corey Hulen
54d3d47daf PLT-6076 Adding viper libs for config file changes (#5871)
* Adding viper libs for config file changes

* Removing the old fsnotify lib

* updating some missing libs
2017-03-25 03:31:34 -03:00
Christopher Speller
24496cd0b2 Removing goamz (#5753) 2017-03-13 16:43:00 -04:00
Christopher Speller
c281ee3b61 Updating server dependancies. Also adding github.com/jaytaylor/html2text and gopkg.in/gomail.v2 (#5748) 2017-03-13 12:54:22 -04:00
Christopher Speller
701d1ab638 Updating server dependancies (#5249) 2017-02-02 09:32:00 -05:00