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

9602 Коммитов

Автор SHA1 Сообщение Дата
Christopher Speller
6d8f122a51 Upgrading server dependancies (#8308) 2018-02-16 09:47:51 -05:00
Pierre de La Morinerie
b112747de7 Send systemd READY notification (#8296)
Currently, when starting Mattermost programmatically, it's hard to tell
when the server is actually ready to receive network connections.

This isn't convenient for monitoring (the systemd service status is
"running" although the server is still booting), nor for programatic use
(where a script would need to know when the server is ready to perform
further actions).

To improve this, systemd allow processes to tell when they started
successfully. The launcher waits for this notification before
reporting the service as successfully launched.

The way processes notify systemd is by sending a `READY=1` string over
a standard unix socket, whose path is provided in an environment var.

The systemd service is then told to expect this notification:

```diff
 [Service]
-Type=simple
+Type=notify
 ExecStart=/home/vagrant/go/bin/platform
```

Now, when starting the server, systemd will actually wait for the server to
be ready before returning the control to the shell.

Additionally, during this time, querying the server status with
`service mattermost status` will report the service as "activating" – before
transitioning to "running" when the server is ready.
2018-02-15 16:47:03 -08:00
Jesús Espino
2930766c65 PLT-8723: Fix DeadLock on reactions insertions (#8225)
* PLT-8723: Fix DeadLock on reactions insertions

* Improved the HasReactions update SQL
2018-02-15 16:41:49 -08:00
Jesús Espino
c158e9a5a0 XYZ-114 Adding mandatory membership to town-square in bulk-import (#8274) 2018-02-15 15:31:48 +00:00
Jonathan
05d84a8008 Modified advanced mail implementation to properly support multiple attachments with the same file name (#8289) 2018-02-15 09:02:31 +01:00
Pierre de La Morinerie
44a27125de Wait for goroutines to finish before shuting down server (#8259)
When running server tests, the server will exit while some jobs spawned
through a goroutine are still running. This may crash the test harness,
as the jobs try to access a shut down app instance.

Fortunately the fix is easy: we just have to use the same App
goroutine-counting facility than the rest of the method's goroutines.
2018-02-14 12:18:06 -06:00
Derrick Anderson
cafa4e4370 Merge branch 'release-4.7-t3merge3' 2018-02-14 12:58:36 -05:00
Derrick Anderson
e43f381764 gofmt 2018-02-13 23:46:49 -05:00
Derrick Anderson
4e4535bda9 Merge release-4.7 with master in side branch 2018-02-13 23:20:27 -05:00
Jonathan
bf1fdf92c7 XYZ-110: Cherrypicking changes from release-4.7 to master (#8254)
* Cherry-picking 7b2861de3a to master because enterprise/master has code in it that enterprise/release-4.7 does not, and I don't want enterprise/master to break the next time somebody merges enterprise/release-4.7 to enterprise/master

* Renamed file to match existing scheme

(cherry picked from commit 8c22c5c6c6)
2018-02-13 15:17:29 -05:00
Joram Wilander
5c560db810 ABC-176 Prevent changing PluginSettings.EnableUploads through the API (#8249)
* Prevent changing PluginSettings.EnableUploads through the API

* Contain api4 test case in it's own test
2018-02-13 11:08:49 -05:00
Derrick Anderson
8b79f5d49c Merge branch 'ccbrown-rm-willnorris-proxy-support' into release-4.7 2018-02-13 08:16:38 -05:00
Chris
fbef16f863 Merge branch 'release-4.7' into rm-willnorris-proxy-support 2018-02-12 18:36:39 -06:00
Derrick Anderson
32c1f7be23 Merge branch 'release-4.7-revertmaster' into release-4.7 2018-02-12 16:13:01 -05:00
Derrick Anderson
c209e44574 revert master changes 2018-02-12 16:01:02 -05:00
Derrick Anderson
62efb1df75 Merge branch 'icu669' into release-4.7 2018-02-12 15:10:22 -05:00
Derrick Anderson
efd620d6c8 Merge branch 'release-4.7' into icu669 2018-02-12 15:09:59 -05:00
Derrick Anderson
d88d2bc2ed Merge branch 'release-4.7-t4merge' 2018-02-12 14:50:52 -05:00
Christopher Brown
56f49cf486 poke jenkins 2018-02-12 13:44:27 -06:00
Derrick Anderson
3da5df3c90 Merge remote-tracking branch 'origin/release-4.7' into release-4.7-t4merge 2018-02-12 14:13:29 -05:00
Christopher Brown
141cfd2f9b remove willnorris/imageproxy support 2018-02-12 13:05:01 -06:00
Chris
1ae680aefa Merge branch 'master' into release-4.7 2018-02-12 12:02:54 -06:00
Pierre de La Morinerie
07fd7aeeb8 Add tests for the platform server command (#8231)
* Cleanup app state on initialization error

When returning an initialization error, the app state was not cleaned
up. This is especially visible during tests, as `appCount` is not
decremented, and makes the new app initialization fail.

* Test the `platform server` command

As the `platform server` command only exits when interrupted by
a signal, it is not possible to test it as the other cobra
commands. Instead we directly test the actual command function.

The internal command handler is slighly refactored to take
a channel in argument, and registers it as the signal handler.
Nothing very different—except than controlling this channel
from the outside allows the test to send the system signal
itself, thus preventing the server to run forever.
2018-02-12 08:46:32 -08:00
Jonathan
9707ac3aaf Added invite_id field to email invite url, along with validation of this field on the server (#8235) 2018-02-12 09:16:17 -05:00
Harrison Healey
87fb19b827 Fixed typo in unit test 2018-02-12 08:58:38 -05:00
Christopher Brown
c1b6e8792c minor addition to #8238 2018-02-09 20:08:39 -06:00
Joram Wilander
3e0c3eff9f ABC-228 Update GetPosts caching to work for non-60 limits (#8233)
* Update GetPosts caching to work for non-60 limits

* Only cache on limits of 30/60 and add test

* Add comments clarifying 30 and 60 limits
2018-02-09 14:47:22 -08:00
Chris
396e7513ec Don't proxy same-site image urls (#8238)
* don't proxy same-site urls

* fix empty site url case
2018-02-09 15:41:06 -06:00
Chris
a4e9499714 Add /v4/image api (#8230)
* add image api

* i suppose i should add a test...

* only redirect to image proxy
2018-02-09 13:59:17 -06:00
Chris
0daac7e4fc Add /v4/image api (#8230)
* add image api

* i suppose i should add a test...

* only redirect to image proxy
2018-02-09 11:56:11 -08:00
Derrick Anderson
e7b084842a Merge branch 'release-4.7' 2018-02-09 12:59:56 -05:00
Chris
a6309aaf48 Remove license globals entirely (#8229)
* remove license globals entirely

* fix infinite recursion

* test fix
2018-02-09 10:04:48 -06:00
Harrison Healey
e2b5f9217f ICU-669 Handle relative links better 2018-02-09 10:05:23 -05:00
Chris
7e8106b95c use mattermost fork of go-bindata (#8216) 2018-02-08 19:43:27 -05:00
Derrick Anderson
1b064c674a Add prepatory code for 4.8.0 (#8226)
* Add prepatory code for 4.8.0

* formatting issue

* build bug
2018-02-08 12:12:48 -05:00
Chris
cf929476bd fix client4 post sanitization (#8219) 2018-02-08 11:54:45 -05:00
Harrison Healey
d3a0e561c2 ICU-669 Ensured all URLs returned from OpenGraph are absolute 2018-02-08 10:45:25 -05:00
Derrick Anderson
9bf23ece6c Merge branch 'abc-239' into release-4.7 2018-02-08 10:05:01 -05:00
Derrick Anderson
f28ee8d7c8 Merge branch 'release-4.7' 2018-02-08 09:08:16 -05:00
Chris
0f703a3368 Eliminate utils.SetLicense calls (#8217)
* eliminate utils.SetLicense calls

* test fix

* another test fix

* more test fixes
2018-02-07 16:20:51 -06:00
JoramWilander
840892ab88 Increase OAuth2 state parameter limit 2018-02-07 16:21:22 -05:00
enahum
654fc2f749 translations PR 20180205 (#8200) 2018-02-07 14:08:42 -05:00
Chris
eff65aa05c ABC-132: sign error page parameters (#8197)
* sign error page parameters

* add comments
2018-02-07 12:05:46 -05:00
Vordimous
7bd298ceaa PLT-7537: Move channel CLI command posts system message to channel. (#8161)
* [PTL-7537] implement feature and test

* [PTL-7537] Update feature to post the the room requiring a username flag to be used

* [PTL-7537] update tests with username

* update test to remove changes to the test helper struct

* use the basic team and user
2018-02-07 14:17:18 +00:00
Jonathan
d3e934d07a XYZ-35: Added Support for GlobalRelay Compliance Export Format
* Added username to ChannelMemberHistory struct in anticipation of supporting GlobalRelay in Compliance Export
* Removed translation from debug output - this makes it complicated to use utils functions from tests in the enterprise repo
* Added an advanced email function that allows for greater control over message details. Updated MessageExport config to support GlobalRelay. Added attachment support to InBucket unit tests
* Moving templates in from enterprise to solve test issues
* Added export format to diagnostics
* Changed email attachment code to use FileBackend so that S3 storage is properly supported
2018-02-07 09:02:46 -05:00
Chris
b2ee507793 allow plugins to set command hints (#8214) 2018-02-07 08:21:40 -05:00
Jesús Espino
121712ce5d Remove fmt.Println trace on api4 tests (#8212) 2018-02-07 03:42:55 -06:00
Pierre de La Morinerie
809a16458f Abort on critical error during server startup (#8204)
Only a handful of critical errors are present in the codebase.
They all occur during server startup (in `app.StartServer()`).

Currently, when one of these critical error occurs, it is simpled
mentionned in the logs – then the error is discarded, and the app
attempts to continue the execution (and probably fails pretty quickly in
a weird way).

Rather than continuing operations in an unknow state, these errors should
trigger a clean exit.

This commit rewrites critical startup errors to be correctly
propagated, logged, and then terminate the command execution.
Additionnaly, it makes the server return a proper error code to the
shell.
2018-02-07 02:11:15 -06:00
Harrison Healey
9a73f99885 ICU-715 Change ExperimentalGroupUnreadChannels setting to allow for default on/off (#8211) 2018-02-06 18:45:14 -05:00
Chris
1ec295f88c add App.License, remove utils.IsLicensed / utils.License calls (#8203) 2018-02-06 17:25:49 -06:00